mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
languages: deprecate vim.languages.enableLSP
This change is done in favor of our intentions to use the new API Neovim has exposed, and the one we are exposing to match theirs.
This commit is contained in:
parent
d147606a35
commit
1ed6fd9f58
46 changed files with 102 additions and 81 deletions
|
@ -5,7 +5,7 @@
|
|||
}: let
|
||||
inherit (builtins) filter;
|
||||
inherit (lib.modules) mkIf mkMerge mkDefault;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) attrsOf;
|
||||
inherit (lib.strings) concatLines;
|
||||
inherit (lib.attrsets) mapAttrsToList attrNames filterAttrs;
|
||||
|
@ -27,37 +27,48 @@
|
|||
enabledServers = filterAttrs (_: u: u.enable) cfg.servers;
|
||||
in {
|
||||
options = {
|
||||
vim.lsp.servers = mkOption {
|
||||
type = attrsOf lspOptions;
|
||||
default = {};
|
||||
example = ''
|
||||
{
|
||||
"*" = {
|
||||
root_markers = [".git"];
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
semanticTokens = {
|
||||
multilineTokenSupport = true;
|
||||
vim.lsp = {
|
||||
enable = mkEnableOption ''
|
||||
global LSP functionality for Neovim.
|
||||
|
||||
This option controls whether to enable LSP functionality within modules under
|
||||
{option}`vim.languages`. You do not need to set this to `true` for language
|
||||
servers defined in {option}`vim.lsp.servers` to take effect, since they are
|
||||
enabled automatically.
|
||||
'';
|
||||
|
||||
servers = mkOption {
|
||||
type = attrsOf lspOptions;
|
||||
default = {};
|
||||
example = ''
|
||||
{
|
||||
"*" = {
|
||||
root_markers = [".git"];
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
semanticTokens = {
|
||||
multilineTokenSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"clangd" = {
|
||||
filetypes = ["c"];
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
LSP configurations that will be managed using `vim.lsp.config()` and
|
||||
related utilities added in Neovim 0.11. LSPs defined here will be
|
||||
added to the resulting {file}`init.lua` using `vim.lsp.config` and
|
||||
enabled through `vim.lsp.enable` below the configuration table.
|
||||
"clangd" = {
|
||||
filetypes = ["c"];
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
LSP configurations that will be managed using `vim.lsp.config()` and related
|
||||
utilities added in Neovim 0.11. LSPs defined here will be added to the
|
||||
resulting {file}`init.lua` using `vim.lsp.config` and enabled through
|
||||
`vim.lsp.enable()` API from Neovim below the configuration table.
|
||||
|
||||
You may review the generated configuration by running {command}`nvf-print-config`
|
||||
in a shell. Please see {command}`:help lsp-config` for more details
|
||||
on the underlying API.
|
||||
'';
|
||||
You may review the generated configuration by running {command}`nvf-print-config`
|
||||
in a shell. Please see {command}`:help lsp-config` for more details
|
||||
on the underlying API.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue