mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 13:02:28 +08:00
Add rnix-lsp for Nix diagnostics and completion
This commit is contained in:
16
ale_linters/nix/rnix_lsp.vim
Normal file
16
ale_linters/nix/rnix_lsp.vim
Normal 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'),
|
||||
\})
|
||||
Reference in New Issue
Block a user