1
0
Fork 0
mirror of synced 2024-10-18 09:49:00 -04:00
ultimate-vim/sources_non_forked/ale/ale_linters/odin/ols.vim

20 lines
597 B
VimL
Raw Normal View History

2024-10-06 04:25:50 -04:00
" Author: Benjamin Block <https://github.com/benjamindblock>
" Description: A language server for Odin.
function! ale_linters#odin#ols#GetProjectRoot(buffer) abort
return fnamemodify('', ':h')
endfunction
call ale#Set('odin_ols_executable', 'ols')
call ale#Set('odin_ols_config', {})
call ale#linter#Define('odin', {
\ 'name': 'ols',
\ 'lsp': 'stdio',
\ 'language': 'odin',
\ 'lsp_config': {b -> ale#Var(b, 'odin_ols_config')},
\ 'executable': {b -> ale#Var(b, 'odin_ols_executable')},
\ 'command': '%e',
\ 'project_root': function('ale_linters#odin#ols#GetProjectRoot'),
\})