Matt Sturgeon
10f899d669
plugins/lsp: correct motivation for onAttach
alias impl
...
Previously I said we alias the definitions instead of the value to allow
`mkOrder` to work correctly. That is incorrect, as order-priorities are
already sorted in `<opt>.definitions`.
The actual reason to use the definitions instead of the final value is
to avoid inf-recursion. The "from" option's `apply` function would read
the "to" option's value, which is defined based on the "from" option's
value, which is set by the "from" option's apply function...
For a one-way binding, `mkDerivedConfig` is best. For a two-way binding,
`mkAliasAndWrapDefsWithPriority` is necessary.
2025-05-08 15:51:18 +01:00
Matt Sturgeon
5c52e8f9e4
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`.
2025-05-07 14:51:45 +01:00
Gaetan Lepage
9e0d2e4bed
plugins/lsp: rename lua scope to nvim-lspconfig
2025-04-28 18:11:39 +02:00
Matt Sturgeon
3ea2ce7ff6
Revert "plugins/lsp: use vim.lsp native API"
...
This reverts commit 78f6ff0369
.
From PR https://github.com/nix-community/nixvim/pull/3204
2025-04-28 13:08:48 +01:00
Gaetan Lepage
8d8a856896
plugins/lsp: remove unused internal enabledServers.*.capabilities option
2025-04-26 21:52:14 +02:00
Matt Sturgeon
c3a42a7ac4
plugins/lsp: remove standalonePlugins
default
...
We don't need to add `plugins.lsp` to
`performance.combinePlugins.standalonePlugins`
now that `/lsp` is included in `pathsToLink`.
2025-04-26 19:55:38 +01:00
Gaetan Lepage
f0ec773869
plugins/lsp: simplify implementation of per-server capabilities
2025-04-27 04:40:24 +10:00
Gaetan Lepage
2e559d3c3a
plugins/lsp: simplify implementation of inlayHints
2025-04-26 19:35:31 +02:00
Gaetan Lepage
78f6ff0369
plugins/lsp: use vim.lsp native API
2025-04-23 15:36:09 +02:00
Gaetan Lepage
e91333ae56
plugins/lsp: remove string support for plugins.lsp.enabledServers elements
2025-04-23 09:54:47 +02:00
Heitor Augusto
e59e99314b
plugins/lsp: add support for mode in non-extra keymaps
2025-01-06 22:20:32 +00:00
Heitor Augusto
48eeef58e1
plugins/lsp: migrate to mkNeovimPlugin
2025-01-06 22:20:31 +00:00
Gaetan Lepage
ec24d496d5
treewide (cleaning): helpers.toLuaObject -> lib.nixvim.toLuaObject
2024-12-15 21:55:51 +00:00
Yury Shvedov
3c6dd42ff8
plugin/lsp: simplify automatic keymap description
...
Do not create description prefix generically, but use extra argument for
`mkMaps`.
Change-Id: Id08297623edf750d8f33eb031748668be0c8bfa5
2024-12-02 09:45:07 +03:00
Yury Shvedov
d867aaea43
plugin/lsp: automatic keymap description
...
Add keymaps default descriptions for lsp buf and diagnostics
Change-Id: I7a48ef3760e530a738efd7036b7ae5722c054256
2024-12-02 09:43:43 +03:00
Gaetan Lepage
838829c8f9
lsp/keymaps: cosmetic implem changes
2024-12-02 01:22:22 +01:00
Matt Sturgeon
8b19d15482
plugins/lsp: fix enabledServers.extraOptions
type merging
...
Use `attrsOf` instead of `attrs` to ensure recursive merging, otherwise
things like `extraOptions.settings = lib.mkIf` will not be unwrapped by
the module system.
2024-11-26 13:57:40 +00:00
Shahar "Dawn" Or
46f658d960
plugins/lsp: no call fn in keymaps.extra example
...
Because by calling we do not get the function reference but its return
value, instead.
2024-10-24 08:24:08 +00:00
Austin Horstman
9c476a0948
plugins/lsp: use package option
2024-09-14 19:23:53 -05:00
Austin Horstman
1e74f3deab
plugins/lsp: make lspOnAttach available globally
...
Allows plugins to utilize the global nixvim table to access the lsp on
attach function and prevent needing to filter attribute set or manage
the property explicitly in lua.
2024-08-24 11:50:06 -05:00
Matt Sturgeon
7fb1f9dd9d
modules/keymap: improve lua
deprecation
...
- Replace nullable lua option with a no-default option.
- Made it so the deprecated option is only declared when `lua = true` is passed.
- Replace `normalizeMappings` with a `removeDeprecatedMapAttrs` helper.
- Added warnings for all options that historically had `lua` support.
2024-08-18 22:11:11 +01:00
darkdarcool
01aa3d469e
plugins/lsp: fix incorrect inlay_hint usage
...
The previous implementation used an outdated function signature, which
no longer works. Switched to the correct usage as-per the docs.
2024-06-13 13:46:53 +01:00
Matt Sturgeon
8a462dc957
plugins/lsp: fix inlayHints description
...
`mkEnableOption` adds an extra `.`, just use `mkOption` and be explicit.
2024-06-09 09:35:56 +01:00
Matt Sturgeon
4a22c35e6d
plugins/lsp: add inlay-hint option
...
`onAttach` code is based on [this comment](https://github.com/lvimuser/lsp-inlayhints.nvim/issues/46#issuecomment-1949916683 ).
Documented upstream at [`:h lsp-inlay_hint`](https://neovim.io/doc/user/lsp.html#lsp-inlay_hint )
2024-06-09 08:55:53 +01:00
Matt Sturgeon
61fa26c9e9
plugins/lsp: remove installLanguageServer
assertion
2024-06-03 18:10:28 +01:00
Gaetan Lepage
4175fac0ea
keymaps: remove remaining usages of deprecated lua option
2024-05-27 14:57:40 +02:00
traxys
62f32bfc71
treewide: Reformat with nixfmt
2024-05-05 22:00:40 +02:00
Daniel
052012d2d9
plugins/lsp: Improved docs for keymaps
2024-04-04 13:30:15 +02:00
Daniel
e229e3ad44
plugins/lsp: Reduce indent on attr set and use helpers.mkRaw
2024-04-04 13:30:15 +02:00
Daniel
03009d0b99
LSP: Register keymaps on LspAttach
2024-04-04 13:30:15 +02:00
GoodGuyPat
9f9d9ac0b7
Removed rnix dependencies, as it has been deprecated ( #1245 )
2024-03-12 16:42:22 +01:00
Nick Hu
ba5a0b84e1
plugins/lsp: add ocamllsp, the language server for OCaml ( #1233 )
2024-03-08 20:48:07 +01:00
Jake Hamilton
c4ae452396
feat: add option for customizing lsp capabilities ( #1021 )
2024-03-06 21:50:14 +01:00
James Taranto
361e2ec74b
Revert "plugins/lsp: Add statix ( #1105 )"
...
This reverts commit b784e73ad3
.
2024-02-17 12:12:52 +01:00
James Taranto
b784e73ad3
plugins/lsp: Add statix ( #1105 )
...
* plugins/lsp: Add statix
* plugins/lsp-config: remove redundant attribute
Default is already defined by name
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
* plugins/lsp-config: Simplify description
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
---------
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
2024-02-16 10:50:43 +01:00
Lin Xianyi
1e4c4a0add
Fix documentation for deprecated installLanguageServer ( #1096 )
...
`plugins.lsp.servers.${serverName}.package` should be `null` instead of `false`
2024-02-15 08:57:47 +01:00
Gaetan Lepage
183eac72a9
plugins/lsp: deprecate installLanguageServer option in favor of setting package = null
2024-02-14 23:49:24 +01:00
Gaetan Lepage
2294a12b0b
keymaps: use 'action.__raw' instead of 'lua = true' internally
2024-02-03 18:12:25 +01:00
Gaetan Lepage
3577c971e7
plugins/lsp: set enabledServers as an internal invisible option
2023-11-23 21:37:27 +01:00
Gaetan Lepage
b6724702b4
misc: refactor imports, prefer adding helpers
to args rather than importing it
2023-11-06 16:33:39 +01:00
Gaetan Lepage
dd6a114e52
plugins/misc: adapt to new maps options
2023-10-02 15:23:54 +02:00
Gaetan Lepage
71c0b4cb59
plugins/nvim-lsp: let keymaps actions be attrs
2023-07-21 08:05:35 +02:00
Tanish2002
efdcbe225f
perform some statix linting and fixes
2023-05-22 23:00:53 +02:00
Gaetan Lepage
859ae3a843
plugins/nvim-lsp: internal rename (nvim-lsp -> lsp)
2023-05-12 11:27:24 +02:00