X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/nix/rnix_lsp.vim diff --git a/.vim/bundle/ale/ale_linters/nix/rnix_lsp.vim b/.vim/bundle/ale/ale_linters/nix/rnix_lsp.vim new file mode 100644 index 00000000..99c0fbfa --- /dev/null +++ b/.vim/bundle/ale/ale_linters/nix/rnix_lsp.vim @@ -0,0 +1,17 @@ +" Author: jD91mZM2 +" 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', +\ 'aliases': ['rnix'], +\ 'lsp': 'stdio', +\ 'executable': 'rnix-lsp', +\ 'command': '%e', +\ 'project_root': function('ale_linters#nix#rnix_lsp#GetProjectRoot'), +\})