From 8bf5d144ed2299e0ecd6fa8f9703647e5c5ef02f Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Thu, 30 Aug 2018 15:40:04 -0400 Subject: [PATCH 1/9] Started adding julia languageserver --- ale_linters/julia/languageserver.vim | 30 ++++++++++++++++++++++++++++ autoload/ale/julia.vim | 21 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 ale_linters/julia/languageserver.vim create mode 100644 autoload/ale/julia.vim diff --git a/ale_linters/julia/languageserver.vim b/ale_linters/julia/languageserver.vim new file mode 100644 index 00000000..1755c794 --- /dev/null +++ b/ale_linters/julia/languageserver.vim @@ -0,0 +1,30 @@ +" 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) + +endfunction + +call ale#linter#Define('julia', { +\ 'name': 'languageserver', +\ 'lsp': 'stdio', +\ 'executable_callback': 'ale_linters#julia#languageserver#GetExecutable', +\ 'command_callback': 'ale_linters#julia#languageserver#GetCommand', +\ 'project_root_callback': 'ale#julia#FindProjectRoot', +\}) diff --git a/autoload/ale/julia.vim b/autoload/ale/julia.vim new file mode 100644 index 00000000..a6c0ee4a --- /dev/null +++ b/autoload/ale/julia.vim @@ -0,0 +1,21 @@ +" Set just so tests can override it. +let g:__ale_julia_project_filenames = ['.git/HEAD'] +function! ale#julia#FindProjectRoot(buffer) abort + for l:project_filename in g:__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, ':h') + + " Correct .git path detection. + if fnamemodify(l:path, ':t') is# '.git' + let l:path = fnamemodify(l:path, ':h') + endif + + return l:path + endif + endfor + + return '' +endfunction + From df72c5f1c11726a8db2c9c22fa579ee59238d0aa Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Fri, 7 Sep 2018 11:11:29 -0400 Subject: [PATCH 2/9] Added various files to integrate julia. Still not working. --- README.md | 1 + ale_linters/julia/languageserver.vim | 22 ++++------------------ autoload/ale/julia.vim | 8 +++++++- doc/ale-julia.txt | 20 ++++++++++++++++++++ 4 files changed, 32 insertions(+), 19 deletions(-) create mode 100644 doc/ale-julia.txt diff --git a/README.md b/README.md index e8108733..d8eb5d87 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ formatting. | JavaScript | [eslint](http://eslint.org/), [flow](https://flowtype.org/), [jscs](http://jscs.info/), [jshint](http://jshint.com/), [prettier](https://github.com/prettier/prettier), [prettier-eslint](https://github.com/prettier/prettier-eslint-cli), [prettier-standard](https://github.com/sheerun/prettier-standard), [standard](http://standardjs.com/), [xo](https://github.com/sindresorhus/xo) | JSON | [fixjson](https://github.com/rhysd/fixjson), [jsonlint](http://zaa.ch/jsonlint/), [jq](https://stedolan.github.io/jq/), [prettier](https://github.com/prettier/prettier) | | Kotlin | [kotlinc](https://kotlinlang.org) !!, [ktlint](https://ktlint.github.io) !!, [languageserver](https://github.com/fwcd/KotlinLanguageServer) see `:help ale-integration-kotlin` for configuration instructions | +| Julia | [LanguageServer.jl](https://github.com/JuliaEditorSupport/LanguageServer.jl) | | LaTeX | [alex](https://github.com/wooorm/alex) !!, [chktex](http://www.nongnu.org/chktex/), [lacheck](https://www.ctan.org/pkg/lacheck), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) | | Less | [lessc](https://www.npmjs.com/package/less), [prettier](https://github.com/prettier/prettier), [stylelint](https://github.com/stylelint/stylelint) | | LLVM | [llc](https://llvm.org/docs/CommandGuide/llc.html) | 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', \}) diff --git a/autoload/ale/julia.vim b/autoload/ale/julia.vim index a6c0ee4a..71243763 100644 --- a/autoload/ale/julia.vim +++ b/autoload/ale/julia.vim @@ -1,4 +1,10 @@ -" Set just so tests can override it. +" Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com +" Description: Functions for integrating with Julia tools + +" Set julia executable variable +call ale#Set('julia_executable', 'julia') + +" Find the nearest dir contining a git project as julia project let g:__ale_julia_project_filenames = ['.git/HEAD'] function! ale#julia#FindProjectRoot(buffer) abort for l:project_filename in g:__ale_julia_project_filenames diff --git a/doc/ale-julia.txt b/doc/ale-julia.txt new file mode 100644 index 00000000..3795c8ef --- /dev/null +++ b/doc/ale-julia.txt @@ -0,0 +1,20 @@ +=============================================================================== +ALE Julia Integration *ale-julia-options* + +=============================================================================== +languageserver *ale-julia-languageserver* + +To enable Julia LSP linter you need to install the LanguageServer.jl package +within julia. + +g:ale_julia_executable *g:ale_julia_executable* + *b:ale_julia_executable* + + Type: String + Default: 'julia' + + Path to the julia exetuable. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + From f64f0bb48c6e080932ec3a99ac03a69a57f7a933 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Fri, 7 Sep 2018 13:16:22 -0400 Subject: [PATCH 3/9] Added tests --- ale_linters/julia/languageserver.vim | 5 ++++- autoload/ale/julia.vim | 17 +++++----------- .../julia-languageserver-project/REQUIRE | 0 .../julia-languageserver-project/test.jl | 0 .../test_julia_languageserver_callbacks.vader | 20 +++++++++++++++++++ 5 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 test/command_callback/julia-languageserver-project/REQUIRE create mode 100644 test/command_callback/julia-languageserver-project/test.jl create mode 100644 test/command_callback/test_julia_languageserver_callbacks.vader diff --git a/ale_linters/julia/languageserver.vim b/ale_linters/julia/languageserver.vim index d59e9959..c5cd063a 100644 --- a/ale_linters/julia/languageserver.vim +++ b/ale_linters/julia/languageserver.vim @@ -1,9 +1,12 @@ " Author: Bartolomeo Stellato " Description: A language server for Julia +" Set julia executable variable +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) . ale#Escape("--startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + 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);'") endfunction call ale#linter#Define('julia', { diff --git a/autoload/ale/julia.vim b/autoload/ale/julia.vim index 71243763..a650504c 100644 --- a/autoload/ale/julia.vim +++ b/autoload/ale/julia.vim @@ -1,27 +1,20 @@ " Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com " Description: Functions for integrating with Julia tools -" Set julia executable variable -call ale#Set('julia_executable', 'julia') - " Find the nearest dir contining a git project as julia project -let g:__ale_julia_project_filenames = ['.git/HEAD'] +let g:__ale_julia_project_filenames = ['REQUIRE'] + function! ale#julia#FindProjectRoot(buffer) abort for l:project_filename in g:__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, ':h') - - " Correct .git path detection. - if fnamemodify(l:path, ':t') is# '.git' - let l:path = fnamemodify(l:path, ':h') - endif - + let l:path = fnamemodify(l:full_path, ':p:h') return l:path endif + endfor return '' -endfunction +endfunction diff --git a/test/command_callback/julia-languageserver-project/REQUIRE b/test/command_callback/julia-languageserver-project/REQUIRE new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/julia-languageserver-project/test.jl b/test/command_callback/julia-languageserver-project/test.jl new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader new file mode 100644 index 00000000..163c9496 --- /dev/null +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('julia', 'languageserver') + +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);'") + +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);'") + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('julia-languageserver-project/test.jl') + + AssertLSPProject ale#path#Simplify(g:dir . '/julia-languageserver-project') From 68ac4d10954b1f1d9f1ae890e0967014aeb00a52 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Fri, 7 Sep 2018 14:13:44 -0400 Subject: [PATCH 4/9] Fix julia escaping + minor edits --- ale_linters/julia/languageserver.vim | 3 ++- autoload/ale/julia.vim | 7 ++----- .../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 '' From 91bb948b908a1bcb500a34e7fd1542388ace58e1 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Sat, 8 Sep 2018 14:11:11 -0400 Subject: [PATCH 5/9] Try to fix CI --- autoload/ale/julia.vim | 4 ++-- doc/ale-julia.txt | 8 ++++---- doc/ale.txt | 2 ++ .../test_julia_languageserver_callbacks.vader | 10 ++++++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/autoload/ale/julia.vim b/autoload/ale/julia.vim index f17c6596..c544b1fa 100644 --- a/autoload/ale/julia.vim +++ b/autoload/ale/julia.vim @@ -1,8 +1,8 @@ " Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com " Description: Functions for integrating with Julia tools -" Find the nearest dir contining a git project as julia project -let s:__ale_julia_project_filenames = ['REQUIRE'] +" Find the nearest dir containing a julia project +let s:__ale_julia_project_filenames = ['REQUIRE', 'Manifest.toml', 'Project.toml'] function! ale#julia#FindProjectRoot(buffer) abort for l:project_filename in s:__ale_julia_project_filenames diff --git a/doc/ale-julia.txt b/doc/ale-julia.txt index 3795c8ef..c65a4f52 100644 --- a/doc/ale-julia.txt +++ b/doc/ale-julia.txt @@ -1,14 +1,14 @@ =============================================================================== -ALE Julia Integration *ale-julia-options* +ALE Julia Integration *ale-julia-options* =============================================================================== -languageserver *ale-julia-languageserver* +languageserver *ale-julia-languageserver* To enable Julia LSP linter you need to install the LanguageServer.jl package within julia. -g:ale_julia_executable *g:ale_julia_executable* - *b:ale_julia_executable* +g:ale_julia_executable *g:ale_julia_executable* + *b:ale_julia_executable* Type: String Default: 'julia' diff --git a/doc/ale.txt b/doc/ale.txt index 2c018a10..931006b8 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -144,6 +144,8 @@ CONTENTS *ale-contents* jsonlint............................|ale-json-jsonlint| jq..................................|ale-json-jq| prettier............................|ale-json-prettier| + julia.................................|ale-julia-options| + languageserver......................|ale-julia-languageserver| kotlin................................|ale-kotlin-options| kotlinc.............................|ale-kotlin-kotlinc| ktlint..............................|ale-kotlin-ktlint| diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 7f5edc40..5b377e46 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -5,12 +5,18 @@ After: call ale#assert#TearDownLinterTest() Execute(The default executable path should be correct): - AssertLinter 'julia', "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 ' . + \ ale#Escape('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', "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 ' . + \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);') Execute(The project root should be detected correctly): AssertLSPProject '' From b3adf241c3ec2af295599a7a6469d8b208ff5817 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Sat, 8 Sep 2018 16:05:34 -0400 Subject: [PATCH 6/9] Fix other warnings --- ale_linters/julia/languageserver.vim | 1 + autoload/ale/julia.vim | 2 ++ doc/ale-julia.txt | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ale_linters/julia/languageserver.vim b/ale_linters/julia/languageserver.vim index 87c3030f..bf459926 100644 --- a/ale_linters/julia/languageserver.vim +++ b/ale_linters/julia/languageserver.vim @@ -7,6 +7,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);' + return l:julia_executable . ' --startup-file=no --history-file=no -e ' . ale#Escape(l:cmd_string) endfunction diff --git a/autoload/ale/julia.vim b/autoload/ale/julia.vim index c544b1fa..18dd9ad7 100644 --- a/autoload/ale/julia.vim +++ b/autoload/ale/julia.vim @@ -10,8 +10,10 @@ function! ale#julia#FindProjectRoot(buffer) abort if !empty(l:full_path) let l:path = fnamemodify(l:full_path, ':p:h') + return l:path endif endfor + return '' endfunction diff --git a/doc/ale-julia.txt b/doc/ale-julia.txt index c65a4f52..51532419 100644 --- a/doc/ale-julia.txt +++ b/doc/ale-julia.txt @@ -10,7 +10,7 @@ within julia. g:ale_julia_executable *g:ale_julia_executable* *b:ale_julia_executable* - Type: String + Type: |String| Default: 'julia' Path to the julia exetuable. From 97ed25a8bfec6c7f7abbb825ba65205b3cb1b115 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Sun, 9 Sep 2018 10:09:05 -0400 Subject: [PATCH 7/9] Escape julia command + reorder table in README --- README.md | 2 +- ale_linters/julia/languageserver.vim | 2 +- .../test_julia_languageserver_callbacks.vader | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d8eb5d87..c4b029e6 100644 --- a/README.md +++ b/README.md @@ -135,8 +135,8 @@ formatting. | Java | [checkstyle](http://checkstyle.sourceforge.net), [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html), [google-java-format](https://github.com/google/google-java-format), [PMD](https://pmd.github.io/), [javalsp](https://github.com/georgewfraser/vscode-javac) | | JavaScript | [eslint](http://eslint.org/), [flow](https://flowtype.org/), [jscs](http://jscs.info/), [jshint](http://jshint.com/), [prettier](https://github.com/prettier/prettier), [prettier-eslint](https://github.com/prettier/prettier-eslint-cli), [prettier-standard](https://github.com/sheerun/prettier-standard), [standard](http://standardjs.com/), [xo](https://github.com/sindresorhus/xo) | JSON | [fixjson](https://github.com/rhysd/fixjson), [jsonlint](http://zaa.ch/jsonlint/), [jq](https://stedolan.github.io/jq/), [prettier](https://github.com/prettier/prettier) | -| Kotlin | [kotlinc](https://kotlinlang.org) !!, [ktlint](https://ktlint.github.io) !!, [languageserver](https://github.com/fwcd/KotlinLanguageServer) see `:help ale-integration-kotlin` for configuration instructions | | Julia | [LanguageServer.jl](https://github.com/JuliaEditorSupport/LanguageServer.jl) | +| Kotlin | [kotlinc](https://kotlinlang.org) !!, [ktlint](https://ktlint.github.io) !!, [languageserver](https://github.com/fwcd/KotlinLanguageServer) see `:help ale-integration-kotlin` for configuration instructions | | LaTeX | [alex](https://github.com/wooorm/alex) !!, [chktex](http://www.nongnu.org/chktex/), [lacheck](https://www.ctan.org/pkg/lacheck), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) | | Less | [lessc](https://www.npmjs.com/package/less), [prettier](https://github.com/prettier/prettier), [stylelint](https://github.com/stylelint/stylelint) | | LLVM | [llc](https://llvm.org/docs/CommandGuide/llc.html) | diff --git a/ale_linters/julia/languageserver.vim b/ale_linters/julia/languageserver.vim index bf459926..b6bf8e73 100644 --- a/ale_linters/julia/languageserver.vim +++ b/ale_linters/julia/languageserver.vim @@ -8,7 +8,7 @@ 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);' - return l:julia_executable . ' --startup-file=no --history-file=no -e ' . ale#Escape(l:cmd_string) + return ale#Escape(l:julia_executable) . ' --startup-file=no --history-file=no -e ' . ale#Escape(l:cmd_string) endfunction call ale#linter#Define('julia', { diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 5b377e46..a1f3a1ae 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -6,7 +6,7 @@ After: Execute(The default executable path should be correct): AssertLinter 'julia', - \'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);') @@ -14,7 +14,7 @@ Execute(The executable should be configurable): let g:ale_julia_executable = 'julia-new' AssertLinter 'julia-new', - \'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);') From 6e7b7b23e58b62738348568be61a6631f81c2212 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Sun, 9 Sep 2018 14:18:15 -0400 Subject: [PATCH 8/9] Updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4b029e6..d1a1f1af 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ formatting. | Java | [checkstyle](http://checkstyle.sourceforge.net), [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html), [google-java-format](https://github.com/google/google-java-format), [PMD](https://pmd.github.io/), [javalsp](https://github.com/georgewfraser/vscode-javac) | | JavaScript | [eslint](http://eslint.org/), [flow](https://flowtype.org/), [jscs](http://jscs.info/), [jshint](http://jshint.com/), [prettier](https://github.com/prettier/prettier), [prettier-eslint](https://github.com/prettier/prettier-eslint-cli), [prettier-standard](https://github.com/sheerun/prettier-standard), [standard](http://standardjs.com/), [xo](https://github.com/sindresorhus/xo) | JSON | [fixjson](https://github.com/rhysd/fixjson), [jsonlint](http://zaa.ch/jsonlint/), [jq](https://stedolan.github.io/jq/), [prettier](https://github.com/prettier/prettier) | -| Julia | [LanguageServer.jl](https://github.com/JuliaEditorSupport/LanguageServer.jl) | +| Julia | [languageserver](https://github.com/JuliaEditorSupport/LanguageServer.jl) | | Kotlin | [kotlinc](https://kotlinlang.org) !!, [ktlint](https://ktlint.github.io) !!, [languageserver](https://github.com/fwcd/KotlinLanguageServer) see `:help ale-integration-kotlin` for configuration instructions | | LaTeX | [alex](https://github.com/wooorm/alex) !!, [chktex](http://www.nongnu.org/chktex/), [lacheck](https://www.ctan.org/pkg/lacheck), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) | | Less | [lessc](https://www.npmjs.com/package/less), [prettier](https://github.com/prettier/prettier), [stylelint](https://github.com/stylelint/stylelint) | From 169e4b67d3762cf03bd11eb8c2f6e11a43c45919 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Sun, 9 Sep 2018 14:47:55 -0400 Subject: [PATCH 9/9] Added julia to the list in ale-support docs --- doc/ale.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/ale.txt b/doc/ale.txt index 931006b8..cf14c93c 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -396,6 +396,7 @@ Notes: * Java: `checkstyle`, `javac`, `google-java-format`, `PMD`, `javalsp` * JavaScript: `eslint`, `flow`, `jscs`, `jshint`, `prettier`, `prettier-eslint`, `prettier-standard`, `standard`, `xo` * JSON: `fixjson`, `jsonlint`, `jq`, `prettier` +* Julia: `languageserver` * Kotlin: `kotlinc`!!, `ktlint`!!, `languageserver` * LaTeX (tex): `alex`!!, `chktex`, `lacheck`, `proselint`, `redpen`, `vale`, `write-good` * Less: `lessc`, `prettier`, `stylelint`