mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-05 11:25:52 +00:00
Merge 9834eb3324 into 92854bd0ea
This commit is contained in:
commit
985beb1cc5
3 changed files with 47 additions and 2 deletions
|
|
@ -174,6 +174,9 @@
|
||||||
|
|
||||||
- Added Makefile support via `languages.make`.
|
- Added Makefile support via `languages.make`.
|
||||||
|
|
||||||
|
- Added config option to [harper-ls](https://github.com/Automattic/harper) to
|
||||||
|
limit it to supported filetypes.
|
||||||
|
|
||||||
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
||||||
https://github.com/gorbit99/codewindow.nvim
|
https://github.com/gorbit99/codewindow.nvim
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,10 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable && cfg.harper-ls.enable) {
|
config = mkIf (cfg.enable && cfg.harper-ls.enable) {
|
||||||
vim.lsp.servers.harper-ls = {
|
vim.lsp.servers.harper-ls = {
|
||||||
root_markers = [".git"];
|
root_markers = [".git" ".harper-dictionary.txt"];
|
||||||
cmd = [(getExe pkgs.harper) "--stdio"];
|
cmd = [(getExe pkgs.harper) "--stdio"];
|
||||||
settings = {harper-ls = cfg.harper-ls.settings;};
|
settings = {harper-ls = cfg.harper-ls.settings;};
|
||||||
|
filetypes = cfg.harper-ls.filetypes;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
inherit (lib.types) anything attrsOf;
|
inherit (lib.types) anything attrsOf nullOr listOf str;
|
||||||
in {
|
in {
|
||||||
options.vim.lsp.harper-ls = {
|
options.vim.lsp.harper-ls = {
|
||||||
enable = mkEnableOption "Harper grammar checking LSP";
|
enable = mkEnableOption "Harper grammar checking LSP";
|
||||||
|
|
@ -31,5 +31,46 @@ in {
|
||||||
};
|
};
|
||||||
description = "Settings to pass to harper-ls";
|
description = "Settings to pass to harper-ls";
|
||||||
};
|
};
|
||||||
|
filetypes = mkOption {
|
||||||
|
type = nullOr (listOf str);
|
||||||
|
# <https://writewithharper.com/docs/integrations/language-server#Supported-Languages>
|
||||||
|
default = [
|
||||||
|
"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"
|
||||||
|
"scala"
|
||||||
|
"sh"
|
||||||
|
"swift"
|
||||||
|
"text"
|
||||||
|
"toml"
|
||||||
|
"typescript"
|
||||||
|
"typescriptreact"
|
||||||
|
"typst"
|
||||||
|
];
|
||||||
|
description = "Filetypes to auto-attach LSP server in";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue