diff options
author | Dalius Dobravolskas <dalius.dobravolskas@gmail.com> | 2022-05-02 13:42:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 19:42:24 +0900 |
commit | 56399106fcf9d80d476307576bc307e67f0167e2 (patch) | |
tree | 0a66e044096af24c8b685a0d9a5c619d6f57bbca /ale_linters/css | |
parent | 34892186e44b21356c84e1c2e019f96a304c3edc (diff) | |
download | ale-56399106fcf9d80d476307576bc307e67f0167e2.zip |
VSCode LSPs for CSS, HTML and JSON (#4175)
Switched to `vscode-langservers-extracted` as it is the one most
up-to-date.
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'), +\}) |