-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: add vim language server (and hopefully grammar)
Closes #86 We have the language server working, but no luck yet on the grammar. May require PRing into Helix to add it, but it'd be difficult to get working if I can't have it working on my machine.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ pkgs, lib, ... }: | ||
|
||
let | ||
url = "https://github.com/tree-sitter-grammars/tree-sitter-vim"; | ||
rev = "f3cd62d8bd043ef20507e84bb6b4b53731ccf3a7"; | ||
in | ||
{ | ||
hm.programs.helix.languages.grammar = lib.singleton | ||
{ | ||
name = "vim"; | ||
source = | ||
{ | ||
git = url; | ||
inherit rev; | ||
}; | ||
}; | ||
|
||
hm.programs.helix.languages.language = lib.singleton | ||
{ | ||
name = "vim"; | ||
scope = "source.vim"; | ||
file-types = | ||
[ | ||
"vim" | ||
{ | ||
glob = ".vimrc"; | ||
} | ||
]; | ||
roots = lib.singleton "addon-info.json"; | ||
comment-token = "\""; | ||
language-servers = lib.singleton | ||
{ | ||
name = "vim-language-server"; | ||
}; | ||
}; | ||
|
||
hm.programs.helix.languages.language-server.vim-language-server = | ||
{ | ||
command = lib.getExe pkgs.vim-language-server; | ||
args = lib.singleton "--stdio"; | ||
}; | ||
} |