From 56399106fcf9d80d476307576bc307e67f0167e2 Mon Sep 17 00:00:00 2001 From: Dalius Dobravolskas Date: Mon, 2 May 2022 13:42:24 +0300 Subject: VSCode LSPs for CSS, HTML and JSON (#4175) Switched to `vscode-langservers-extracted` as it is the one most up-to-date. --- ale_linters/css/vscodecss.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ale_linters/css/vscodecss.vim (limited to 'ale_linters/css') 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 +" 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'), +\}) -- cgit v1.2.3