lspsaga config
I'm still not fully sold on this plugin yet. There are some little issues that I might be able to fix.
This commit is contained in:
parent
962d7f6971
commit
26d5e3b1ce
41
after/plugin/lspsaga.lua
Normal file
41
after/plugin/lspsaga.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
local ok, saga = pcall(require,"lspsaga")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- winbar is currently in nightly so this is wrapped for safety
|
||||
if vim.fn.exists('+winbar') ~= 0 then
|
||||
saga.init_lsp_saga({
|
||||
symbol_in_winbar = {
|
||||
in_custom = false,
|
||||
enable = true,
|
||||
seperator = '', -- might swap with
|
||||
show_file = true,
|
||||
click_support = false
|
||||
}
|
||||
})
|
||||
else
|
||||
saga.init_lsp_saga()
|
||||
end
|
||||
|
||||
-- Here we map keys since it makes sense to do it here
|
||||
|
||||
local action = require("lspsaga.codeaction")
|
||||
|
||||
vim.keymap.set("n","<leader>lca",action.code_action,{silent = true,noremap = true})
|
||||
vim.keymap.set("n","<leader>lca",function ()
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<C-U>",true,false,true))
|
||||
action.range_code_action()
|
||||
end, {silent = true, noremap = true})
|
||||
|
||||
--local gr = vim.api.nvim_create_augroup("LspSaga_Hover",{clear = true})
|
||||
|
||||
--vim.api.nvim_create_autocmd("CursorHold",{
|
||||
--pattern = {"*"},
|
||||
--callback = function ()
|
||||
--require("lspsaga.hover").render_hover_doc()
|
||||
--end,
|
||||
--group = gr
|
||||
--}
|
||||
--)
|
||||
Loading…
Reference in New Issue
Block a user