# Getting julia-lsp working with emacs

**URL:** <https://discourse.julialang.org/t/getting-julia-lsp-working-with-emacs/37423>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [April 11, 2020, 10:26pm UTC](https://discourse.julialang.org/t/getting-julia-lsp-working-with-emacs/37423 "2020-04-11T22:26:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zlass](https://avatars.discourse-cdn.com/v4/letter/z/7ea924/32.png) [@Zlass](https://discourse.julialang.org/u/Zlass)\
**Post date:** [April 11, 2020, 10:26pm UTC](https://discourse.julialang.org/t/getting-julia-lsp-working-with-emacs/37423/1 "2020-04-11T22:26:59Z")

</div>

Fairly new to julia and emacs. Have spent the afternoon trying to get everything work, but I’m stuck.

I’m using spacemacs and followed their doc [here](https://develop.spacemacs.org/layers/+lang/julia/README.html) to set up the language features. That part seems to be working. However the lsp-mode integration is not cooperating. Using the languageserver provided in [lsp-julia](https://github.com/non-Jedi/lsp-julia) didn’t seem to work so I followed the instructions for manually installing it. This is the error I get when I launch julia-mode:

```julia
MethodError: no method matching Int64(::Nothing)
Closest candidates are:
  Int64(!Matched::Union{Bool, Int32, Int64, UInt32, UInt64, UInt8, Int128, Int16, Int8, UInt128, UInt16}) at boot.jl:707
  Int64(!Matched::Ptr) at boot.jl:717
  Int64(!Matched::Float32) at float.jl:707
  ...
Stacktrace:
 [1] LanguageServer.InitializeParams(::Dict{String,Any}) at /Users/zach/.julia/packages/LanguageServer/wMPrf/src/protocol/initialize.jl:180
 [2] parse_params(::Type{Val{:initialize}}, ::Dict{String,Any}) at /Users/zach/.julia/packages/LanguageServer/wMPrf/src/requests/init.jl:98
 [3] parse(::Type{LanguageServer.JSONRPC.Request}, ::Dict{String,Any}) at /Users/zach/.julia/packages/LanguageServer/wMPrf/src/jsonrpc.jl:46
 [4] run(::LanguageServerInstance) at /Users/zach/.julia/packages/LanguageServer/wMPrf/src/languageserverinstance.jl:215
 [5] top-level scope at none:1

```

Using the same command on my terminal seems to work fine. And manually running the language server in the repl also has no problems. Also have no problems with the lsp in VSCode. Which makes me think it’s a config issue in emacs, but the error message seems like an incorrect value is getting passed to `run`. Either way, I’m kind of stumped.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Zlass](https://avatars.discourse-cdn.com/v4/letter/z/7ea924/32.png) [@Zlass](https://discourse.julialang.org/u/Zlass)\
**Post date:** [April 12, 2020, 12:08am UTC](https://discourse.julialang.org/t/getting-julia-lsp-working-with-emacs/37423/2 "2020-04-12T00:08:55Z")

</div>

After a reboot and changing it back to the default config, it works. Must have done something wrong the first time around.
