diff options
Diffstat (limited to 'ale_linters/css')
-rw-r--r-- | ale_linters/css/vscodecss.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ale_linters/css/vscodecss.vim b/ale_linters/css/vscodecss.vim new file mode 100644 index 00000000..2d59adf0 --- /dev/null +++ b/ale_linters/css/vscodecss.vim @@ -0,0 +1,16 @@ +" Author: Dalius Dobravolskas <dalius.dobravolskas@gmail.com> +" Description: VSCode css language server + +function! ale_linters#css#vscodecss#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('css', { +\ 'name': 'vscodecss', +\ 'lsp': 'stdio', +\ 'executable': 'vscode-css-language-server', +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#css#vscodecss#GetProjectRoot'), +\}) |