X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/c3/c3lsp.vim?ds=sidebyside diff --git a/.vim/bundle/ale/ale_linters/c3/c3lsp.vim b/.vim/bundle/ale/ale_linters/c3/c3lsp.vim new file mode 100644 index 00000000..43cd89d8 --- /dev/null +++ b/.vim/bundle/ale/ale_linters/c3/c3lsp.vim @@ -0,0 +1,22 @@ +" Author: Koni Marti +" Description: A Language Server implementation for C3 + +call ale#Set('c3_c3lsp_executable', 'c3lsp') +call ale#Set('c3_c3lsp_options', '') +call ale#Set('c3_c3lsp_init_options', {}) + +function! ale_linters#c3#c3lsp#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'c3_c3lsp_executable') + + return ale#Escape(l:executable) . ale#Pad(ale#Var(a:buffer, 'c3_c3lsp_options')) +endfunction + + +call ale#linter#Define('c3', { +\ 'name': 'c3lsp', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'c3_c3lsp_executable')}, +\ 'command': function('ale_linters#c3#c3lsp#GetCommand'), +\ 'project_root': function('ale#handlers#c3lsp#GetProjectRoot'), +\ 'lsp_config': {b -> ale#handlers#c3lsp#GetInitOpts(b, 'c3_c3lsp_init_options')}, +\})