summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-09-19 15:40:10 +0100
committerGitHub <noreply@github.com>2018-09-19 15:40:10 +0100
commit9d50a06d489ddee8fa60b711f302ae83a25fb4d5 (patch)
treece0ee1e0c38104885f73937171a00688103137af
parentb2789271023d18171b4664c333238120b1296d5f (diff)
parentd50e60317738bdf203619d321c1b14b0ac53f315 (diff)
downloadale-9d50a06d489ddee8fa60b711f302ae83a25fb4d5.zip
Merge pull request #1937 from danielwe/master
Support both old (<0.7) and new Julia versions
-rw-r--r--ale_linters/julia/languageserver.vim2
-rw-r--r--test/command_callback/test_julia_languageserver_callbacks.vader4
2 files changed, 3 insertions, 3 deletions
diff --git a/ale_linters/julia/languageserver.vim b/ale_linters/julia/languageserver.vim
index b5d90bff..cd2000de 100644
--- a/ale_linters/julia/languageserver.vim
+++ b/ale_linters/julia/languageserver.vim
@@ -6,7 +6,7 @@ call ale#Set('julia_executable', 'julia')
function! ale_linters#julia#languageserver#GetCommand(buffer) abort
let l:julia_executable = ale#Var(a:buffer, 'julia_executable')
- let l:cmd_string = 'using LanguageServer; server = LanguageServer.LanguageServerInstance(stdin, stdout, false); server.runlinter = true; run(server);'
+ let l:cmd_string = 'using LanguageServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, false); server.runlinter = true; run(server);'
return ale#Escape(l:julia_executable) . ' --startup-file=no --history-file=no -e ' . ale#Escape(l:cmd_string)
endfunction
diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader
index 22c6cefe..3bc46e3d 100644
--- a/test/command_callback/test_julia_languageserver_callbacks.vader
+++ b/test/command_callback/test_julia_languageserver_callbacks.vader
@@ -12,7 +12,7 @@ Execute(The default executable path should be correct):
AssertLinter 'julia',
\ ale#Escape('julia') .
\' --startup-file=no --history-file=no -e ' .
- \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(stdin, stdout, false); server.runlinter = true; run(server);')
+ \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, false); server.runlinter = true; run(server);')
Execute(The executable should be configurable):
let g:ale_julia_executable = 'julia-new'
@@ -20,7 +20,7 @@ Execute(The executable should be configurable):
AssertLinter 'julia-new',
\ ale#Escape('julia-new') .
\' --startup-file=no --history-file=no -e ' .
- \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(stdin, stdout, false); server.runlinter = true; run(server);')
+ \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, false); server.runlinter = true; run(server);')
Execute(The project root should be detected correctly):
AssertLSPProject ''