From 0b09a11222469a6d9a0b7d6dd366eb890c7c4a6b Mon Sep 17 00:00:00 2001 From: BBBoy01 <1156678002@qq.com> Date: Tue, 12 Dec 2023 13:16:14 +0800 Subject: [PATCH] feat: add peek type definniton keymap --- lazy-lock.json | 4 ++-- lua/config/keymaps.lua | 2 +- lua/plugins/lspsaga.lua | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 3119e3f..878afe5 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -13,7 +13,7 @@ "gitsigns.nvim": { "branch": "main", "commit": "6e05045fb1a4845fe44f5c54aafe024444c422ba" }, "indentmini.nvim": { "branch": "main", "commit": "a58129ae424fd6d8e0e2e7f6ce06c0443101e370" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lspsaga.nvim": { "branch": "main", "commit": "68d42e24295b4254fdf82a8a686fcf951f8a8d9a" }, + "lspsaga.nvim": { "branch": "main", "commit": "335805d4f591f5bb71cabb6aa4dc58ccef8e8617" }, "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "mini.ai": { "branch": "main", "commit": "c28f7d7348f27425a180b1b7dcaa77651f8b71ee" }, "mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" }, @@ -27,7 +27,7 @@ "nvim-cmp": { "branch": "main", "commit": "41d7633e4146dce1072de32cea31ee31b056a131" }, "nvim-lspconfig": { "branch": "master", "commit": "bd405e45c5fb122c16af8f87fa2dd7ab1981b243" }, "nvim-tree.lua": { "branch": "master", "commit": "141c0f97c35f274031294267808ada59bb5fb08e" }, - "nvim-treesitter": { "branch": "master", "commit": "b6b9ca448b7f236e2e60f8393a729902511f9db9" }, + "nvim-treesitter": { "branch": "master", "commit": "a6c655629cad421e432aa84af32cbfe35375113a" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index ab746b9..51dcb00 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -41,7 +41,7 @@ keymap.set('n', 's', '+', { desc = 'Increase window height' }) keymap.set('n', 's', '-', { desc = 'Decrease window height' }) -- Save & Close buffer -keymap.set('n', 'sw', 'qw', { desc = 'Save and Close current buffer' }) +keymap.set('n', 'sw', 'wq', { desc = 'Save and Close current buffer' }) keymap.set({ 'i', 'x', 'n', 's' }, '', 'w', { desc = 'Save current buffer' }) -- Add undo break-points diff --git a/lua/plugins/lspsaga.lua b/lua/plugins/lspsaga.lua index db6c0a0..eaa7593 100644 --- a/lua/plugins/lspsaga.lua +++ b/lua/plugins/lspsaga.lua @@ -18,7 +18,8 @@ return { { 'gt', 'Lspsaga goto_type_definition', desc = 'Goto cursorword type definition' }, { 'gh', 'Lspsaga hover_doc', desc = 'Show cursorword doc' }, { 'gr', 'Lspsaga finder', desc = 'Show cursorword finder' }, - { 'gp', 'Lspsaga peek_definition', desc = 'Peek cursorword definition' }, + { 'gpt', 'Lspsaga peek_type_definition', desc = 'Peek cursorword type definition' }, + { 'gpd', 'Lspsaga peek_definition', desc = 'Peek cursorword definition' }, { 'ga', 'Lspsaga code_action', desc = 'Show code action' }, { 'n', 'Lspsaga rename', desc = 'Rename cursorword' }, },