diff options
author | Benjamin Block <benjamindblock@gmail.com> | 2024-02-22 02:12:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 11:12:57 +0900 |
commit | 8b8ddea6e59eabba86f21f1eff09336d98cf928d (patch) | |
tree | f5170daed5ffbce04610b575e14f491702f17b29 /ale_linters | |
parent | 38c31302da0414c74cabfc6fbefc5d1bf5183fc1 (diff) | |
download | ale-8b8ddea6e59eabba86f21f1eff09336d98cf928d.zip |
Adding support for Odin language server (ols). (#4679)
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/odin/ols.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ale_linters/odin/ols.vim b/ale_linters/odin/ols.vim new file mode 100644 index 00000000..242dea0e --- /dev/null +++ b/ale_linters/odin/ols.vim @@ -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'), +\}) |