mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Update Ale.
This commit is contained in:
5
sources_non_forked/ale/ale_linters/css/cspell.vim
Normal file
5
sources_non_forked/ale/ale_linters/css/cspell.vim
Normal file
@ -0,0 +1,5 @@
|
||||
scriptencoding utf-8
|
||||
" Author: David Houston <houstdav000>
|
||||
" Description: cspell support for CSS files.
|
||||
|
||||
call ale#handlers#cspell#DefineLinter('css')
|
16
sources_non_forked/ale/ale_linters/css/vscodecss.vim
Normal file
16
sources_non_forked/ale/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