diff --git a/lua/keymap/completion.lua b/lua/keymap/completion.lua index e5b954189..9b7a5cdf0 100644 --- a/lua/keymap/completion.lua +++ b/lua/keymap/completion.lua @@ -18,7 +18,7 @@ function mapping.lsp(buf) ["n|go"] = map_cr("Lspsaga outline"):with_buffer(buf):with_desc("lsp: Toggle outline"), ["n|gjp"] = map_cr("Lspsaga diagnostic_jump_prev"):with_buffer(buf):with_desc("lsp: Prev diagnostic"), ["n|gjn"] = map_cr("Lspsaga diagnostic_jump_next"):with_buffer(buf):with_desc("lsp: Next diagnostic"), - ["n|gsl"] = map_cr("Lspsaga show_line_diagnostics"):with_buffer(buf):with_desc("lsp: Line diagnostic"), + ["n|gsl"] = map_cr("Lspsaga show_line_diagnostics ++unfocus"):with_buffer(buf):with_desc("lsp: Line diagnostic"), ["n|gsc"] = map_cr("Lspsaga show_cursor_diagnostics"):with_buffer(buf):with_desc("lsp: Cursor diagnostic"), ["n|gsb"] = map_cr("Lspsaga show_buf_diagnostics"):with_buffer(buf):with_desc("lsp: Buffer diagnostic"), ["n|gr"] = map_cr("Lspsaga rename"):with_buffer(buf):with_desc("lsp: Rename in file range"), @@ -29,7 +29,7 @@ function mapping.lsp(buf) ["n|gD"] = map_cr("Lspsaga goto_definition"):with_buffer(buf):with_desc("lsp: Goto definition"), ["n|gp"] = map_cr("Lspsaga preview_definition"):with_buffer(buf):with_desc("lsp: Preview definition"), ["n|gt"] = map_cr("Lspsaga term_toggle"):with_buffer(buf):with_desc("lsp: Toggle term"), - ["n|gh"] = map_cr("Lspsaga lsp_finder"):with_buffer(buf):with_desc("lsp: Show reference"), + ["n|gh"] = map_cr("Lspsaga finder"):with_buffer(buf):with_desc("lsp: Show reference"), ["n|gci"] = map_cr("Lspsaga incoming_calls"):with_buffer(buf):with_desc("lsp: Show incoming calls"), ["n|gco"] = map_cr("Lspsaga outgoing_calls"):with_buffer(buf):with_desc("lsp: Show outgoing calls"), } diff --git a/lua/modules/configs/completion/lspsaga.lua b/lua/modules/configs/completion/lspsaga.lua index 79578e614..bb69dcd46 100644 --- a/lua/modules/configs/completion/lspsaga.lua +++ b/lua/modules/configs/completion/lspsaga.lua @@ -26,35 +26,42 @@ return function() set_sidebar_icons() require("lspsaga").setup({ - preview = { - lines_above = 1, - lines_below = 17, - }, scroll_preview = { scroll_down = "", scroll_up = "", }, request_timeout = 3000, finder = { + silent = true, + default = "def+ref+imp", + layout = "float", + filter = {}, keys = { + shuttle = "[]", + toggle_or_open = "", jump_to = "e", - expand_or_jump = "", - vsplit = "s", - split = "i", + vsplit = "v", + split = "s", tabe = "t", - quit = { "q", "" }, - close_in_preview = "", + tabnew = "n", + quit = "q", + close = "", }, }, definition = { - edit = "o", - vsplit = "v", - split = "s", - tabe = "t", - quit = "q", + keys = { + edit = "o", + vsplit = "v", + split = "s", + tabe = "t", + close = "q", + quit = "q", + }, }, code_action = { num_shortcut = true, + show_server_name = true, + extend_gitsigns = false, keys = { quit = "q", exec = "", @@ -63,71 +70,93 @@ return function() lightbulb = { enable = false, sign = true, - enable_in_insert = true, sign_priority = 20, virtual_text = false, }, diagnostic = { + max_width = 0.5, + max_height = 0.6, text_hl_follow = true, - on_insert = true, - on_insert_follow = false, show_code_action = true, - show_source = true, border_follow = true, + diagnostic_only_current = false, extend_relatedInformation = false, jump_num_shortcut = true, + show_layout = "float", keys = { exec_action = "r", quit = "q", - expand_or_jump = "", - quit_in_show = { "q", "" }, + toggle_or_jump = "", + quit_in_show = { "q", "" }, }, }, rename = { - quit = "", - mark = "x", - confirm = "", - exec = "", - in_select = true, + in_select = false, + auto_save = false, + keys = { + quit = "", + select = "x", + exec = "", + }, }, hover = { + max_width = 0.3, + max_height = 0.7, open_link = "gl", open_browser = "silent !" .. require("core.settings").external_browser, }, outline = { win_position = "right", - win_with = "_sagaoutline", win_width = 30, auto_preview = false, - auto_refresh = true, auto_close = true, close_after_jump = true, + detail = false, + layout = "normal", keys = { - expand_or_jump = "", + toggle_or_jump = "", + jump = "o", quit = "q", }, }, symbol_in_winbar = { enable = true, separator = " " .. icons.ui.Separator, - hide_keyword = true, + hide_keyword = false, show_file = false, color_mode = true, }, + implement = { + enable = true, + sign = true, + virtual_text = false, + }, + callhierarchy = { + layout = "float", + keys = { + edit = "e", + vsplit = "v", + split = "s", + tabe = "t", + quit = "q", + shuttle = "[]", + toggle_or_req = "u", + close = "", + }, + }, beacon = { enable = true, frequency = 12, }, ui = { title = false, + devicon = true, border = "single", -- Can be single, double, rounded, solid, shadow. - winblend = 0, actionfix = icons.ui.Spell, expand = icons.ui.ArrowClosed, collapse = icons.ui.ArrowOpen, code_action = icons.ui.CodeAction, - incoming = icons.ui.Incoming, - outgoing = icons.ui.Outgoing, + imp_sign = icons.kind.Implementation, kind = { -- Kind Class = { icons.kind.Class, "LspKindClass" }, diff --git a/lua/modules/configs/editor/better-escape.lua b/lua/modules/configs/editor/better-escape.lua index 5260fff3c..cd2d0aad7 100644 --- a/lua/modules/configs/editor/better-escape.lua +++ b/lua/modules/configs/editor/better-escape.lua @@ -6,7 +6,7 @@ return function() keys = "", -- keys used for escaping, if it is a function will use the result everytime -- example(recommended) -- keys = function() - -- return vim.api.nvim_win_get_cursor(0)[2] > 1 and 'l' or '' + -- return vim.api.nvim_win_get_cursor(0)[2] > 1 and 'l' or '' -- end, }) end diff --git a/lua/modules/configs/tool/trouble.lua b/lua/modules/configs/tool/trouble.lua index e9b62dbd4..f73ea4949 100644 --- a/lua/modules/configs/tool/trouble.lua +++ b/lua/modules/configs/tool/trouble.lua @@ -19,7 +19,7 @@ return function() -- map to {} to remove a mapping, for example: -- close = {}, close = "q", -- close the list - cancel = "", -- cancel the preview and get back to your last window / buffer / cursor + cancel = "", -- cancel the preview and get back to your last window / buffer / cursor refresh = "r", -- manually refresh jump = { "", "" }, -- jump to the diagnostic or open / close folds open_split = { "" }, -- open buffer in new split diff --git a/lua/modules/configs/ui/catppuccin.lua b/lua/modules/configs/ui/catppuccin.lua index 78ba3e10e..6672da010 100644 --- a/lua/modules/configs/ui/catppuccin.lua +++ b/lua/modules/configs/ui/catppuccin.lua @@ -129,13 +129,6 @@ return function() bg = transparent_background and cp.none or cp.mantle, }, - -- For lspsaga.nvim - OutlineNormal = { bg = transparent_background and cp.none or cp.mantle }, - OutlineWinSeparator = { - bg = transparent_background and cp.none or cp.base, - fg = transparent_background and cp.surface1 or cp.base, - }, - -- For fidget FidgetTask = { bg = cp.none, fg = cp.surface2 }, FidgetTitle = { fg = cp.blue, style = { "bold" } }, diff --git a/lua/modules/utils/icons.lua b/lua/modules/utils/icons.lua index b069201ad..1347187b9 100644 --- a/lua/modules/utils/icons.lua +++ b/lua/modules/utils/icons.lua @@ -14,6 +14,7 @@ local data = { Folder = "󰉋", Function = "󰊕", Interface = "", + Implementation = "", Keyword = "󰌋", Method = "󰆧", Module = "",