mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-28 05:54:28 +00:00
languages/toml: add taplo (#1386)
This commit is contained in:
parent
ace53a0cee
commit
08558dd9db
2 changed files with 27 additions and 3 deletions
|
|
@ -45,6 +45,9 @@
|
||||||
allow valid options. `default` is no longer valid. `inline` and `split` are
|
allow valid options. `default` is no longer valid. `inline` and `split` are
|
||||||
two new valid options.
|
two new valid options.
|
||||||
|
|
||||||
|
- Added [taplo](https://taplo.tamasfe.dev/) as the default formatter and lsp for
|
||||||
|
`languages.toml` so we don't default to AI-Slop.
|
||||||
|
|
||||||
## Changelog {#sec-release-0-9-changelog}
|
## Changelog {#sec-release-0-9-changelog}
|
||||||
|
|
||||||
[taylrfnt](https://github.com/taylrfnt)
|
[taylrfnt](https://github.com/taylrfnt)
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.types) bool enum;
|
inherit (lib.types) enum;
|
||||||
inherit (lib.nvim.types) diagnostics mkGrammarOption deprecatedSingleOrListOf;
|
inherit (lib.nvim.types) diagnostics mkGrammarOption deprecatedSingleOrListOf;
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
|
|
||||||
cfg = config.vim.languages.toml;
|
cfg = config.vim.languages.toml;
|
||||||
defaultServers = ["tombi"];
|
defaultServers = ["taplo"];
|
||||||
servers = {
|
servers = {
|
||||||
tombi = {
|
tombi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -27,9 +27,21 @@
|
||||||
".git"
|
".git"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
taplo = {
|
||||||
|
enable = true;
|
||||||
|
cmd = [
|
||||||
|
(getExe pkgs.taplo)
|
||||||
|
"lsp"
|
||||||
|
"stdio"
|
||||||
|
];
|
||||||
|
filetypes = ["toml"];
|
||||||
|
root_markers = [
|
||||||
|
".git"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultFormat = ["tombi"];
|
defaultFormat = ["taplo"];
|
||||||
formats = {
|
formats = {
|
||||||
tombi = {
|
tombi = {
|
||||||
command = getExe pkgs.tombi;
|
command = getExe pkgs.tombi;
|
||||||
|
|
@ -40,6 +52,15 @@
|
||||||
"-"
|
"-"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
taplo = {
|
||||||
|
command = getExe pkgs.taplo;
|
||||||
|
args = [
|
||||||
|
"format"
|
||||||
|
"--stdin-filepath"
|
||||||
|
"$FILENAME"
|
||||||
|
"-"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
defaultDiagnosticsProvider = ["tombi"];
|
defaultDiagnosticsProvider = ["tombi"];
|
||||||
diagnosticsProviders = {
|
diagnosticsProviders = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue