From 1bd91097c381aafec012babcfcd1d90821a0782e Mon Sep 17 00:00:00 2001 From: saygo-png Date: Wed, 20 Aug 2025 15:37:28 +0200 Subject: [PATCH] tests/lspsaga: update test Signed-off-by: saygo-png --- .../plugins/by-name/lspsaga/default.nix | 330 +++++++++--------- 1 file changed, 172 insertions(+), 158 deletions(-) diff --git a/tests/test-sources/plugins/by-name/lspsaga/default.nix b/tests/test-sources/plugins/by-name/lspsaga/default.nix index d9508ba2..c02d4d77 100644 --- a/tests/test-sources/plugins/by-name/lspsaga/default.nix +++ b/tests/test-sources/plugins/by-name/lspsaga/default.nix @@ -8,167 +8,181 @@ plugins.web-devicons.enable = true; plugins.lspsaga = { enable = true; - - ui = { - border = "single"; - devicon = true; - title = true; - expand = "⊞"; - collapse = "⊟"; - codeAction = "💡"; - actionfix = ""; - lines = [ - "┗" - "┣" - "┃" - "━" - "┏" - ]; - kind = { }; - impSign = "󰳛 "; - }; - hover = { - maxWidth = 0.9; - maxHeight = 0.8; - openLink = "gx"; - openCmd = "!chrome"; - }; - diagnostic = { - showCodeAction = true; - showLayout = "float"; - showNormalHeight = 10; - jumpNumShortcut = true; - maxWidth = 0.8; - maxHeight = 0.6; - maxShowWidth = 0.9; - maxShowHeight = 0.6; - textHlFollow = true; - borderFollow = true; - extendRelatedInformation = false; - diagnosticOnlyCurrent = false; - keys = { - execAction = "o"; - quit = "q"; - toggleOrJump = ""; - quitInShow = [ - "q" - "" + settings = { + ui = { + border = "single"; + devicon = true; + title = true; + expand = "⊞"; + collapse = "⊟"; + code_action = "💡"; + actionfix = ""; + lines = [ + "┗" + "┣" + "┃" + "━" + "┏" ]; + kind = { }; + imp_sign = "󰳛 "; + }; + hover = { + max_width = 0.9; + max_height = 0.8; + open_link = "gx"; + open_cmd = "!chrome"; + }; + diagnostic = { + show_code_action = true; + show_layout = "float"; + show_normal_height = 10; + jump_num_shortcut = true; + max_width = 0.8; + max_height = 0.6; + max_show_width = 0.9; + max_show_height = 0.6; + text_hl_follow = true; + border_follow = true; + extend_related_information = false; + diagnostic_only_current = false; + keys = { + exec_action = "o"; + quit = "q"; + toggle_or_jump = ""; + quit_in_show = [ + "q" + "" + ]; + }; + }; + code_action = { + num_shortcut = true; + show_server_name = false; + extend_git_signs = false; + only_in_cursor = true; + keys = { + quit = "q"; + exec = ""; + }; + }; + lightbulb = { + enable = true; + sign = true; + debounce = 10; + sign_priority = 40; + virtual_text = true; + }; + scroll_preview = { + scroll_down = ""; + scroll_up = ""; + }; + finder = { + max_height = 0.5; + left_width = 0.3; + right_width = 0.3; + methods = { + tyd = "textDocument/typeDefinition"; + }; + default = "ref+imp"; + layout = "float"; + silent = false; + filter = { }; + keys = { + shuttle = "[w"; + toggle_or_open = "o"; + vsplit = "s"; + split = "i"; + tabe = "t"; + tabnew = "r"; + quit = "q"; + close = "k"; + }; + }; + definition = { + width = 0.6; + height = 0.5; + keys = { + edit = "o"; + vsplit = "v"; + split = "i"; + tabe = "t"; + quit = "q"; + close = "k"; + }; + }; + rename = { + in_select = true; + auto_save = false; + project_max_width = 0.5; + project_max_height = 0.5; + keys = { + quit = ""; + exec = ""; + select = "x"; + }; + }; + symbol_in_winbar = { + enable = true; + separator = " › "; + hide_keyword = false; + show_file = true; + folder_level = 1; + color_mode = true; + delay = 300; + }; + outline = { + win_position = "right"; + win_width = 30; + auto_preview = true; + detail = true; + auto_close = true; + close_after_jump = false; + layout = "normal"; + max_height = 0.5; + left_width = 0.3; + keys = { + toggle_or_jump = "o"; + quit = "q"; + jump = "e"; + }; + }; + callhierarchy = { + layout = "float"; + keys = { + edit = "e"; + vsplit = "s"; + split = "i"; + tabe = "t"; + close = "k"; + quit = "q"; + shuttle = "[w"; + toggle_or_req = "u"; + }; + }; + implement = { + enable = true; + sign = true; + virtual_text = true; + priority = 100; + }; + beacon = { + enable = true; + frequency = 7; }; }; - codeAction = { - numShortcut = true; - showServerName = false; - extendGitSigns = false; - onlyInCursor = true; - keys = { - quit = "q"; - exec = ""; - }; - }; - lightbulb = { - enable = true; - sign = true; - debounce = 10; - signPriority = 40; - virtualText = true; - }; - scrollPreview = { - scrollDown = ""; - scrollUp = ""; - }; - finder = { - maxHeight = 0.5; - leftWidth = 0.3; - rightWidth = 0.3; - methods = { - tyd = "textDocument/typeDefinition"; - }; - default = "ref+imp"; - layout = "float"; - silent = false; - filter = { }; - keys = { - shuttle = "[w"; - toggleOrOpen = "o"; - vsplit = "s"; - split = "i"; - tabe = "t"; - tabnew = "r"; - quit = "q"; - close = "k"; - }; - }; - definition = { - width = 0.6; - height = 0.5; - keys = { - edit = "o"; - vsplit = "v"; - split = "i"; - tabe = "t"; - quit = "q"; - close = "k"; - }; - }; - rename = { - inSelect = true; - autoSave = false; - projectMaxWidth = 0.5; - projectMaxHeight = 0.5; - keys = { - quit = ""; - exec = ""; - select = "x"; - }; - }; - symbolInWinbar = { - enable = true; - separator = " › "; - hideKeyword = false; - showFile = true; - folderLevel = 1; - colorMode = true; - delay = 300; - }; - outline = { - winPosition = "right"; - winWidth = 30; - autoPreview = true; - detail = true; - autoClose = true; - closeAfterJump = false; - layout = "normal"; - maxHeight = 0.5; - leftWidth = 0.3; - keys = { - toggleOrJump = "o"; - quit = "q"; - jump = "e"; - }; - }; - callhierarchy = { - layout = "float"; - keys = { - edit = "e"; - vsplit = "s"; - split = "i"; - tabe = "t"; - close = "k"; - quit = "q"; - shuttle = "[w"; - toggleOrReq = "u"; - }; - }; - implement = { - enable = true; - sign = true; - virtualText = true; - priority = 100; - }; - beacon = { - enable = true; - frequency = 7; + }; + }; + + example = { + plugins.web-devicons.enable = true; + plugins.lspsaga = { + enable = true; + settings = { + ui.border = "single"; + symbol_in_winbar.enable = true; + implement.enable = true; + lightbulb.enable = false; }; }; };