langauges: add defaultText to all values dependent on toggles
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Idf55a40882e53006048fdd876c869f906a6a6964
This commit is contained in:
raf 2026-03-12 09:52:03 +03:00
commit c56ec752ba
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
55 changed files with 895 additions and 196 deletions

View file

@ -6,7 +6,7 @@
}: let
inherit (builtins) attrNames;
inherit (lib.meta) getExe;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.options) literalExpression mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) bool enum;
inherit (lib.lists) optional;
@ -48,7 +48,12 @@ in {
options.vim.languages.html = {
enable = mkEnableOption "HTML language support";
treesitter = {
enable = mkEnableOption "HTML treesitter support" // {default = config.vim.languages.enableTreesitter;};
enable =
mkEnableOption "HTML treesitter support"
// {
default = config.vim.languages.enableTreesitter;
defaultText = literalExpression "config.vim.languages.enableTreesitter";
};
package = mkGrammarOption pkgs "html";
autotagHtml = mkOption {
type = bool;
@ -58,7 +63,12 @@ in {
};
lsp = {
enable = mkEnableOption "HTML LSP support" // {default = config.vim.lsp.enable;};
enable =
mkEnableOption "HTML LSP support"
// {
default = config.vim.lsp.enable;
defaultText = literalExpression "config.vim.lsp.enable";
};
servers = mkOption {
type = deprecatedSingleOrListOf "vim.language.html.lsp.servers" (enum (attrNames servers));
default = defaultServers;
@ -67,7 +77,12 @@ in {
};
format = {
enable = mkEnableOption "HTML formatting" // {default = config.vim.languages.enableFormat;};
enable =
mkEnableOption "HTML formatting"
// {
default = config.vim.languages.enableFormat;
defaultText = literalExpression "config.vim.languages.enableFormat";
};
type = mkOption {
type = deprecatedSingleOrListOf "vim.language.html.format.type" (enum (attrNames formats));
@ -77,7 +92,12 @@ in {
};
extraDiagnostics = {
enable = mkEnableOption "extra HTML diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
enable =
mkEnableOption "extra HTML diagnostics"
// {
default = config.vim.languages.enableExtraDiagnostics;
defaultText = literalExpression "config.vim.languages.enableExtraDiagnostics";
};
types = diagnostics {
langDesc = "HTML";