From df72c5f1c11726a8db2c9c22fa579ee59238d0aa Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Fri, 7 Sep 2018 11:11:29 -0400 Subject: Added various files to integrate julia. Still not working. --- ale_linters/julia/languageserver.vim | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'ale_linters/julia/languageserver.vim') 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 " 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', \}) -- cgit v1.2.3