# Neovim and Julia - setup advice?

**URL:** <https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393>\
**Category:** Tooling\
**Created:** [November 10, 2018, 8:01pm UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393 "2018-11-10T20:01:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![opera\_malenky](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/opera_malenky/32/8213_2.png) [@opera\_malenky](https://discourse.julialang.org/u/opera_malenky)\
**Post date:** [November 10, 2018, 8:01pm UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/1 "2018-11-10T20:01:19Z")

</div>

Anyone here use neovim? I used to have a working setup, but I switched to VS Code for a long time (I needed to use Windows, and it was just easier). When I tried to go back to neovim (still on Windows), I find that neoterm has changed a ton, and my config no longer works… and I can’t for the life of me seem to get it running again.

Anyone willing to share their dotfiles/config?

---

<div class="post-metadata">

**Author:** ![jwu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jwu/32/3775_2.png) [@jwu](https://discourse.julialang.org/u/jwu)\
**Post date:** [November 10, 2018, 8:24pm UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/2 "2018-11-10T20:24:24Z")

</div>

I use SpaceVim, the setup is automatic. It uses LanguageSever.jl, but this package is not working currently.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [November 10, 2018, 9:14pm UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/3 "2018-11-10T21:14:46Z")

</div>

You can get a sorta-kinda working Language Server install on neovim by

1. putting [this Project.toml](https://gist.github.com/pfitzseb/65b9a452a4fb75ce5daf46f4484f93b2) and this [Manifest.toml](https://gist.github.com/pfitzseb/61878904ac003b7283402cd96d4ef198) into a folder, e.g. `~/.julia/environments/ls`
2. activating that via

```julia
$ cd ~
$ julia
pkg> activate .julia/environments/ls
pkg> instantiate

```

1. add the contents of [this excerpt of my `init.vim`](https://gist.github.com/pfitzseb/525735b0bdbceece82251b7a5c385063) to yours, call `:PlugInstall` (and make sure you have the python nvim module installed before so `deoplete` works fine) – also don’t forget to adjust all paths in there as well as the call to start Julia (`j1` in my case)
2. open a Julia file and see linter warnings etc pop up (first start will take ages since the LS will index all of your Julia packages). Autocompletions are currently broken though, I think.

---

<div class="post-metadata">

**Author:** ![opera\_malenky](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/opera_malenky/32/8213_2.png) [@opera\_malenky](https://discourse.julialang.org/u/opera_malenky)\
**Post date:** [November 11, 2018, 12:31pm UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/4 "2018-11-11T12:31:23Z")

</div>

Thanks for the links, everyone. The init.vim excerpt especially was helpful - got me sorted on the newer neoterm config syntax quickly.

I still had an issue getting things running, but it turned out I was running into [this issue](https://github.com/kassio/neoterm/issues/171). In case anyone runs into similar problems, neovim/neoterm works well enough on Windows once I added the right `g:neoterm_eof` flag.

---

<div class="post-metadata">

**Author:** ![benkj](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@benkj](https://discourse.julialang.org/u/benkj)\
**Post date:** [November 17, 2018, 1:55pm UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/5 "2018-11-17T13:55:31Z")

</div>

Here is my super-simple setup, using [GitHub - Vigemus/iron.nvim: Interactive Repl Over Neovim](https://github.com/Vigemus/iron.nvim) for interacting with the REPL. Any suggestions for improvement is appreciated. See also [scroll terminal after IronSend · Issue #73 · Vigemus/iron.nvim · GitHub](https://github.com/Vigemus/iron.nvim/issues/73)

> " Julia + REPL config
> 
> tnoremap \<C-\>
> 
> "let maplocalleader = “,”  
> autocmd Filetype julia set tabstop=4  
> autocmd Filetype julia set shiftwidth=4
> 
> autocmd Filetype julia nmap §§ :write:call IronSend(“include("” . expand(“%:p”) . “")”)  
> autocmd Filetype julia nmap ,lf :call IronSend(“include("” . expand(“%:p”) . “")”)  
> autocmd Filetype julia nmap ,lr :IronRepl  
> autocmd Filetype julia vmap ,t (iron-send-motion)  
> autocmd Filetype julia nmap ,t (iron-send-motion)  
> autocmd FileType julia nmap ,w :call IronSend(“@doc " . expand(”"))G
> 
> tnoremap \<C-\>h  
> tnoremap \<C-\>j  
> tnoremap \<C-\>k  
> tnoremap \<C-\>l
> 
> nnoremap h  
> nnoremap j  
> nnoremap k  
> nnoremap l
> 
> inoremap h  
> inoremap j  
> inoremap k  
> inoremap l

---

<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:** [November 17, 2018, 3:30pm UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/6 "2018-11-17T15:30:12Z")

</div>

I use `neovim` exclusively, you can see my dotfiles [here](https://github.com/ExpandingMan/dotfiles) (by now that repo is pretty detailed).

I mostly just use the excellent [julia-vim](https://github.com/JuliaEditorSupport/julia-vim) plugin, I don’t actually use much in the way of linting or anything fancy.

---

<div class="post-metadata">

**Author:** ![olep](https://avatars.discourse-cdn.com/v4/letter/o/c4cdca/32.png) [@olep](https://discourse.julialang.org/u/olep)\
**Post date:** [November 14, 2020, 1:40am UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/7 "2020-11-14T01:40:47Z")

</div>

I integrated @ExpandingMan config with CoC for autocompletion and linting and now it works nearly perfectly! I have only one problem: if I try to use the visual send key sequence, I end up replacing everything I select with a lot of v. I suppose that that is because the r key in visual mode triggers a replace. How can I overcome this?  
Forgive me for such a noob question

---

<div class="post-metadata">

**Author:** ![olep](https://avatars.discourse-cdn.com/v4/letter/o/c4cdca/32.png) [@olep](https://discourse.julialang.org/u/olep)\
**Post date:** [November 14, 2020, 1:44am UTC](https://discourse.julialang.org/t/neovim-and-julia-setup-advice/17393/8 "2020-11-14T01:44:18Z")

</div>

I even tried to substitute the ‘r’ in the shortcut with a ‘j’, and then simply nothing happens
