mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-25 11:07:27 +08:00
VSCode LSPs for CSS, HTML and JSON (#4175)
Switched to `vscode-langservers-extracted` as it is the one most up-to-date.
This commit is contained in:
committed by
GitHub
parent
34892186e4
commit
56399106fc
16
ale_linters/css/vscodecss.vim
Normal file
16
ale_linters/css/vscodecss.vim
Normal file
@@ -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'),
|
||||
\})
|
||||
Reference in New Issue
Block a user