dotfiles/modules/programs/nvim/new_plugins/lspsaga.nix

46 lines
1 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, inputs, ... }:
let
inherit (lib) mkEnableOption mkIf readFile;
in
{
home-manager.users.moritz.programs.nixvim = {
2024-10-08 09:42:32 +02:00
plugins = {
lspsaga = {
enable = true;
codeAction.keys.quit = "<esc>";
lightbulb.virtualText = false;
};
web-devicons.enable = true;
};
keymapsOnEvents = {
LspAttach = [
{
2024-11-22 16:00:54 +01:00
key = "<leader>q";
action = "<cmd>Lspsaga code_action<cr>";
2024-11-22 16:00:54 +01:00
options.desc = "Quickfix";
options.buffer = true;
}
{
key = "gd";
action = "<cmd>Lspsaga goto_definition<cr>";
options.desc = "Goto Definition";
options.buffer = true;
}
{
2024-11-22 16:00:54 +01:00
key = "<leader>r";
action = "<cmd>Lspsaga rename<cr>";
options.desc = "Rename";
options.buffer = true;
}
{
key = "K";
action = "<cmd>Lspsaga hover_doc<cr>";
options.desc = "Hover";
options.buffer = true;
}
];
};
};
}