{ lib, config, ... }: { options = { lspsaga.enable = lib.mkEnableOption "Enable lspsaga module"; }; config = lib.mkIf config.lspsaga.enable { plugins.lspsaga = { enable = true; beacon = { enable = true; }; ui = { border = "rounded"; # One of none, single, double, rounded, solid, shadow codeAction = "💡"; # Can be any symbol you want 💡 }; hover = { openCmd = "!floorp"; # Choose your browser openLink = "gx"; }; diagnostic = { borderFollow = true; diagnosticOnlyCurrent = false; showCodeAction = true; }; symbolInWinbar = { enable = true; # Breadcrumbs }; codeAction = { extendGitSigns = false; showServerName = true; onlyInCursor = true; numShortcut = true; keys = { exec = ""; quit = [ "" "q" ]; }; }; lightbulb = { enable = false; sign = false; virtualText = true; }; implement = { enable = false; }; rename = { autoSave = false; keys = { exec = ""; quit = [ "" "" ]; select = "x"; }; }; outline = { autoClose = true; autoPreview = true; closeAfterJump = true; layout = "normal"; # normal or float winPosition = "right"; # left or right keys = { jump = "e"; quit = "q"; toggleOrJump = "o"; }; }; scrollPreview = { scrollDown = ""; scrollUp = ""; }; }; # keymaps = [ # { # mode = "n"; # key = "gd"; # action = "Lspsaga finder def"; # options = { # desc = "Goto Definition"; # silent = true; # }; # } # { # mode = "n"; # key = "gr"; # action = "Lspsaga finder ref"; # options = { # desc = "Goto References"; # silent = true; # }; # } # # # { # # mode = "n"; # # key = "gD"; # # action = "Lspsaga show_line_diagnostics"; # # options = { # # desc = "Goto Declaration"; # # silent = true; # # }; # # } # # { # mode = "n"; # key = "gI"; # action = "Lspsaga finder imp"; # options = { # desc = "Goto Implementation"; # silent = true; # }; # } # # { # mode = "n"; # key = "gT"; # action = "Lspsaga peek_type_definition"; # options = { # desc = "Type Definition"; # silent = true; # }; # } # # { # mode = "n"; # key = "K"; # action = "Lspsaga hover_doc"; # options = { # desc = "Hover"; # silent = true; # }; # } # # { # mode = "n"; # key = "cw"; # action = "Lspsaga outline"; # options = { # desc = "Outline"; # silent = true; # }; # } # # { # mode = "n"; # key = "cr"; # action = "Lspsaga rename"; # options = { # desc = "Rename"; # silent = true; # }; # } # # { # mode = "n"; # key = "ca"; # action = "Lspsaga code_action"; # options = { # desc = "Code Action"; # silent = true; # }; # } # # { # mode = "n"; # key = "cd"; # action = "Lspsaga show_line_diagnostics"; # options = { # desc = "Line Diagnostics"; # silent = true; # }; # } # # { # mode = "n"; # key = "[d"; # action = "Lspsaga diagnostic_jump_next"; # options = { # desc = "Next Diagnostic"; # silent = true; # }; # } # # { # mode = "n"; # key = "]d"; # action = "Lspsaga diagnostic_jump_prev"; # options = { # desc = "Previous Diagnostic"; # silent = true; # }; # } # ]; }; }