1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

plugins.lsp: alias onAttach to new lsp.onAttach

This simplifies the impl by doing global on-attach logic in a
`LspAttach` autocmd instead of adding lua lines to each server's
individual `on_attach` callback.

This is effectively a `mkAliasOptionModule` alias, other than the alias
only being applied when `plugins.lsp.enable`.
This commit is contained in:
Matt Sturgeon 2025-05-07 14:13:13 +01:00
parent c26f5c2e31
commit 5c52e8f9e4
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
5 changed files with 53 additions and 53 deletions

View file

@ -19,7 +19,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
];
settingsOptions = {
on_attach = defaultNullOpts.mkLuaFn "__lspOnAttach" "Lua code to run when tsserver attaches to a buffer.";
on_attach = defaultNullOpts.mkLuaFn null "Function to call when tsserver attaches to a buffer.";
handlers = lib.mkOption {
type = with lib.types; nullOr (attrsOf strLuaFn);