diff options
Diffstat (limited to 'ale_linters/nix/rnix_lsp.vim')
-rw-r--r-- | ale_linters/nix/rnix_lsp.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ale_linters/nix/rnix_lsp.vim b/ale_linters/nix/rnix_lsp.vim new file mode 100644 index 00000000..949bed1c --- /dev/null +++ b/ale_linters/nix/rnix_lsp.vim @@ -0,0 +1,16 @@ +" Author: jD91mZM2 <me@krake.one> +" Description: rnix-lsp language client + +function! ale_linters#nix#rnix_lsp#GetProjectRoot(buffer) abort + " rnix-lsp does not yet use the project root, so getting it right is not + " important + return fnamemodify(a:buffer, ':h') +endfunction + +call ale#linter#Define('nix', { +\ 'name': 'rnix_lsp', +\ 'lsp': 'stdio', +\ 'executable': 'rnix-lsp', +\ 'command': '%e', +\ 'project_root': function('ale_linters#nix#rnix_lsp#GetProjectRoot'), +\}) |