mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
19
sources_non_forked/ale/ale_linters/odin/ols.vim
Normal file
19
sources_non_forked/ale/ale_linters/odin/ols.vim
Normal file
@ -0,0 +1,19 @@
|
||||
" 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'),
|
||||
\})
|
Reference in New Issue
Block a user