Skip to content

Commit

Permalink
wip: add vim language server (and hopefully grammar)
Browse files Browse the repository at this point in the history
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
llakala committed Nov 15, 2024
1 parent 10bffa1 commit d96cff8
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions apps/cli/helix/vim.nix
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";
};
}

0 comments on commit d96cff8

Please sign in to comment.