Commit graph

7 commits

Author SHA1 Message Date
Matt Sturgeon
90eb4e681c
modules/lsp/servers: move the * server to its own module
Introduce a bespoke `global-server.nix` module. This is less DRY, but
much simpler.

The `lsp.servers."*"` options are different enough from the other
`lsp.servers.<name>` options that it is simpler to just declare them
separately.

Now that we have a dedicated `global-server.nix` module, we no longer
need to split the normal server module into `server.nix`+`server-base.nix`

This partially reverts f2e96b67a3
2025-05-03 20:20:19 +01:00
Matt Sturgeon
f2e96b67a3
modules/lsp: declare a stripped down servers."*" option
`"*"` is effectively a meta server, where shared config/defaults can be
set.

It shouldn't have options like `activate` or `package` which relate to
"real" servers. Therefore, we'll use `server-base.nix` directly, instead
of the full `server.nix` module.
2025-05-01 00:12:39 +01:00
Johan Larsson
2d65c66a1a
modules/lsp: don't enable wildcard server
The wildcard server ("*") should have its config set, but not be enabled
through `vim.lsp.enable()`.
2025-04-30 20:55:26 +01:00
Matt Sturgeon
21688b1d2a
modules/lsp/server: rename config -> settings
`config` is a loaded term within modules and options.

`settings` is the name usually used for freeform config in nixvim and
most other module configurations.
2025-04-30 17:35:46 +01:00
Matt Sturgeon
e34eaf8395
modules/lsp/server: declare package defaults
Convert the `attrsOf (servers.nix)` option to a freeform submodule.

Declare a `servers.nix` option for each lsp server listed in
`lsp-packages.nix` that has a known nixpkgs package.
2025-04-30 16:53:55 +01:00
Matt Sturgeon
29aa60b43a
modules/lsp: add per-server name option
This allows users to override the name used for a given `lsp.servers.*`
entry. The default is still the attr-name.

This may be useful to inject raw lua, or to configure the same server in
different ways via different attrs.
2025-04-28 18:23:49 +01:00
Matt Sturgeon
3722f88c5d
modules/lsp: move server module to dedicated file 2025-04-28 18:04:11 +01:00