feat (home/helix): menhir development
This commit is contained in:
parent
f4bc66ab82
commit
715a26a6fe
1 changed files with 42 additions and 0 deletions
|
|
@ -1,4 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
tree-sitter-url = "https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/692b051b09935653befdb8f7ba8afdb640adf17b/runtime/queries/menhir/";
|
||||
in
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
|
|
@ -31,6 +34,13 @@
|
|||
environment.RUST_LOG = "info,simple-completion-language-server=info";
|
||||
environment.LOG_FILE = "/tmp/completion.log";
|
||||
};
|
||||
language-server.ocamllsp = {
|
||||
command = "ocamllsp";
|
||||
args = [ "--fallback-read-dot-merlin" ];
|
||||
};
|
||||
language-server.menhir-lsp = {
|
||||
command = "menhir-lsp";
|
||||
};
|
||||
language = [
|
||||
{
|
||||
name = "typst";
|
||||
|
|
@ -39,6 +49,24 @@
|
|||
"scls"
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "menhir";
|
||||
file-types = [ "mly" ];
|
||||
language-servers = [
|
||||
"menhir-lsp"
|
||||
"ocamllsp"
|
||||
];
|
||||
scope = "source.menhir";
|
||||
}
|
||||
];
|
||||
grammar = [
|
||||
{
|
||||
name = "menhir";
|
||||
source = {
|
||||
git = "https://github.com/Kerl13/tree-sitter-menhir";
|
||||
rev = "be8866a6bcc2b563ab0de895af69daeffa88fe70";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
|
|
@ -52,4 +80,18 @@
|
|||
target = ".config/helix/unicode-input/base.toml";
|
||||
source = ./base.toml;
|
||||
};
|
||||
home.file.helix-menhir-queries-highlights = {
|
||||
target = ".config/helix/runtime/queries/menhir/highlights.scm";
|
||||
source = pkgs.fetchurl {
|
||||
url = tree-sitter-url + "highlights.scm";
|
||||
sha256 = "1pgn6prbday0vf82g27l01233ng7i5h95vmijs65r7ynb021grkl";
|
||||
};
|
||||
};
|
||||
home.file.helix-menhir-queries-injections = {
|
||||
target = ".config/helix/runtime/queries/menhir/injections.scm";
|
||||
source = pkgs.fetchurl {
|
||||
url = tree-sitter-url + "injections.scm";
|
||||
sha256 = "1m29zbrgrk29imha6lpn7an2c4198fi1a8l1q85ibnp5y8ds0v5v";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue