2021-01-22 16:29:51 +00:00
|
|
|
" 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',
|
2023-09-13 23:38:12 +00:00
|
|
|
\ 'aliases': ['rnix'],
|
2021-01-22 16:29:51 +00:00
|
|
|
\ 'lsp': 'stdio',
|
|
|
|
\ 'executable': 'rnix-lsp',
|
|
|
|
\ 'command': '%e',
|
|
|
|
\ 'project_root': function('ale_linters#nix#rnix_lsp#GetProjectRoot'),
|
|
|
|
\})
|