Merge pull request #3556 from jD91mZM2/rnix

Add rnix-lsp for Nix diagnostics and completion
This commit is contained in:
Horacio Sanson authored and GitHub committed 2021-01-23 21:50:36 +09:00
commit 9fd9435cd5
5 files changed
+32

No files matched your search

+16
View File
@@ -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'),
\})