summaryrefslogtreecommitdiff
path: root/ale_linters/nix/rnix_lsp.vim
blob: 949bed1c489559c60611c043e4693a154a7f2b0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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'),
\})