Submitted PR to lspsaga for jumping into window of hover doc instantly,
use my fork until PR gets merged.
This commit is contained in:
parent
fea8eedad8
commit
d85cc750cd
2 changed files with 10 additions and 14 deletions
|
|
@ -44,6 +44,5 @@ setup_yank_highlight()
|
||||||
-- Annoyances in Neovim environment:
|
-- Annoyances in Neovim environment:
|
||||||
-- 1. codelldb doesn't terminate C++ program after debugging. : Don't know how to fix, have asked for help.
|
-- 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.
|
-- 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.
|
-- 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 "<Esc>" and "q".
|
||||||
-- 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 "<Esc>" and "q".
|
|
||||||
--]]
|
--]]
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
return {
|
return {
|
||||||
"nvimdev/lspsaga.nvim",
|
-- "nvimdev/lspsaga.nvim",
|
||||||
|
"LarssonMartin1998/lspsaga.nvim", -- Use my own fork until PR's are merged
|
||||||
event = "LspAttach",
|
event = "LspAttach",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
-- dir = "~/dev/git/lspsaga.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
after = "nvim-lspconfig",
|
after = "nvim-lspconfig",
|
||||||
config = function()
|
config = function()
|
||||||
require("lspsaga").setup({
|
require("lspsaga").setup({
|
||||||
|
request_timeout = 750,
|
||||||
symbol_in_winbar = {
|
symbol_in_winbar = {
|
||||||
enable = false,
|
enable = false,
|
||||||
},
|
},
|
||||||
|
|
@ -24,22 +27,16 @@ return {
|
||||||
},
|
},
|
||||||
code_action = {
|
code_action = {
|
||||||
extend_gitsigns = true
|
extend_gitsigns = true
|
||||||
}
|
},
|
||||||
|
hover = {
|
||||||
|
jump_on_first_press = true
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
local keymaps = {
|
local keymaps = {
|
||||||
n = {
|
n = {
|
||||||
["K"] = {
|
["K"] = {
|
||||||
-- Awful hack to make sure the hover_doc window is closed when pressing q
|
cmd = ":Lspsaga hover_doc<CR>"
|
||||||
-- 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
|
|
||||||
},
|
},
|
||||||
["<leader>rn"] = {
|
["<leader>rn"] = {
|
||||||
cmd = ":Lspsaga rename<CR>"
|
cmd = ":Lspsaga rename<CR>"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue