plugins/lsp: simplify implementation of per-server capabilities

This commit is contained in:
Gaetan Lepage 2025-04-26 20:20:24 +02:00 committed by nix-infra-bot
parent 2e559d3c3a
commit f0ec773869

View file

@ -202,9 +202,9 @@ lib.nixvim.plugins.mkNeovimPlugin {
lib.concatMapStringsSep "\n" (
server:
let
updates = lib.concatMapStringsSep "\n" (name: ''
client.server_capabilities.${name} = ${lib.nixvim.toLuaObject server.capabilities.${name}}
'') (builtins.attrNames server.capabilities);
updates = lib.concatMapAttrsStringsSep "\n" (name: enabled: ''
client.server_capabilities.${name} = ${lib.nixvim.toLuaObject enabled}
'') server.capabilities;
in
''
if client.name == "${server.name}" then