mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 02:08:40 +02:00
plugins/lsp: Reduce indent on attr set and use helpers.mkRaw
This commit is contained in:
parent
03009d0b99
commit
e229e3ad44
1 changed files with 28 additions and 30 deletions
|
@ -260,8 +260,7 @@ in {
|
|||
mkIf cfg.enable {
|
||||
extraPlugins = [pkgs.vimPlugins.nvim-lspconfig];
|
||||
|
||||
keymapsOnEvents = {
|
||||
"LspAttach" = let
|
||||
keymapsOnEvents.LspAttach = let
|
||||
mkMaps = prefix:
|
||||
mapAttrsToList
|
||||
(
|
||||
|
@ -277,7 +276,7 @@ in {
|
|||
in {
|
||||
mode = "n";
|
||||
inherit key;
|
||||
action.__raw = prefix + actionStr;
|
||||
action = helpers.mkRaw (prefix + actionStr);
|
||||
|
||||
options =
|
||||
{
|
||||
|
@ -290,7 +289,6 @@ in {
|
|||
(mkMaps "vim.diagnostic." cfg.keymaps.diagnostic)
|
||||
++ (mkMaps "vim.lsp.buf." cfg.keymaps.lspBuf)
|
||||
++ cfg.keymaps.extra;
|
||||
};
|
||||
|
||||
# Enable all LSP servers
|
||||
extraConfigLua = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue