mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 19:40:06 +02: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:
parent
c26f5c2e31
commit
5c52e8f9e4
5 changed files with 53 additions and 53 deletions
|
@ -234,11 +234,7 @@ with lib;
|
|||
```
|
||||
'';
|
||||
|
||||
on_attach = helpers.mkNullOrLuaFn ''
|
||||
Function to call on attach.
|
||||
If `plugins.lsp` is enabled, it defaults to the Nixvim global `__lspOnAttach` function.
|
||||
Otherwise it defaults to `null`.
|
||||
'';
|
||||
on_attach = helpers.defaultNullOpts.mkLuaFn null "Function to call when rustaceanvim attaches to a buffer.";
|
||||
|
||||
cmd = helpers.mkNullOrStrLuaFnOr (with types; listOf str) ''
|
||||
Command and arguments for starting rust-analyzer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue