# Neovim + LanguageServer.jl

**URL:** <https://discourse.julialang.org/t/neovim-languageserver-jl/37286>\
**Category:** Tooling\
**Tags:** editors\
**Created:** [April 9, 2020, 4:13pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286 "2020-04-09T16:13:25Z")\
**Posts on this page:** 1\
**Showing post:** 47

<div class="post-metadata">

**Author:** ![mike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike/32/39_2.png) [@mike](https://discourse.julialang.org/u/mike)\
**Post date:** [July 13, 2021, 6:13pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/47 "2021-07-13T18:13:12Z")

</div>

> [@jvaverka](#):
>
> I even tried taking the entire config from `nvim-lspconfig/julials.lua` and integrating with my config but there is still no language server attaching to the buffer and no change when trying to `LspInstall` .

Could be worth doing a `:checkhealth` if you’ve not already to see whether there’s anything obvious that’s causing it. Do any other language servers work in your setup?

I struggled with the default settings for a while before just customising it enough to work for me with (the relevant parts):

```lua
local util = require "lspconfig/util"

local cmd = {
  "julia",
  "--startup-file=no",
  "--history-file=no",
  "/home/mike/.config/nvim/lua/mike/lsp.jl"
}

require"lspconfig".julials.setup {
    cmd = cmd,
    on_new_config = function(new_config, _)
        local server_path = vim.fn.system "julia --startup-file=no -q -e 'print(dirname(dirname(Base.find_package(\"LanguageServer\"))))'"
        local new_cmd = vim.deepcopy(cmd)
        table.insert(new_cmd, 2, "--project=" .. server_path)
        new_config.cmd = new_cmd
    end,
    filetypes = {"julia"},
    root_dir = function(fname)
        return util.find_git_ancestor(fname) or vim.fn.getcwd()
    end
}

```

and `lsp.jl` (since I didn’t like passing it all as an argument):

```julia
using LanguageServer
using LanguageServer.SymbolServer

let env = Base.load_path(),
    dir = pwd(),
    depot_path = get(ENV, "JULIA_DEPOT_PATH", ""),
    project_path = dirname(something(Base.current_project(pwd()), Base.load_path_expand(LOAD_PATH[2])))

    @info env dir project_path depot_path

    server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)
    server.runlinter = true
    run(server)
end

```

(Hopefully that might help you out a bit.)

---

_[View the full topic](https://discourse.julialang.org/t/neovim-languageserver-jl/37286)._
