mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-03 10:03:47 +08:00
Add support for c3-lsp linter (#4836)
* Add support for c3-lsp linter Add support for c3-lang with the c3-lsp language server. Link: http://github.com/pherrymason/c3-lsp Link: http://c3-lang.org * fix linter error * fix: consistent use of the executable name Consistently use the executable name 'c3lsp' instead of the project name 'c3-lsp'. * c3lsp: add command line arguments to executable
This commit is contained in:
19
autoload/ale/handlers/c3lsp.vim
Normal file
19
autoload/ale/handlers/c3lsp.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
scriptencoding utf-8
|
||||
" Author: Koni Marti <koni.marti@gmail.com>
|
||||
" Description: Utilities for c3lsp
|
||||
|
||||
function! ale#handlers#c3lsp#GetProjectRoot(buffer) abort
|
||||
let l:config = ale#path#FindNearestFile(a:buffer, 'project.json')
|
||||
|
||||
if !empty(l:config)
|
||||
return fnamemodify(l:config, ':h')
|
||||
endif
|
||||
|
||||
return expand('#' . a:buffer . ':p:h')
|
||||
endfunction
|
||||
|
||||
function! ale#handlers#c3lsp#GetInitOpts(buffer, init_options_var) abort
|
||||
let l:init_options = {}
|
||||
|
||||
return extend(l:init_options, ale#Var(a:buffer, a:init_options_var))
|
||||
endfunction
|
||||
Reference in New Issue
Block a user