代码跳转

This commit is contained in:
LingZhaoHui 2024-06-23 01:01:33 +08:00
parent dfa5521368
commit 4287d622b1
Signed by: zeekling
GPG Key ID: D96E4E75267CA2CC
3 changed files with 31 additions and 14 deletions

View File

@ -16,10 +16,10 @@ git clone ssh://git@git.zeekling.cn:222/linux/nvim-config.git ~/.config/nvim
| \<space>bp | 跳转到下一个buffer | Buffer |
| \<space>dt | 在左边显示或者关闭目录数 | Dir |
| \<space>mkp | 预览Markdown | Markdown |
| \<space>ff | 格式化代码 | Format |
| \<space>fsf | 在当前目录下面查找文件。支持模糊匹配 | Search |
| \<space>fsg | 在当前目录下的文件查找字符串 | S earch |
| \<space>fsb | 在打开的buffer中查找字符串 | Search |
| \<space>cf | 格式化代码 | Format |
| \<space>ff | 在当前目录下面查找文件。支持模糊匹配 | Find |
| \<space>fg | 在当前目录下的文件查找字符串 | Find |
| \<space>fb | 在打开的buffer中查找字符串 | Find |
| \<space>ls | 显示Lazy概览页面 | Lazy |
## 帮助

View File

@ -8,7 +8,7 @@ return {
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
"neovim/nvim-lspconfig",
"hrsh7th/cmp-cmdline"
"hrsh7th/cmp-cmdline",
},
config = function()
local cmp = require("cmp")
@ -66,4 +66,14 @@ return {
})
end,
},
{
"nvimdev/lspsaga.nvim",
config = function()
require("lspsaga").setup({})
end,
dependencies = {
"nvim-treesitter/nvim-treesitter", -- optional
"nvim-tree/nvim-web-devicons", -- optional
},
},
}

View File

@ -15,23 +15,30 @@ return {
n = { "<cmd>BufferLineCycleNext<cr>", "Go to next buffer" },
d = { "<cmd>bd<cr>", "delete current buffer" },
},
c = {
name = "Code",
f = { "<cmd>Format<cr>", "Format Code" },
g = {
name = "Go to",
d = { "<cmd>Lspsaga goto_definition<cr>", "Go to definition" },
f = { "<cmd>Lspsaga finder<cr>", "Find usage or implements" },
i = { "<cmd>Lspsaga finder imp<cr>", "Find implements" },
r = { "<cmd>Lspsaga rename<cr>", "rename" },
},
},
d = {
name = "dirTree",
t = { "<cmd>NvimTreeToggle<cr>", "show or hidden dir tree on left" },
},
f = {
name = "Search,Format Code",
s = {
name = "Search",
f = { "<cmd>Telescope find_files<cr>", "Search files" },
name = "Find",
f = { "<cmd>Telescope find_files<cr>", "Find files" },
g = { "<cmd>Telescope live_grep<cr>", "Find string in files" },
b = { "<cmd>Telescope buffers<cr>", "Find string in buffer" },
},
f = { "<cmd>Format<cr>", "Format Code" },
},
g = {
name = "Git",
b = {"<cmd>Gitsigns blame<cr>", "git blame"}
b = { "<cmd>Gitsigns blame<cr>", "git blame" },
},
l = {
name = "Lazy",