Install Syntax Highlighting

:TSInstall julia

Install Language Server

The Juila language server, LanguageServer.jl, needs to be manually installed. To install LanguageServer.jl in the location where nvim-lspconfig expectsopen in new window run the following terminal command:

julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")'

Create the file ~/.config/lvim/ftplugin/julia.lua with the following line to start the language server when opening Julia files.

local opts = {} 
-- re-use common lsp configurations (keybindings, buffer-highlight and cmp integration)
opts = require("lvim.lsp").get_common_opts() 

Supporting Plugins

For Latex-to-Unicode substitutions, block-wise movements, and other niceties for writing Julia, install the julia-vim open in new window plugin.

Pro Tip

To leverage the editopen in new window functionality with LunarVim use the define_editoropen in new window method in ~/.julia/config/startup.jl

using InteractiveUtils

ENV["JULIA_EDITOR"] = "lvim"

    r"lvim", wait=true) do cmd, path, line
    `$cmd +$line $path`