# \[ANN\] Julia support for vim/neovim plugin ALE (Asyncronous Lint Engine) using LanguageServer.jl

**URL:** <https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775>\
**Category:** Tooling\
**Tags:** lint, editors\
**Created:** [September 10, 2018, 5:46pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775 "2018-09-10T17:46:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![bstellato](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bstellato/32/5262_2.png) [@bstellato](https://discourse.julialang.org/u/bstellato)\
**Post date:** [September 10, 2018, 5:46pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/1 "2018-09-10T17:46:34Z")

</div>

Hi all,

I have just written a [Julia integration](https://github.com/w0rp/ale/pull/1894) for the vim/neovim plugin [ALE](https://github.com/w0rp/ale) (Asyncronous Lint Engine) using [LanguageServer.jl](https://github.com/JuliaEditorSupport/LanguageServer.jl). I believe it is one of the best vim plugins and we needed Julia support.

The integration searches for REQUIRE, Project.toml or Manifest.toml files to get the project root and then it starts the language server instance. It works out of the box after installing ale in vim/neovim and LanguageServer.jl.

The LanguageServer.jl package has still room for improvement, but I believe this is a good start!

Hope you find it useful!

Bartolomeo

 ![demo_ale](https://global.discourse-cdn.com/julialang/original/3X/0/f/0f14d4cd9b823b8c42f11d83c033df0ec1069e04.gif)

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [September 10, 2018, 5:53pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/2 "2018-09-10T17:53:22Z")

</div>

Very nice, thanks for your work!

It seems the dependency `StaticLint.jl` is not registered. Any plans to get the latter registered?

The dependency `DocumentFormat.jl` is also in need of a tag.

---

<div class="post-metadata">

**Author:** ![ZacLN](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zacln/32/2748_2.png) [@ZacLN](https://discourse.julialang.org/u/ZacLN)\
**Post date:** [September 10, 2018, 8:38pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/3 "2018-09-10T20:38:13Z")

</div>

I’m working (fairly slowly) to get both up to speed for v1.0. StaticLint should get tagged soon

---

<div class="post-metadata">

**Author:** ![juius](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@juius](https://discourse.julialang.org/u/juius)\
**Post date:** [September 11, 2018, 1:01pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/4 "2018-09-11T13:01:14Z")

</div>

Sounds great!

Just tested it, but somehow I cannot get completion and syntax checks to work. May be I am missing something in the following:

- vanilla Neovim installation on Linux
- installed plugins: ALE, vim-airline and julia-vim
- installed the packages LanguageServer, DocumentFormat and StaticLint as per [upgrade to Julia 0.7 · Issue #270 · julia-vscode/LanguageServer.jl · GitHub](https://github.com/JuliaEditorSupport/LanguageServer.jl/issues/270#issuecomment-419213976) in Julia 1.0

All I see is some CPU load in the background when pressing or when saving a `*.jl` file. `using` the 3 packages on Julia REPL works fine, there are no warnings or errors.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [September 11, 2018, 1:28pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/5 "2018-09-11T13:28:27Z")

</div>

> [@juius](#):
>
> Just tested it, but somehow I cannot get completion and syntax checks to work. May be I am missing something in the following:

I do think some documentation is called for if you guys can provide. I was also a little confused about how to set things up.

But it seemed like this thing _just_ rolled out the door, so I didn’t want to seem to pesty. 🙂

---

<div class="post-metadata">

**Author:** ![bstellato](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bstellato/32/5262_2.png) [@bstellato](https://discourse.julialang.org/u/bstellato)\
**Post date:** [September 11, 2018, 8:38pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/6 "2018-09-11T20:38:07Z")

</div>

Unfortunately it is only working for me in Julia 0.6 for now. I am not sure the [latest LanguageServer.jl release](https://github.com/JuliaEditorSupport/LanguageServer.jl/releases) is compatible with 0.7.

Have you tried to run `:ALEInfo` and check if the language server command started?

ALE looks for a project file to find the root of the project. If it does not find it, nothing starts.

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [September 11, 2018, 9:35pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/7 "2018-09-11T21:35:27Z")

</div>

Sounds really awesome. However, I am not even able to build `StaticLint`:

```julia
  Building StaticLint → `~/.julia/packages/StaticLint/o1AQ8/deps/build.log`
┌ Error: Error building `StaticLint`:
│ ERROR: LoadError: syntax: extra token "AssociativeWrapper" after end of expression
│ Stacktrace:
│ [1] include at ./boot.jl:317 [inlined]
│ [2] include_relative(::Module, ::String) at ./loading.jl:1038
│ [3] include(::Module, ::String) at ./sysimg.jl:29
│ [4] top-level scope at none:2
│ [5] eval at ./boot.jl:319 [inlined]
│ [6] eval(::Expr) at ./client.jl:389
│ [7] top-level scope at ./none:3
│ in expression starting at /Users/tamasgal/.julia/packages/JSON/Zg7L7/src/JSON.jl:18
│ ERROR: LoadError: LoadError: Failed to precompile JSON [682c06a0-de6a-54ab-a142-c8b1cf79cde6] to /Users/tamasgal/.julia/compiled/v1.0/JSON/uf6oy.ji.
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] macro expansion at ./logging.jl:313 [inlined]
│ [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
│ [4] _require(::Base.PkgId) at ./logging.jl:311
│ [5] require(::Base.PkgId) at ./loading.jl:852
│ [6] macro expansion at ./logging.jl:311 [inlined]
│ [7] require(::Module, ::Symbol) at ./loading.jl:834
│ [8] include at ./boot.jl:317 [inlined]
│ [9] include_relative(::Module, ::String) at ./loading.jl:1038
│ [10] include(::Module, ::String) at ./sysimg.jl:29
│ [11] include(::String) at ./client.jl:388
│ [12] top-level scope at none:0
│ [13] include at ./boot.jl:317 [inlined]
│ [14] include_relative(::Module, ::String) at ./loading.jl:1038
│ [15] include(::Module, ::String) at ./sysimg.jl:29
│ [16] include(::String) at ./client.jl:388
│ [17] top-level scope at none:0
│ in expression starting at /Users/tamasgal/.julia/packages/StaticLint/o1AQ8/src/symbolserver.jl:2
│ in expression starting at /Users/tamasgal/.julia/packages/StaticLint/o1AQ8/deps/build.jl:1
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068

```

---

<div class="post-metadata">

**Author:** ![bstellato](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bstellato/32/5262_2.png) [@bstellato](https://discourse.julialang.org/u/bstellato)\
**Post date:** [September 12, 2018, 3:42am UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/8 "2018-09-12T03:42:46Z")

</div>

You just need to install LanguageServer.jl at the moment and it should work out of the box if you set the right `g:ale_julia_executable`. Unfortunately just for Julia 0.6 at the moment.

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [September 12, 2018, 7:04am UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/9 "2018-09-12T07:04:33Z")

</div>

Thanks, I’ll have to wait until 0.7/1.0 since I don’t use earlier versions anymore.

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [September 12, 2018, 7:31am UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/10 "2018-09-12T07:31:29Z")

</div>

[This alternative](https://github.com/JuliaEditorSupport/LanguageServer.jl/issues/261#issuecomment-419693635) seems to work with julia v1.0 and LanguageServer#master.

---

<div class="post-metadata">

**Author:** ![juius](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@juius](https://discourse.julialang.org/u/juius)\
**Post date:** [September 12, 2018, 12:15pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/11 "2018-09-12T12:15:02Z")

</div>

`:ALEInfo` says there’s a Julia process with the LanguageServer running. Though it exits quickly and is re-launched by ALE everytime I trigger Omnicomplete or generally, when I write something in my \*.jl file.

I’ve taken a look into `ale_linters/julia/languageserver.vim`: In Julia 0.7/1.0, STDOUT and STDIN have to be lowercase. After changing that in the variable `cmd_string`, the Julia process with the LanguageServer does not crash anymore and stays running until I close my \*.jl file.

---

<div class="post-metadata">

**Author:** ![w0rp](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@w0rp](https://discourse.julialang.org/u/w0rp)\
**Post date:** [September 17, 2018, 11:23am UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/12 "2018-09-17T11:23:06Z")

</div>

Thank you for pointing that out. I have pushed a commit now to change those variables to all lowercase, which should hopefully work for 0.6 and 0.7.

---

<div class="post-metadata">

**Author:** ![AtsushiSakai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/atsushisakai/32/6559_2.png) [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Post date:** [February 8, 2019, 11:40am UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/13 "2019-02-08T11:40:22Z")

</div>

Hi. I love the ALE integration with Julia!!  
Is this working for Julia 1.x?

---

<div class="post-metadata">

**Author:** ![juius](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@juius](https://discourse.julialang.org/u/juius)\
**Post date:** [February 8, 2019, 12:34pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/14 "2019-02-08T12:34:59Z")

</div>

I haven’t seen anyone getting it working so far on Julia 1.x.

Btw: Thanks for updating LanguageServer.jl’s Github Wiki page for vim. Transferring the embedded Julia code snippet to ALE now at least prevents ALE’s Julia background process from crashing. One step further 🙂

---

<div class="post-metadata">

**Author:** ![AtsushiSakai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/atsushisakai/32/6559_2.png) [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Post date:** [February 8, 2019, 1:10pm UTC](https://discourse.julialang.org/t/ann-julia-support-for-vim-neovim-plugin-ale-asyncronous-lint-engine-using-languageserver-jl/14775/15 "2019-02-08T13:10:11Z")

</div>

Thank you for replying 😁.

> Transferring the embedded Julia code snippet to ALE now at least prevents ALE’s Julia background process from crashing

That’s good news. vim-lsp is the same situation. The LanguageServer.jl is running, but it is not working… I hope next one step.
