From 4287d622b1026572b58de9ac41aed2b6a9a3a219 Mon Sep 17 00:00:00 2001 From: zeekling Date: Sun, 23 Jun 2024 01:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- lua/plugins/auto-complete.lua | 12 +++++++++++- lua/plugins/help.lua | 25 ++++++++++++++++--------- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a970be1..7b2d2f7 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ git clone ssh://git@git.zeekling.cn:222/linux/nvim-config.git ~/.config/nvim | \bp | 跳转到下一个buffer | Buffer | | \dt | 在左边显示或者关闭目录数 | Dir | | \mkp | 预览Markdown | Markdown | -| \ff | 格式化代码 | Format | -| \fsf | 在当前目录下面查找文件。支持模糊匹配 | Search | -| \fsg | 在当前目录下的文件查找字符串 | S earch | -| \fsb | 在打开的buffer中查找字符串 | Search | +| \cf | 格式化代码 | Format | +| \ff | 在当前目录下面查找文件。支持模糊匹配 | Find | +| \fg | 在当前目录下的文件查找字符串 | Find | +| \fb | 在打开的buffer中查找字符串 | Find | | \ls | 显示Lazy概览页面 | Lazy | ## 帮助 diff --git a/lua/plugins/auto-complete.lua b/lua/plugins/auto-complete.lua index c9c153d..71d9bd7 100644 --- a/lua/plugins/auto-complete.lua +++ b/lua/plugins/auto-complete.lua @@ -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 + }, + }, } diff --git a/lua/plugins/help.lua b/lua/plugins/help.lua index cb67ab6..eb8f60c 100644 --- a/lua/plugins/help.lua +++ b/lua/plugins/help.lua @@ -15,23 +15,30 @@ return { n = { "BufferLineCycleNext", "Go to next buffer" }, d = { "bd", "delete current buffer" }, }, + c = { + name = "Code", + f = { "Format", "Format Code" }, + g = { + name = "Go to", + d = { "Lspsaga goto_definition", "Go to definition" }, + f = { "Lspsaga finder", "Find usage or implements" }, + i = { "Lspsaga finder imp", "Find implements" }, + r = { "Lspsaga rename", "rename" }, + }, + }, d = { name = "dirTree", t = { "NvimTreeToggle", "show or hidden dir tree on left" }, }, f = { - name = "Search,Format Code", - s = { - name = "Search", - f = { "Telescope find_files", "Search files" }, - g = { "Telescope live_grep", "Find string in files" }, - b = { "Telescope buffers", "Find string in buffer" }, - }, - f = { "Format", "Format Code" }, + name = "Find", + f = { "Telescope find_files", "Find files" }, + g = { "Telescope live_grep", "Find string in files" }, + b = { "Telescope buffers", "Find string in buffer" }, }, g = { name = "Git", - b = {"Gitsigns blame", "git blame"} + b = { "Gitsigns blame", "git blame" }, }, l = { name = "Lazy",