vim extension

This commit is contained in:
Michael Zhang 2022-07-19 01:41:30 -05:00
parent 215683173e
commit 1336d860dc
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
5 changed files with 19 additions and 2 deletions

8
ext/e0-vim/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ vimUtils }:
with vimUtils;
buildVimPlugin {
name = "e0-vim";
src = ./.;
}

View file

@ -0,0 +1,2 @@
" Automatic detection of *.e0 files
autocmd BufNewFile,BufRead *.e0 setfiletype e0

View file

4
ext/e0-vim/syntax/e0.vim Normal file
View file

@ -0,0 +1,4 @@
syntax keyword e0Conditional if else
syntax keyword e0PrimitiveType int
syntax keyword e0Function fn
syntax keyword e0Statement return

View file

@ -13,7 +13,10 @@
overlays = [ fenix.overlay ];
};
toolchain = pkgs.fenix.complete;
myPkgs = rec { e0 = pkgs.callPackage ./. { inherit toolchain; }; };
myPkgs = rec {
e0 = pkgs.callPackage ./. { inherit toolchain; };
e0-vim = pkgs.callPackage ./ext/e0-vim { };
};
in rec {
devShell = pkgs.mkShell {
@ -31,7 +34,7 @@
"rustfmt"
])
];
inputsFrom = with myPkgs; [ e0 ];
inputsFrom = with myPkgs; [ e0 e0-vim ];
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
};