Compare commits
3 Commits
0496943912
...
e0b1b765f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0b1b765f3 | ||
|
|
4de1572ad1 | ||
|
|
cc8ca1ff33 |
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Vim Configuration
|
||||||
|
|
||||||
|
This is my vim(neovim) configuration, mainly using Lazy.vim as Configuration
|
||||||
|
manager and adding some basic support so that it can be used in multi-purpose
|
||||||
|
tasks.
|
||||||
@ -29,7 +29,7 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
-- colorscheme that will be used when installing plugins.
|
-- colorscheme that will be used when installing plugins.
|
||||||
install = { colorscheme = { "habamax" } },
|
install = { colorscheme = { "catppuccin-mocha" } },
|
||||||
-- automatically check for plugin updates
|
-- automatically check for plugin updates
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
|
|||||||
@ -38,7 +38,7 @@ return {
|
|||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-Space>"] = cmp.mapping.complete(), -- 触发补全
|
["<C-n>"] = cmp.mapping.complete(), -- 触发补全
|
||||||
["<C-e>"] = cmp.mapping.abort(), -- 关闭补全
|
["<C-e>"] = cmp.mapping.abort(), -- 关闭补全
|
||||||
['<CR>'] = cmp.mapping(function(fallback)
|
['<CR>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
@ -79,14 +79,9 @@ return {
|
|||||||
{ name = "path" }, -- 文件路径
|
{ name = "path" }, -- 文件路径
|
||||||
{ name = "buffer" }, -- 缓冲区内容
|
{ name = "buffer" }, -- 缓冲区内容
|
||||||
}),
|
}),
|
||||||
-- 美化补全菜单(图标 + 类型提示)
|
completion = {
|
||||||
formatting = {
|
autocomplete = false,
|
||||||
format = lspkind.cmp_format({
|
}
|
||||||
mode = "symbol_text",
|
|
||||||
maxwidth = 50,
|
|
||||||
ellipsis_char = "...",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- 命令行补全
|
-- 命令行补全
|
||||||
|
|||||||
@ -3,6 +3,10 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"tpope/vim-fugitive",
|
"tpope/vim-fugitive",
|
||||||
event = "User GitPrompt", -- 按需加载
|
cmd = {
|
||||||
|
"G",
|
||||||
|
"Git",
|
||||||
|
"Gedit", "Gdiffsplit", "Gread", "Gwrite", "GMove", "Ggrep", "GDelete", "GBrowse"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ return {
|
|||||||
{ "<leader>n", ":NERDTreeFocus<CR>", mode = "n", desc = "Nerd Tree Focus" },
|
{ "<leader>n", ":NERDTreeFocus<CR>", mode = "n", desc = "Nerd Tree Focus" },
|
||||||
{ "<C-n>", ":NERDTree<CR>", mode = "n", desc = "Nerd Tree" },
|
{ "<C-n>", ":NERDTree<CR>", mode = "n", desc = "Nerd Tree" },
|
||||||
{ "<C-t>", ":NERDTreeToggle<CR>", mode = "n", desc = "Nerd Tree Toggle" },
|
{ "<C-t>", ":NERDTreeToggle<CR>", mode = "n", desc = "Nerd Tree Toggle" },
|
||||||
{ "<C-f>", ":NERDTreeFind<CR>", mode = "n", desc = "Nerd Tree Find" },
|
{ "<C-s>", ":NERDTreeFind<CR>", mode = "n", desc = "Nerd Tree Find" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -25,10 +25,10 @@ return {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ff", "<cmd>lua require('telescope.builtin').find_files()<cr>", desc = "Find Files" },
|
{ "<leader>tf", "<cmd>lua require('telescope.builtin').find_files()<cr>", desc = "Find Files" },
|
||||||
{ "<leader>fg", "<cmd>lua require('telescope.builtin').live_grep()<cr>", desc = "Live Grep" },
|
{ "<leader>tg", "<cmd>lua require('telescope.builtin').live_grep()<cr>", desc = "Live Grep" },
|
||||||
{ "<leader>fb", "<cmd>lua require('telescope.builtin').buffers()<cr>", desc = "Find Buffers" },
|
{ "<leader>tb", "<cmd>lua require('telescope.builtin').buffers()<cr>", desc = "Find Buffers" },
|
||||||
{ "<leader>fh", "<cmd>lua require('telescope.builtin').help_tags()<cr>", desc = "Help Tags" },
|
{ "<leader>th", "<cmd>lua require('telescope.builtin').help_tags()<cr>", desc = "Help Tags" },
|
||||||
{ "gf", "<cmd>Telescope file_browser path=%:p:h<cr>", desc = "Open File Under Cursor" },
|
{ "gf", "<cmd>Telescope file_browser path=%:p:h<cr>", desc = "Open File Under Cursor" },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -43,8 +43,8 @@ return {
|
|||||||
{ "s", "<Plug>(easymotion-overwin-f2)", mode = "n", desc = "EasyMotion 跳转双字符" },
|
{ "s", "<Plug>(easymotion-overwin-f2)", mode = "n", desc = "EasyMotion 跳转双字符" },
|
||||||
|
|
||||||
-- <Leader>L 跳转行(上下)
|
-- <Leader>L 跳转行(上下)
|
||||||
{ "<leader>L", "<Plug>(easymotion-overwin-line)", mode = "n", desc = "EasyMotion 跳转行" },
|
{ "<leader>l", "<Plug>(easymotion-overwin-line)", mode = "n", desc = "EasyMotion 跳转行" },
|
||||||
{ "<leader>L", "<Plug>(easymotion-bd-jk)", mode = { "x", "o" }, desc = "EasyMotion 跳转行(可视模式)" },
|
{ "<leader>l", "<Plug>(easymotion-bd-jk)", mode = { "x", "o" }, desc = "EasyMotion 跳转行(可视模式)" },
|
||||||
|
|
||||||
-- <Leader>w 跳转单词
|
-- <Leader>w 跳转单词
|
||||||
{ "<leader>w", "<Plug>(easymotion-overwin-w)", mode = "n", desc = "EasyMotion 跳转单词" },
|
{ "<leader>w", "<Plug>(easymotion-overwin-w)", mode = "n", desc = "EasyMotion 跳转单词" },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user