summaryrefslogtreecommitdiff
path: root/ale_linters/julia/languageserver.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/julia/languageserver.vim')
-rw-r--r--ale_linters/julia/languageserver.vim22
1 files changed, 4 insertions, 18 deletions
diff --git a/ale_linters/julia/languageserver.vim b/ale_linters/julia/languageserver.vim
index 1755c794..d59e9959 100644
--- a/ale_linters/julia/languageserver.vim
+++ b/ale_linters/julia/languageserver.vim
@@ -1,30 +1,16 @@
" Author: Bartolomeo Stellato <bartolomeo.stellato@gmail.com>
" Description: A language server for Julia
-call ale#Set('julia_languageserver_executable', 'julia')
-call ale#Set('julia_languageserver_use_global', get(g:, 'ale_use_global_executables', 0))
-
-function! ale_linters#julia#languageserver#GetExecutable(buffer) abort
- let l:binary = ale#Var(a:buffer, 'julia_languageserver_executable')
- return ale#Escape(l:binary)
-endfunction
-
function! ale_linters#julia#languageserver#GetCommand(buffer) abort
- let l:executable = ale_linters#julia#languageserver#GetExecutable(a:buffer)
- let l:options = '--startup-file=no --history-file=no -e ' . '"
-\ using LanguageServer;
-\ server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false);
-\ server.runlinter = true;
-\ run(server);"'
-
- return ale#Escape(l:executable) . ale#Escape(l:options)
-
+ let l:julia_executable = ale#Var(a:buffer, 'julia_executable')
+ return ale#Escape(l:julia_executable) . ale#Escape("--startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'")
endfunction
call ale#linter#Define('julia', {
\ 'name': 'languageserver',
\ 'lsp': 'stdio',
-\ 'executable_callback': 'ale_linters#julia#languageserver#GetExecutable',
+\ 'executable_callback': ale#VarFunc('julia_executable'),
\ 'command_callback': 'ale_linters#julia#languageserver#GetCommand',
+\ 'language': 'julia',
\ 'project_root_callback': 'ale#julia#FindProjectRoot',
\})