mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/lsp: enable servers."*"
by default
This commit is contained in:
parent
b6e2016b7f
commit
a072e3c3a7
3 changed files with 17 additions and 15 deletions
|
@ -93,6 +93,8 @@ in
|
|||
type = types.submodule (
|
||||
lib.modules.importApply ./server-base.nix {
|
||||
displayName = "all servers";
|
||||
enable.name = "the `*` server config";
|
||||
enable.default = true;
|
||||
settings.extraDescription = ''
|
||||
Will be merged by neovim using the behaviour of [`vim.tbl_deep_extend()`](https://neovim.io/doc/user/lua.html#vim.tbl_deep_extend()).
|
||||
'';
|
||||
|
@ -123,13 +125,10 @@ in
|
|||
'';
|
||||
default = { };
|
||||
example = {
|
||||
"*" = {
|
||||
enable = true;
|
||||
settings = {
|
||||
root_markers = [ ".git" ];
|
||||
capabilities.textDocument.semanticTokens = {
|
||||
multilineTokenSupport = true;
|
||||
};
|
||||
"*".settings = {
|
||||
root_markers = [ ".git" ];
|
||||
capabilities.textDocument.semanticTokens = {
|
||||
multilineTokenSupport = true;
|
||||
};
|
||||
};
|
||||
luals.enable = true;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
displayName ? "the language server",
|
||||
settings ? null,
|
||||
enable ? null,
|
||||
}:
|
||||
{ lib, ... }:
|
||||
let
|
||||
|
@ -9,7 +10,12 @@ let
|
|||
in
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkEnableOption displayName;
|
||||
enable = lib.mkOption rec {
|
||||
type = types.bool;
|
||||
description = "Whether to enable ${enable.name or displayName}. ${enable.extraDescription or ""}";
|
||||
default = enable.default or false;
|
||||
example = enable.example or (!default);
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = with types; attrsOf anything;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue