mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-09 03:01:31 +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/html/vscodehtml.vim
Normal file
16
ale_linters/html/vscodehtml.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
" Author: Dalius Dobravolskas <dalius.dobravolskas@gmail.com>
|
||||
" Description: VSCode html language server
|
||||
|
||||
function! ale_linters#html#vscodehtml#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('html', {
|
||||
\ 'name': 'vscodehtml',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': 'vscode-html-language-server',
|
||||
\ 'command': '%e --stdio',
|
||||
\ 'project_root': function('ale_linters#html#vscodehtml#GetProjectRoot'),
|
||||
\})
|
||||
Reference in New Issue
Block a user