Compare commits
10
Commits
f653915e23
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55a727d496 | ||
|
|
095acafb62 | ||
|
|
66c9ba4297 | ||
|
|
f153715208 | ||
|
|
95bec67c2d | ||
|
|
06069df8e5 | ||
|
|
42aa8f5590 | ||
|
|
62041e0897 | ||
|
|
11025156b6 | ||
|
|
a500160bbd |
@@ -1,2 +1,27 @@
|
|||||||
# vim
|
# vim
|
||||||
|
|
||||||
|
## install
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.appimage
|
||||||
|
|
||||||
|
mv nvim.appimage /usr/local/bin/nvim
|
||||||
|
sudo apt install fzf
|
||||||
|
sudo apt install fd-find
|
||||||
|
sudo apt install luarocks ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
## install lazygit
|
||||||
|
|
||||||
|
```bash
|
||||||
|
arch
|
||||||
|
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
|
||||||
|
# for x86
|
||||||
|
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
||||||
|
# for aarch64
|
||||||
|
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_arm64.tar.gz"
|
||||||
|
tar xf lazygit.tar.gz lazygit
|
||||||
|
sudo install lazygit /usr/local/bin
|
||||||
|
```
|
||||||
|
|
||||||
|
## setup
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
|
require("config.lazy")
|
||||||
|
|
||||||
vim.g.user = "veypi"
|
vim.g.user = "veypi"
|
||||||
vim.g.email = "i@veypi.com"
|
vim.g.email = "i@veypi.com"
|
||||||
vim.g.license = "GPL"
|
vim.g.license = "MIT"
|
||||||
vim.g.templates_directory = '~/.config/nvim/templates'
|
vim.g.templates_directory = "~/.config/nvim/templates"
|
||||||
|
|
||||||
require("config.lazy")
|
vim.opt.wrap = true
|
||||||
|
vim.opt.linebreak = true
|
||||||
|
|||||||
+46
-51
@@ -1,55 +1,50 @@
|
|||||||
{
|
{
|
||||||
"LazyVim": { "branch": "main", "commit": "7c7c196a78e936a1bc4cf28e7908e9bd96d75607" },
|
"LazyVim": { "branch": "main", "commit": "83d90f339defdb109a6ede333865a66ffc7ef6aa" },
|
||||||
"SchemaStore.nvim": { "branch": "main", "commit": "e8835ae8e941e940ed3418c3a77976a2bacc52e4" },
|
"SchemaStore.nvim": { "branch": "main", "commit": "d09eb13366fe95deeecf3deba7a4639f0c82fcdc" },
|
||||||
"auto-save.nvim": { "branch": "main", "commit": "5fbcaac0a2698c87a9a1bd2083cb6949505cca12" },
|
"auto-save.nvim": { "branch": "main", "commit": "61892d67acd5b7c845f5da4d780b26fcd7f63e34" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"catppuccin": { "branch": "main", "commit": "9970917b9e73159048103929b778c22e6cf1413d" },
|
"blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
|
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"claudecode.nvim": { "branch": "main", "commit": "432121f0f5b9bda041030d1e9e83b7ba3a93dd8f" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"codeium.nvim": { "branch": "main", "commit": "821b570b526dbb05b57aa4ded578b709a704a38a" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "6a28c90082a67f62a323ab90d988e000a718a8c7" },
|
"codex.nvim": { "branch": "main", "commit": "4317788afc091d5e913109c55d5a04f32be4e14a" },
|
||||||
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
|
"conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" },
|
||||||
"copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" },
|
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "d2c5a4d1341f5ca1ed2ecb4ecfcff2bc8ea18b14" },
|
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
|
"grug-far.nvim": { "branch": "main", "commit": "21604255d0e8f9968322f61f2b6c09e5efe1285a" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "ee7634ab4f0a6606438fe13e16cbf2065589a5ed" },
|
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||||
"grug-far.nvim": { "branch": "main", "commit": "190c03d54e8976491e6e49acb97087bf4182b079" },
|
"lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" },
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
"mason.nvim": { "branch": "main", "commit": "12ddd182d9efbdc848b540f16484a583d52da0fb" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
"mini.ai": { "branch": "main", "commit": "43eb2074843950a3a25aae56a5f41362ec043bfa" },
|
||||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
"mini.diff": { "branch": "main", "commit": "ab11575a6c147ecfba894d676d0c93e855021d34" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7446f47b3dfb7df801f31a6f6783c2ad119a6935" },
|
"mini.hipatterns": { "branch": "main", "commit": "9eff319bbe66adfaf781a0d0e174baa08ba94909" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" },
|
||||||
"mini.ai": { "branch": "main", "commit": "9b9b7cfa38b4871c3e44cfe89cf6d53fd40684d9" },
|
"mini.pairs": { "branch": "main", "commit": "42387c7fe68fc0b6e95eaf37f1bb76e7bffaa0d9" },
|
||||||
"mini.diff": { "branch": "main", "commit": "24d46798be8a358d38d3adc92c7ebcbb2d6f67e0" },
|
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||||
"mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
|
||||||
"noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" },
|
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" },
|
"nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "28b205ebe73a18f401e040585106f9bafd8ff21f" },
|
"nvim-lspconfig": { "branch": "master", "commit": "e146efacbafed3789ac568abcc5a981c5decaa58" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "00d219068385a4aa80859d4606ad6e03af6faa83" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
|
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
"render-markdown.nvim": { "branch": "main", "commit": "d67113f11384c0dad96fced2f7b91f1fc811e97f" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
||||||
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
|
"telescope.nvim": { "branch": "master", "commit": "3ab376cfae65b921dda454df5967f8df673effc6" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "37dc9233a473dd6c3f54456ef9994d8f77c80211" },
|
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
"transparent.nvim": { "branch": "main", "commit": "8ac59883de84e9cd1850ea25cf087031c5ba7d54" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "2e1daa1d164ad8cc3e99b44ca68e990888a66038" },
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" },
|
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
|
||||||
"ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" },
|
|
||||||
"vim-template": { "branch": "master", "commit": "df6d29a8549a13db026818c27a6b060978db7a3d" },
|
"vim-template": { "branch": "master", "commit": "df6d29a8549a13db026818c27a6b060978db7a3d" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" },
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
||||||
"yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" }
|
"yanky.nvim": { "branch": "main", "commit": "784188e0a7363e762e53140f39124d786aec0832" }
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-6
@@ -1,15 +1,19 @@
|
|||||||
{
|
{
|
||||||
"extras": [
|
"extras": [
|
||||||
"lazyvim.plugins.extras.coding.copilot",
|
|
||||||
"lazyvim.plugins.extras.coding.yanky",
|
"lazyvim.plugins.extras.coding.yanky",
|
||||||
|
"lazyvim.plugins.extras.editor.inc-rename",
|
||||||
|
"lazyvim.plugins.extras.editor.mini-diff",
|
||||||
"lazyvim.plugins.extras.lang.docker",
|
"lazyvim.plugins.extras.lang.docker",
|
||||||
|
"lazyvim.plugins.extras.lang.go",
|
||||||
"lazyvim.plugins.extras.lang.json",
|
"lazyvim.plugins.extras.lang.json",
|
||||||
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
"lazyvim.plugins.extras.lang.tailwind",
|
"lazyvim.plugins.extras.lang.tailwind",
|
||||||
"lazyvim.plugins.extras.lang.vue",
|
"lazyvim.plugins.extras.lang.typescript",
|
||||||
"lazyvim.plugins.extras.lang.yaml"
|
"lazyvim.plugins.extras.util.mini-hipatterns"
|
||||||
],
|
],
|
||||||
|
"install_version": 8,
|
||||||
"news": {
|
"news": {
|
||||||
"NEWS.md": "6520"
|
"NEWS.md": "11866"
|
||||||
},
|
},
|
||||||
"version": 6
|
"version": 8
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
--
|
||||||
-- Add any additional autocmds here
|
-- Add any additional autocmds here
|
||||||
|
-- with `vim.api.nvim_create_autocmd`
|
||||||
|
--
|
||||||
|
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
||||||
|
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
||||||
|
|||||||
@@ -7,3 +7,45 @@ local map = LazyVim.safe_keymap_set
|
|||||||
map("n", "q", "<cmd>bd<cr>", { desc = "Quit one" })
|
map("n", "q", "<cmd>bd<cr>", { desc = "Quit one" })
|
||||||
map("n", "Q", "<cmd>qa<cr>", { desc = "Quit All" })
|
map("n", "Q", "<cmd>qa<cr>", { desc = "Quit All" })
|
||||||
map("n", "<F2>", ":Neotree toggle<cr>", { desc = "toggle neotree" })
|
map("n", "<F2>", ":Neotree toggle<cr>", { desc = "toggle neotree" })
|
||||||
|
|
||||||
|
-- 自定义复制:文件名 + 行号范围 + 内容
|
||||||
|
-- 用法:yp(当前行),2yp(当前行及以下共2行)
|
||||||
|
_G.copy_lines_with_location = function()
|
||||||
|
local ok, err = pcall(function()
|
||||||
|
local count = vim.v.count1
|
||||||
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
local filepath = vim.api.nvim_buf_get_name(bufnr)
|
||||||
|
local relative_path = vim.fn.fnamemodify(filepath, ":.")
|
||||||
|
if relative_path == "" then
|
||||||
|
relative_path = "[No Name]"
|
||||||
|
end
|
||||||
|
|
||||||
|
local start_line = vim.api.nvim_win_get_cursor(0)[1]
|
||||||
|
local end_line = start_line + count - 1
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(bufnr, start_line - 1, end_line, false)
|
||||||
|
|
||||||
|
local range_str
|
||||||
|
if count == 1 then
|
||||||
|
range_str = tostring(start_line)
|
||||||
|
else
|
||||||
|
range_str = string.format("%d-%d", start_line, end_line)
|
||||||
|
end
|
||||||
|
|
||||||
|
local parts = { string.format("%s:%s:", relative_path, range_str) }
|
||||||
|
for i, line in ipairs(lines) do
|
||||||
|
table.insert(parts, string.format(" %d: %s", start_line + i - 1, line))
|
||||||
|
end
|
||||||
|
local result = table.concat(parts, "\n")
|
||||||
|
|
||||||
|
vim.fn.setreg("+", result)
|
||||||
|
vim.fn.setreg('"', result)
|
||||||
|
vim.notify("Copied " .. #lines .. " line(s)", vim.log.levels.INFO)
|
||||||
|
end)
|
||||||
|
if not ok then
|
||||||
|
vim.notify("copy_lines_with_location error: " .. tostring(err), vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local copy_lines_with_location = _G.copy_lines_with_location
|
||||||
|
|
||||||
|
map("n", "<leader>yy", copy_lines_with_location, { desc = "Copy line(s) with location" })
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -5,7 +5,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
{ out, "WarningMsg" },
|
{ out, "WarningMsg" },
|
||||||
{ "\nPress any key to exit..." },
|
{ "\nPress any key to exit..." },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
vim.fn.getchar()
|
vim.fn.getchar()
|
||||||
@@ -34,7 +34,7 @@ require("lazy").setup({
|
|||||||
checker = {
|
checker = {
|
||||||
enabled = true, -- check for plugin updates periodically
|
enabled = true, -- check for plugin updates periodically
|
||||||
notify = false, -- notify on update
|
notify = false, -- notify on update
|
||||||
}, -- automatically check for plugin updates
|
}, -- automatically check for plugin updates
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
-- disable some rtp plugins
|
-- disable some rtp plugins
|
||||||
|
|||||||
@@ -2,3 +2,5 @@
|
|||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
--
|
--
|
||||||
|
|
||||||
|
vim.g.root_spec = { { ".git", "lua" }, "lsp", "cwd" }
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
#! /usr/bin/env lua
|
||||||
|
--
|
||||||
|
-- ai.lua
|
||||||
|
-- Copyright (C) 2025 veypi <i@veypi.com>
|
||||||
|
--
|
||||||
|
-- Distributed under terms of the MIT license.
|
||||||
|
--
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- { "github/copilot.vim" },
|
||||||
|
{
|
||||||
|
"kkrampis/codex.nvim",
|
||||||
|
lazy = true,
|
||||||
|
cmd = { "Codex", "CodexToggle" }, -- Optional: Load only on command execution
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>xc", -- Change this to your preferred keybinding
|
||||||
|
function()
|
||||||
|
require("codex").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Codex popup or side-panel",
|
||||||
|
mode = { "n", "t" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
cmd = { "bash", "-c", "http_proxy=http://127.0.0.1:7897 https_proxy=http://127.0.0.1:7897 codex" },
|
||||||
|
keymaps = {
|
||||||
|
toggle = nil, -- Keybind to toggle Codex window (Disabled by default, watch out for conflicts)
|
||||||
|
quit = "<C-q>", -- Keybind to close the Codex window (default: Ctrl + q)
|
||||||
|
}, -- Disable internal default keymap (<leader>cc -> :CodexToggle)
|
||||||
|
border = "rounded", -- Options: 'single', 'double', or 'rounded'
|
||||||
|
width = 0.8, -- Width of the floating window (0.0 to 1.0)
|
||||||
|
height = 0.8, -- Height of the floating window (0.0 to 1.0)
|
||||||
|
model = nil, -- Optional: pass a string to use a specific model (e.g., 'o3-mini')
|
||||||
|
panel = false, -- Open Codex in a side-panel (vertical split) instead of floating window
|
||||||
|
use_buffer = false, -- Capture Codex stdout into a normal buffer instead of a terminal buffer
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"coder/claudecode.nvim",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
||||||
|
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
|
||||||
|
{ "<leader>af", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" },
|
||||||
|
{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
|
||||||
|
{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
|
||||||
|
{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" },
|
||||||
|
{ "<leader>as", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send to Claude" },
|
||||||
|
{
|
||||||
|
"<leader>as",
|
||||||
|
"<cmd>ClaudeCodeTreeAdd<cr>",
|
||||||
|
desc = "Add file",
|
||||||
|
ft = { "NvimTree", "neo-tree", "oil" },
|
||||||
|
},
|
||||||
|
-- Diff management
|
||||||
|
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
|
||||||
|
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -6,10 +6,9 @@
|
|||||||
-- Distributed under terms of the GPL license.
|
-- Distributed under terms of the GPL license.
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"echasnovski/mini.diff",
|
"nvim-mini/mini.diff",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
@@ -30,5 +29,5 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ if true then return {} end
|
|||||||
-- In your plugin files, you can:
|
-- In your plugin files, you can:
|
||||||
-- * add extra plugins
|
-- * add extra plugins
|
||||||
-- * disable/enabled LazyVim plugins
|
-- * disable/enabled LazyVim plugins
|
||||||
-- * override the configuration of LazyVim plugins
|
-- * override the requieconfiguration of LazyVim plugins
|
||||||
return {
|
return {
|
||||||
-- add gruvbox
|
-- add gruvbox
|
||||||
{ "ellisonleao/gruvbox.nvim" },
|
{ "ellisonleao/gruvbox.nvim" },
|
||||||
@@ -157,7 +157,11 @@ return {
|
|||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
table.insert(opts.sections.lualine_x, "😄")
|
table.insert(opts.sections.lualine_x, {
|
||||||
|
function()
|
||||||
|
return "😄"
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
+14
-27
@@ -1,25 +1,20 @@
|
|||||||
-- http://www.lazyvim.org/extras/lang/vue
|
|
||||||
|
|
||||||
require("lspconfig").ts_ls.setup({
|
require("lspconfig").ts_ls.setup({
|
||||||
cmd = { "typescript-language-server", "--stdio" },
|
cmd = { "typescript-language-server", "--stdio" },
|
||||||
filetype = { "javascript" },
|
filetype = { "javascript", "html" },
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = { ensure_installed = { "vue", "css", "scss", "go", "gomod", "gowork", "gosum", "json5" } },
|
opts = { ensure_installed = { "css", "scss", "go", "gomod", "gowork", "gosum", "json5" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"bash-language-server",
|
"bash-language-server",
|
||||||
"css-lsp",
|
"css-lsp",
|
||||||
"html-lsp",
|
"html-lsp",
|
||||||
"vue-language-server",
|
|
||||||
"vtsls",
|
|
||||||
"typescript-language-server",
|
|
||||||
"gopls",
|
"gopls",
|
||||||
"helm-ls",
|
"helm-ls",
|
||||||
"json-lsp",
|
"json-lsp",
|
||||||
@@ -35,23 +30,26 @@ return {
|
|||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
volar = {
|
|
||||||
init_options = {
|
|
||||||
vue = {
|
|
||||||
hybridMode = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tsserver = {
|
tsserver = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
ts_ls = {
|
ts_ls = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
|
gopls = {
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
hints = {
|
||||||
|
parameterNames = false,
|
||||||
|
assignVariableTypes = false,
|
||||||
|
},
|
||||||
|
usePlaceholders = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
vtsls = {
|
vtsls = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"vue",
|
|
||||||
"javascript",
|
"javascript",
|
||||||
"javascriptreact",
|
"javascriptreact",
|
||||||
"javascript.jsx",
|
"javascript.jsx",
|
||||||
@@ -91,16 +89,5 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = function(_, opts)
|
|
||||||
LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", {
|
|
||||||
{
|
|
||||||
name = "@vue/typescript-plugin",
|
|
||||||
location = LazyVim.get_pkg_path("vue-language-server", "/node_modules/@vue/language-server"),
|
|
||||||
languages = { "vue" },
|
|
||||||
configNamespace = "typescript",
|
|
||||||
enableForWorkspaceTypeScriptVersions = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ return {
|
|||||||
hint = icons.diagnostics.Hint,
|
hint = icons.diagnostics.Hint,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||||
{ LazyVim.lualine.pretty_path() },
|
{ LazyVim.lualine.pretty_path() },
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
@@ -96,25 +96,25 @@ return {
|
|||||||
{
|
{
|
||||||
function() return require("noice").api.status.command.get() end,
|
function() return require("noice").api.status.command.get() end,
|
||||||
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
||||||
color = function() return LazyVim.ui.fg("Statement") end,
|
color = function() return { fg = Snacks.util.color("Statement") } end,
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
function() return require("noice").api.status.mode.get() end,
|
function() return require("noice").api.status.mode.get() end,
|
||||||
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
||||||
color = function() return LazyVim.ui.fg("Constant") end,
|
color = function() return { fg = Snacks.util.color("Constant") } end,
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
function() return " " .. require("dap").status() end,
|
function() return " " .. require("dap").status() end,
|
||||||
cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end,
|
cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||||
color = function() return LazyVim.ui.fg("Debug") end,
|
color = function() return { fg = Snacks.util.color("Debug") } end,
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
require("lazy.status").updates,
|
require("lazy.status").updates,
|
||||||
cond = require("lazy.status").has_updates,
|
cond = require("lazy.status").has_updates,
|
||||||
color = function() return LazyVim.ui.fg("Special") end,
|
color = function() return { fg = Snacks.util.color("Special") } end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"diff",
|
"diff",
|
||||||
@@ -136,7 +136,7 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
||||||
{ "location", padding = { left = 0, right = 1 } },
|
{ "location", padding = { left = 0, right = 1 } },
|
||||||
},
|
},
|
||||||
lualine_z = {
|
lualine_z = {
|
||||||
@@ -170,5 +170,5 @@ return {
|
|||||||
|
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
explorer = {
|
||||||
|
-- 覆盖默认按键映射
|
||||||
|
actions = {
|
||||||
|
-- 原 E (expand_all) -> 绑定到 e
|
||||||
|
["e"] = "expand_all",
|
||||||
|
-- 原 e (explore) -> 绑定到 E
|
||||||
|
["E"] = "explore",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
terminal = {
|
||||||
|
win = {
|
||||||
|
-- 可选: "float" (浮动), "bottom" (底部), "top" (顶部), "left" (左侧), "right" (右侧)
|
||||||
|
-- position = "right",
|
||||||
|
|
||||||
|
-- 浮动窗口专用配置(当 position = "float" 时生效)
|
||||||
|
-- border = "rounded", -- 边框样式: "single", "double", "rounded", "shadow"
|
||||||
|
-- width = 0.3,
|
||||||
|
-- height = 0.8, -- 高度占屏幕比例
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
+9
-10
@@ -1,21 +1,20 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'aperezdc/vim-template',
|
"aperezdc/vim-template",
|
||||||
config = function()
|
config = function() end,
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"norcalli/nvim-colorizer.lua",
|
"norcalli/nvim-colorizer.lua",
|
||||||
config = function()
|
config = function()
|
||||||
require("colorizer").setup({ "css", "scss", "html", "javascript", "vue", "ts", "lua" }, {
|
require("colorizer").setup({ "css", "scss", "html", "javascript", "vue", "ts", "lua" }, {
|
||||||
RGB = true, -- #RGB hex codes
|
RGB = true, -- #RGB hex codes
|
||||||
RRGGBB = true, -- #RRGGBB hex codes
|
RRGGBB = true, -- #RRGGBB hex codes
|
||||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
return {
|
||||||
|
"xiyaowong/transparent.nvim",
|
||||||
|
groups = {
|
||||||
|
"Normal",
|
||||||
|
"NormalNC",
|
||||||
|
"Comment",
|
||||||
|
"Constant",
|
||||||
|
"Special",
|
||||||
|
"Identifier",
|
||||||
|
"Statement",
|
||||||
|
"PreProc",
|
||||||
|
"Type",
|
||||||
|
"Underlined",
|
||||||
|
"Todo",
|
||||||
|
"String",
|
||||||
|
"Function",
|
||||||
|
"Conditional",
|
||||||
|
"Repeat",
|
||||||
|
"Operator",
|
||||||
|
"Structure",
|
||||||
|
"LineNr",
|
||||||
|
"NonText",
|
||||||
|
"SignColumn",
|
||||||
|
"CursorLine",
|
||||||
|
"CursorLineNr",
|
||||||
|
"StatusLine",
|
||||||
|
"StatusLineNC",
|
||||||
|
"EndOfBuffer",
|
||||||
|
},
|
||||||
|
-- table: additional groups that should be cleared
|
||||||
|
extra_groups = {},
|
||||||
|
-- table: groups you don't want to clear
|
||||||
|
exclude_groups = {},
|
||||||
|
-- function: code to be executed after highlight groups are cleared
|
||||||
|
-- Also the user event "TransparentClear" will be triggered
|
||||||
|
on_clear = function() end,
|
||||||
|
config = function()
|
||||||
|
require("transparent").clear_prefix("lualine")
|
||||||
|
require("transparent").clear_prefix("NeoTree")
|
||||||
|
require("transparent").clear_prefix("BufferLine")
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user