diff options
-rw-r--r-- | ale_linters/julia/languageserver.vim | 3 | ||||
-rw-r--r-- | autoload/ale/julia.vim | 7 | ||||
-rw-r--r-- | test/command_callback/test_julia_languageserver_callbacks.vader | 4 |
3 files changed, 6 insertions, 8 deletions
diff --git a/ale_linters/julia/languageserver.vim b/ale_linters/julia/languageserver.vim index c5cd063a..87c3030f 100644 --- a/ale_linters/julia/languageserver.vim +++ b/ale_linters/julia/languageserver.vim @@ -6,7 +6,8 @@ call ale#Set('julia_executable', 'julia') function! ale_linters#julia#languageserver#GetCommand(buffer) abort let l:julia_executable = ale#Var(a:buffer, 'julia_executable') - return ale#Escape(l:julia_executable . " --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + let l:cmd_string = 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);' + return l:julia_executable . ' --startup-file=no --history-file=no -e ' . ale#Escape(l:cmd_string) endfunction call ale#linter#Define('julia', { diff --git a/autoload/ale/julia.vim b/autoload/ale/julia.vim index a650504c..f17c6596 100644 --- a/autoload/ale/julia.vim +++ b/autoload/ale/julia.vim @@ -2,19 +2,16 @@ " Description: Functions for integrating with Julia tools " Find the nearest dir contining a git project as julia project -let g:__ale_julia_project_filenames = ['REQUIRE'] +let s:__ale_julia_project_filenames = ['REQUIRE'] function! ale#julia#FindProjectRoot(buffer) abort - for l:project_filename in g:__ale_julia_project_filenames + for l:project_filename in s:__ale_julia_project_filenames let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename) if !empty(l:full_path) let l:path = fnamemodify(l:full_path, ':p:h') return l:path endif - endfor - return '' - endfunction diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 163c9496..7f5edc40 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -5,12 +5,12 @@ After: call ale#assert#TearDownLinterTest() Execute(The default executable path should be correct): - AssertLinter 'julia', ale#Escape("julia" . " --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + AssertLinter 'julia', "julia --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'" Execute(The executable should be configurable): let g:ale_julia_executable = 'julia-new' - AssertLinter 'julia-new', ale#Escape("julia-new" . " --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + AssertLinter 'julia-new', "julia-new --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'" Execute(The project root should be detected correctly): AssertLSPProject '' |