chore: preset enable docs

This commit is contained in:
Snoweuph 2026-04-13 08:34:26 +02:00
commit a3aa4e49d1
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
75 changed files with 252 additions and 228 deletions

View file

@ -270,7 +270,8 @@
[Snoweuph](https://github.com/snoweuph)
- Added `vim.lsp.presets.<name>` to contain LSP configurations. This allows for
more flexibility in nvf and reuse of LSPs across languages.
more flexibility in nvf and reuse of LSPs across languages. Dropped
`deprecatedSingleOrListOf` in favor of `listOf` for the affected LSP options.
- Fix `vim.lsp.presets.vala-language-server` to be wrapped correctly with
`uncrustify`.

View file

@ -5,10 +5,12 @@
typesDag = import ./dag.nix {inherit lib;};
typesPlugin = import ./plugins.nix {inherit lib self;};
typesLanguage = import ./languages.nix {inherit lib;};
typesLsp = import ./lsp.nix {inherit lib;};
customTypes = import ./custom.nix {inherit lib;};
in {
inherit (typesDag) dagOf;
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType;
inherit (typesLanguage) diagnostics mkGrammarOption;
inherit (typesLsp) mkLspPresetEnableOption;
inherit (customTypes) char hexColor mergelessListOf deprecatedSingleOrListOf;
}

12
lib/types/lsp.nix Normal file
View file

@ -0,0 +1,12 @@
{lib}: let
inherit (lib.options) mkEnableOption;
mkLspPresetEnableOption = option: display: fileTypes:
mkEnableOption ''
the ${display} Language Server.
Default `filetypes = ${lib.generators.toPretty {} fileTypes}`.
Use {option}`vim.lsp.servers.${option}` for customization
'';
in {
inherit mkLspPresetEnableOption;
}

View file

@ -344,5 +344,11 @@ in {
[
(mkRenamedOptionModule ["vim" "treesitter" "foldByDefault"] ["vim" "options" "foldenable"])
]
# 2026-13-04
[
(mkRenamedOptionModule ["vim" "lsp" "harper-ls" "enable"] ["vim" "lsp" "presets" "harper" "enable"])
(mkRenamedOptionModule ["vim" "lsp" "harper-ls" "settings"] ["vim" "lsp" "servers" "harper" "settings"])
]
];
}

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.arduino-language-server;
in {
options.vim.lsp.presets.arduino-language-server = {
enable = mkEnableOption "the Arduino Language Server";
enable = mkLspPresetEnableOption "arduino-language-server" "Arduino" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.asm-lsp;
in {
options.vim.lsp.presets.asm-lsp = {
enable = mkEnableOption "the Assembly Language Server";
enable = mkLspPresetEnableOption "asm-lsp" "Assembly" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.astro-language-server;
in {
options.vim.lsp.presets.astro-language-server = {
enable = mkEnableOption "the Astro Language Server";
enable = mkLspPresetEnableOption "astro-language-server" "Astro" [];
};
config = mkIf cfg.enable {

View file

@ -6,14 +6,14 @@
}: let
inherit (lib.meta) getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryBefore;
cfg = config.vim.lsp.presets.basedpyright;
in {
options.vim.lsp.presets.basedpyright = {
enable = mkEnableOption "the Based Pyright Language Server";
enable = mkLspPresetEnableOption "basedpyright" "Based Pyright" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.bash-language-server;
in {
options.vim.lsp.presets.bash-language-server = {
enable = mkEnableOption "the Bash Language Server";
enable = mkLspPresetEnableOption "bash-language-server" "Bash" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.ccls;
in {
options.vim.lsp.presets.ccls = {
enable = mkEnableOption "the CC Language Server";
enable = mkLspPresetEnableOption "ccls" "CC" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.clangd;
in {
options.vim.lsp.presets.clangd = {
enable = mkEnableOption "the Clangd Language Server";
enable = mkLspPresetEnableOption "clangd" "Clangd" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.clojure-lsp;
in {
options.vim.lsp.presets.clojure-lsp = {
enable = mkEnableOption "the Clojure Language Server";
enable = mkLspPresetEnableOption "clojure-lsp" "Clojure" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.cue;
in {
options.vim.lsp.presets.cue = {
enable = mkEnableOption "the CUE Language Server";
enable = mkLspPresetEnableOption "cue" "Cue" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.dart;
in {
options.vim.lsp.presets.dart = {
enable = mkEnableOption "the Dart Language Server";
enable = mkLspPresetEnableOption "dart" "Dart" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.deno;
in {
options.vim.lsp.presets.deno = {
enable = mkEnableOption "the Deno Language Server";
enable = mkLspPresetEnableOption "deno" "Deno" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.elixir-ls;
in {
options.vim.lsp.presets.elixir-ls = {
enable = mkEnableOption "the Elixir Language Server";
enable = mkLspPresetEnableOption "elixir-ls" "Elixir" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.elm-language-server;
in {
options.vim.lsp.presets.elm-language-server = {
enable = mkEnableOption "the Elm Language Server";
enable = mkLspPresetEnableOption "elm-language-server" "Elm" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.emmet-ls;
in {
options.vim.lsp.presets.emmet-ls = {
enable = mkEnableOption "the Emmet Language Server";
enable = mkLspPresetEnableOption "emmet-ls" "Emmet" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.fsautocomplete;
in {
options.vim.lsp.presets.fsautocomplete = {
enable = mkEnableOption "the F# Autocomplete Language Server";
enable = mkLspPresetEnableOption "fsautocomplete" "F# Autocomplete" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.gleam;
in {
options.vim.lsp.presets.gleam = {
enable = mkEnableOption "the Gleam Language Server";
enable = mkLspPresetEnableOption "gleam" "Gleam" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.glsl_analyzer;
in {
options.vim.lsp.presets.glsl_analyzer = {
enable = mkEnableOption "the GLSL-Analyzer Language Server";
enable = mkLspPresetEnableOption "glsl_analyzer" "GLSL Analyzer" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.gopls;
in {
options.vim.lsp.presets.gopls = {
enable = mkEnableOption "the official Go Language Server";
enable = mkLspPresetEnableOption "gopls" "Go" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,41 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.harper;
filetypes = [
# <https://writewithharper.com/docs/integrations/language-server#Supported-Languages>
"asciidoc"
"c"
"clojure"
"cmake"
"cpp"
"cs"
"daml"
"dart"
"gitcommit"
"go"
"haskell"
"html"
"ink"
"java"
"javascript"
"javascriptreact"
"kotlin"
"lhaskell"
"lua"
"mail"
"markdown"
"nix"
"php"
"python"
"ruby"
"rust"
];
in {
options.vim.lsp.presets.harper = {
enable = mkEnableOption "the Harper grammar checking LSP";
enable = mkLspPresetEnableOption "harper" "Harper" filetypes;
};
config = mkIf cfg.enable {
@ -19,35 +48,7 @@ in {
enable = true;
cmd = [(getExe pkgs.harper) "--stdio"];
root_markers = [".git" ".harper-dictionary.txt"];
filetypes = [
# <https://writewithharper.com/docs/integrations/language-server#Supported-Languages>
"asciidoc"
"c"
"clojure"
"cmake"
"cpp"
"cs"
"daml"
"dart"
"gitcommit"
"go"
"haskell"
"html"
"ink"
"java"
"javascript"
"javascriptreact"
"kotlin"
"lhaskell"
"lua"
"mail"
"markdown"
"nix"
"php"
"python"
"ruby"
"rust"
];
inherit filetypes;
};
};
}

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.helm-ls;
in {
options.vim.lsp.presets.helm-ls = {
enable = mkEnableOption "the Helm Language Server";
enable = mkLspPresetEnableOption "helm-ls" "Helm" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.intelephense;
in {
options.vim.lsp.presets.intelephense = {
enable = mkEnableOption "the Intelephense Language Server";
enable = mkLspPresetEnableOption "intelephense" "Intelephense" [];
};
config = mkIf cfg.enable {

View file

@ -6,14 +6,14 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryBefore;
cfg = config.vim.lsp.presets.jdt-language-server;
in {
options.vim.lsp.presets.jdt-language-server = {
enable = mkEnableOption "the Eclipse JDT Language Server";
enable = mkLspPresetEnableOption "jdt-language-server" "Eclipse JDT" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.jinja-lsp;
in {
options.vim.lsp.presets.jinja-lsp = {
enable = mkEnableOption "the Jinja Language Server";
enable = mkLspPresetEnableOption "jinja-lsp" "Jinja" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.jq-lsp;
in {
options.vim.lsp.presets.jq-lsp = {
enable = mkEnableOption "the JQ Language Server";
enable = mkLspPresetEnableOption "jq-lsp" "JQ" [];
};
config = mkIf cfg.enable {

View file

@ -6,14 +6,14 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryBefore;
cfg = config.vim.lsp.presets.julia-languageserver;
in {
options.vim.lsp.presets.julia-languageserver = {
enable = mkEnableOption "the Julia Language Server";
enable = mkLspPresetEnableOption "julia-languageserver" "Julia" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.just-lsp;
in {
options.vim.lsp.presets.just-lsp = {
enable = mkEnableOption "the Just Language Server";
enable = mkLspPresetEnableOption "just-lsp" "Just" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.kotlin-language-server;
in {
options.vim.lsp.presets.kotlin-language-server = {
enable = mkEnableOption "the Kotlin Language Server";
enable = mkLspPresetEnableOption "kotlin-language-server" "Kotlin" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.lemminx;
in {
options.vim.lsp.presets.lemminx = {
enable = mkEnableOption "Lemminx Language Server";
enable = mkLspPresetEnableOption "lemminx" "Lemminx" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.lua-language-server;
in {
options.vim.lsp.presets.lua-language-server = {
enable = mkEnableOption "the Lua Language Server";
enable = mkLspPresetEnableOption "lua-language-server" "Lua" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.markdown-oxide;
in {
options.vim.lsp.presets.markdown-oxide = {
enable = mkEnableOption "the Markdown-Oxide Language Server";
enable = mkLspPresetEnableOption "markdown-oxide" "Markdown Oxide" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.marksman;
in {
options.vim.lsp.presets.marksman = {
enable = mkEnableOption "the Marksman Language Server";
enable = mkLspPresetEnableOption "marksman" "Marksman" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.neocmakelsp;
in {
options.vim.lsp.presets.neocmakelsp = {
enable = mkEnableOption "the Neo CMake Language Server";
enable = mkLspPresetEnableOption "neocmakelsp" "NeoCmake" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.nil;
in {
options.vim.lsp.presets.nil = {
enable = mkEnableOption "the Nil Nix Language Server";
enable = mkLspPresetEnableOption "nil" "Nil" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.nimlsp;
in {
options.vim.lsp.presets.nimlsp = {
enable = mkEnableOption "the Nim Language Server";
enable = mkLspPresetEnableOption "nimlsp" "Nim" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.nixd;
in {
options.vim.lsp.presets.nixd = {
enable = mkEnableOption "the NixD Language Server";
enable = mkLspPresetEnableOption "nixd" "Nixd" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.nushell;
in {
options.vim.lsp.presets.nushell = {
enable = mkEnableOption "the NuShell Language Server";
enable = mkLspPresetEnableOption "nushell" "NuShell" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.ocaml-lsp;
in {
options.vim.lsp.presets.ocaml-lsp = {
enable = mkEnableOption "the OCaml Language Server";
enable = mkLspPresetEnableOption "ocaml-lsp" "OCaml" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.ols;
in {
options.vim.lsp.presets.ols = {
enable = mkEnableOption "the Odin Language Server";
enable = mkLspPresetEnableOption "ols" "Odin" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.openscad-lsp;
in {
options.vim.lsp.presets.openscad-lsp = {
enable = mkEnableOption "the Open SCAD Language Server";
enable = mkLspPresetEnableOption "openscad-lsp" "Open SCAD" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.phan;
in {
options.vim.lsp.presets.phan = {
enable = mkEnableOption "the Phan Language Server";
enable = mkLspPresetEnableOption "phan" "Phan" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.phpactor;
in {
options.vim.lsp.presets.phpactor = {
enable = mkEnableOption "the PHPActor Language Server";
enable = mkLspPresetEnableOption "phpactor" "PHPActor" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.pyrefly;
in {
options.vim.lsp.presets.pyrefly = {
enable = mkEnableOption "the Pyrefly Language Server";
enable = mkLspPresetEnableOption "pyrefly" "Pyrefly" [];
};
config = mkIf cfg.enable {

View file

@ -6,14 +6,14 @@
}: let
inherit (lib.meta) getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryBefore;
cfg = config.vim.lsp.presets.pyright;
in {
options.vim.lsp.presets.pyright = {
enable = mkEnableOption "the Pyright Language Server";
enable = mkLspPresetEnableOption "pyright" "Pyright" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.python-lsp-server;
in {
options.vim.lsp.presets.python-lsp-server = {
enable = mkEnableOption "the Python Language Server";
enable = mkLspPresetEnableOption "python-lsp-server" "Python" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.qmlls;
in {
options.vim.lsp.presets.qmlls = {
enable = mkEnableOption "the QML Language Server";
enable = mkLspPresetEnableOption "qmlls" "QML" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.r-languageserver;
in {
options.vim.lsp.presets.r-languageserver = {
enable = mkEnableOption "the R Language Server";
enable = mkLspPresetEnableOption "r-languageserver" "R" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.ruby-lsp;
in {
options.vim.lsp.presets.ruby-lsp = {
enable = mkEnableOption "the Ruby Language Server";
enable = mkLspPresetEnableOption "ruby-lsp" "Ruby" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.ruff;
in {
options.vim.lsp.presets.ruff = {
enable = mkEnableOption "the Ruff Python Language Server";
enable = mkLspPresetEnableOption "ruff" "Ruff" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.rumdl;
in {
options.vim.lsp.presets.rumdl = {
enable = mkEnableOption "the Rumdl Language Server";
enable = mkLspPresetEnableOption "rumdl" "Rumdl" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.solargraph;
in {
options.vim.lsp.presets.solargraph = {
enable = mkEnableOption "the Ruby Solargraph Language Server";
enable = mkLspPresetEnableOption "solargraph" "Solargraph" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.sqls;
in {
options.vim.lsp.presets.sqls = {
enable = mkEnableOption "the SQL Language Server";
enable = mkLspPresetEnableOption "sqls" "SQL" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.superhtml;
in {
options.vim.lsp.presets.superhtml = {
enable = mkEnableOption "the SuperHTML Language Server";
enable = mkLspPresetEnableOption "superhtml" "SuperHTML" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.svelte-language-server;
in {
options.vim.lsp.presets.svelte-language-server = {
enable = mkEnableOption "the Svelete Language Server";
enable = mkLspPresetEnableOption "svelte-language-server" "Svelte" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,70 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.tailwindcss-language-server;
filetypes = [
# html
"aspnetcorerazor"
"astro"
"astro-markdown"
"blade"
"clojure"
"django-html"
"htmldjango"
"edge"
"eelixir"
"elixir"
"ejs"
"erb"
"eruby"
"gohtml"
"gohtmltmpl"
"haml"
"handlebars"
"hbs"
"html"
"htmlangular"
"html-eex"
"heex"
"jade"
"leaf"
"liquid"
"markdown"
"mdx"
"mustache"
"njk"
"nunjucks"
"php"
"razor"
"slim"
"twig"
# css
"css"
"less"
"postcss"
"sass"
"scss"
"stylus"
"sugarss"
# js
"javascript"
"javascriptreact"
"reason"
"rescript"
"typescript"
"typescriptreact"
# mixed
"vue"
"svelte"
"templ"
];
in {
options.vim.lsp.presets.tailwindcss-language-server = {
enable = mkEnableOption "the Tailwind CSS Language Server";
enable = mkLspPresetEnableOption "tailwindcss-language-server" "Tailwind CSS" filetypes;
};
config = mkIf cfg.enable {
@ -20,62 +77,7 @@ in {
enable = true;
cmd = [(getExe pkgs.tailwindcss-language-server) "--stdio"];
root_markers = [".git"];
filetypes = [
# html
"aspnetcorerazor"
"astro"
"astro-markdown"
"blade"
"clojure"
"django-html"
"htmldjango"
"edge"
"eelixir"
"elixir"
"ejs"
"erb"
"eruby"
"gohtml"
"gohtmltmpl"
"haml"
"handlebars"
"hbs"
"html"
"htmlangular"
"html-eex"
"heex"
"jade"
"leaf"
"liquid"
"markdown"
"mdx"
"mustache"
"njk"
"nunjucks"
"php"
"razor"
"slim"
"twig"
# css
"css"
"less"
"postcss"
"sass"
"scss"
"stylus"
"sugarss"
# js
"javascript"
"javascriptreact"
"reason"
"rescript"
"typescript"
"typescriptreact"
# mixed
"vue"
"svelte"
"templ"
];
inherit filetypes;
settings = {
tailwindCSS = {
validate = true;

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.taplo;
in {
options.vim.lsp.presets.taplo = {
enable = mkEnableOption "the Taplo Language Server";
enable = mkLspPresetEnableOption "taplo" "Taplo" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.terraform-ls;
in {
options.vim.lsp.presets.terraform-ls = {
enable = mkEnableOption "the Terraform Language Server";
enable = mkLspPresetEnableOption "terrraform-ls" "Terraform" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.texlab;
in {
options.vim.lsp.presets.texlab = {
enable = mkEnableOption "the TeXLab Language Server";
enable = mkLspPresetEnableOption "texlab" "TeXLab" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.tinymist;
in {
options.vim.lsp.presets.tinymist = {
enable = mkEnableOption "Tinymist Language Server";
enable = mkLspPresetEnableOption "tinymist" "Tinymist" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.tofu-ls;
in {
options.vim.lsp.presets.tofu-ls = {
enable = mkEnableOption "the OpenTofu Language Server";
enable = mkLspPresetEnableOption "tofu-ls" "OpenTofu" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.tombi;
in {
options.vim.lsp.presets.tombi = {
enable = mkEnableOption "the Tombi Language Server (AI Slop)";
enable = mkLspPresetEnableOption "tombi" "Tombi (AI Slop)" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.twig-language-server;
in {
options.vim.lsp.presets.twig-language-server = {
enable = mkEnableOption "Twig Language Server";
enable = mkLspPresetEnableOption "twig-language-server" "Twig" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.ty;
in {
options.vim.lsp.presets.ty = {
enable = mkEnableOption "the ty Python Language Server";
enable = mkLspPresetEnableOption "ty" "ty" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.typescript-go;
in {
options.vim.lsp.presets.typescript-go = {
enable = mkEnableOption "the experimental Typescript Go Language Server";
enable = mkLspPresetEnableOption "typescript-go" "experimental TypeScript Go" [];
};
config = mkIf cfg.enable {

View file

@ -6,13 +6,13 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.lsp.presets.typescript-language-server;
in {
options.vim.lsp.presets.typescript-language-server = {
enable = mkEnableOption "the Typescript Language Server";
enable = mkLspPresetEnableOption "typescript-language-server" "TypeScript" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.vala-language-server;
in {
options.vim.lsp.presets.vala-language-server = {
enable = mkEnableOption "the Vala Language Server";
enable = mkLspPresetEnableOption "vala-language-server" "Vala" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.vscode-css-language-server;
in {
options.vim.lsp.presets.vscode-css-language-server = {
enable = mkEnableOption "the VSCode CSS Language Server";
enable = mkLspPresetEnableOption "vscode-css-language-server" "VSCode CSS" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.vscode-json-language-server;
in {
options.vim.lsp.presets.vscode-json-language-server = {
enable = mkEnableOption "the VSCode JSON Language Server";
enable = mkLspPresetEnableOption "vscode-json-language-server" "VSCode JSON" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.wgsl-analyzer;
in {
options.vim.lsp.presets.wgsl-analyzer = {
enable = mkEnableOption "the WGSL-Analyzer Language Server";
enable = mkLspPresetEnableOption "wgsl-analyzer" "WGSL Analyzer" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.yaml-language-server;
in {
options.vim.lsp.presets.yaml-language-server = {
enable = mkEnableOption "the YAML Language Server";
enable = mkLspPresetEnableOption "yaml-language-server" "YAML" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.zls;
in {
options.vim.lsp.presets.zls = {
enable = mkEnableOption "the Zig Language Server";
enable = mkLspPresetEnableOption "zls" "Zig" [];
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,12 @@
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.zuban;
in {
options.vim.lsp.presets.zuban = {
enable = mkEnableOption "the Zuban Python Language Server";
enable = mkLspPresetEnableOption "zuban" "Zuban" [];
};
config = mkIf cfg.enable {