diff --git a/home/.config/nvim/init.lua b/home/.config/nvim/init.lua index 62dc2fb..c7b8971 100644 --- a/home/.config/nvim/init.lua +++ b/home/.config/nvim/init.lua @@ -44,6 +44,5 @@ setup_yank_highlight() -- Annoyances in Neovim environment: -- 1. codelldb doesn't terminate C++ program after debugging. : Don't know how to fix, have asked for help. -- 2. Sometimes very seldomly the cursor stops rendering, the only fix I found is to restsart Neovim. --- 3. Add PR to lspsaga for always jumping into the hover_dock immediately. --- 4. Add PR to lspsaga so you can add keybindings for closing hover_doc, rename, finder, incoming_calls, and code actions using many configurable keybindings. I'm after "" and "q". +-- 3. Add PR to lspsaga so you can add keybindings for closing hover_doc, rename, finder, incoming_calls, and code actions using many configurable keybindings. I'm after "" and "q". --]] diff --git a/home/.config/nvim/lua/plugs/lspsaga.lua b/home/.config/nvim/lua/plugs/lspsaga.lua index 9472b0a..f5f9578 100644 --- a/home/.config/nvim/lua/plugs/lspsaga.lua +++ b/home/.config/nvim/lua/plugs/lspsaga.lua @@ -1,13 +1,16 @@ return { - "nvimdev/lspsaga.nvim", + -- "nvimdev/lspsaga.nvim", + "LarssonMartin1998/lspsaga.nvim", -- Use my own fork until PR's are merged event = "LspAttach", lazy = true, + -- dir = "~/dev/git/lspsaga.nvim", dependencies = { "nvim-tree/nvim-web-devicons", }, after = "nvim-lspconfig", config = function() require("lspsaga").setup({ + request_timeout = 750, symbol_in_winbar = { enable = false, }, @@ -24,22 +27,16 @@ return { }, code_action = { extend_gitsigns = true - } + }, + hover = { + jump_on_first_press = true + }, }) local keymaps = { n = { ["K"] = { - -- Awful hack to make sure the hover_doc window is closed when pressing q - -- This forces you to jump into the hover_doc window because running the same command when the window is open makes you jump into it, and inside of it q closes the window. - cmd = function() - vim.schedule(function() - vim.cmd("Lspsaga hover_doc") - vim.defer_fn(function() - vim.cmd("Lspsaga hover_doc") - end, 75) - end) - end + cmd = ":Lspsaga hover_doc" }, ["rn"] = { cmd = ":Lspsaga rename"