# Jupyter Lab LSP: argv path

**URL:** <https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115>\
**Category:** General Usage\
**Tags:** question, jupyter\
**Created:** [October 10, 2020, 3:47pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115 "2020-10-10T15:47:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fusion809](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fusion809/32/6080_2.png) [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Post date:** [October 10, 2020, 3:47pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/1 "2020-10-10T15:47:15Z")

</div>

I’d like to be able to use Julia’s language server within Jupyter Lab. There’s [an extension for Jupyter Lab that adds LSP integration](https://github.com/krassowski/jupyterlab-lsp). There’s a [list of languages](https://jupyterlab-lsp.readthedocs.io/en/latest/Language%20Servers.html) that are well-supported by the extension, unfortunately Julia is not one of them. Fortunately, provided a language has a language server (which Julia, of course does), it may still be possible to use it within Jupyter Lab. A problem I’ve encountered is that I’m not entirely sure what path I should specify in the settings:

```json
{
  "LanguageServerManager": {
    "language_servers": {
      "a-language-server-implementation": {
        "version": 1,
        "argv": ["/absolute/path/to/a-language-server", "--stdio"],
        "languages": ["a-language"]
      }
    }
  }
}

```

I have installed the “LanguageServer” Julia package on my Linux system (install directory is the usual `~/.julia/packages/LanguageServer`). The docs say that argv is:

> `argv` , a list of shell tokens to launch the server in `stdio` mode (as opposed to `tcp` )

I’m not entirely sure what this means for Julia, so could someone tell me what I need to put in argv.

---

<div class="post-metadata">

**Author:** ![krassowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krassowski/32/20833_2.png) [@krassowski](https://discourse.julialang.org/u/krassowski)\
**Post date:** [January 6, 2021, 11:18pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/2 "2021-01-06T23:18:03Z")

</div>

In Unix systems you run commands such as `ls -l` or `echo test`. In the Python implementation of the command execution (jupyter-lsp is written in Python) those commands are split into tokens, forming lists of strings: such as `['ls', '-l']` and `['echo', 'test']`. You need to provide the command that starts the Julia language server from command line, but split into such tokens.

The Julia language server GitHub says that at minimum it should be:  
`julia --project=/path/to/LanguageServer.jl/environment -e "using LanguageServer, LanguageServer.SymbolServer; runserver()"` so you would set:

```json
{
  "LanguageServerManager": {
    "language_servers": {
      "julia-language-server": {
        "version": 1,
        "argv": ["julia", "--project=/path/to/LanguageServer.jl/environment", "-e", "using LanguageServer, LanguageServer.SymbolServer; runserver()"],
        "languages": ["julia"]
      }
    }
  }
}

```

Have a look at the implementation in this tweet: [https://twitter.com/sig\_kdy/status/1237696242068500480/photo/1](https://twitter.com/sig_kdy/status/1237696242068500480/photo/1).

It would be great if you could open an issue on our [GitHub](https://github.com/krassowski/jupyterlab-lsp) so we can help you - I just stumbled here incidentally and if not a curiosity trip into the Julia adoption, I would not see this message ever otherwise. Also, the support for new languages does not just happen, someone needs to implement it so your input is more than welcome.

---

<div class="post-metadata">

**Author:** ![krassowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krassowski/32/20833_2.png) [@krassowski](https://discourse.julialang.org/u/krassowski)\
**Post date:** [January 6, 2021, 11:24pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/3 "2021-01-06T23:24:56Z")

</div>

Please also see another attempt in this comment: [https://github.com/krassowski/jupyterlab-lsp/issues/313#issuecomment-672860662](https://github.com/krassowski/jupyterlab-lsp/issues/313#issuecomment-672860662)

---

<div class="post-metadata">

**Author:** ![krassowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krassowski/32/20833_2.png) [@krassowski](https://discourse.julialang.org/u/krassowski)\
**Post date:** [January 17, 2021, 5:21pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/4 "2021-01-17T17:21:40Z")

</div>

The new 3.1 of [jupyterlab-lsp](https://github.com/krassowski/jupyterlab-lsp) now supports auto-detection of Julia Language Server (LanguageServer.jl) as an experimental feature:

![julia_short](https://global.discourse-cdn.com/julialang/original/3X/8/e/8e51319efc4e98faf92b4570c5ceb64859ccdcec.gif)

Please do report any bugs and/or send pull requests to improve it 🙂

---

<div class="post-metadata">

**Author:** ![pgagarinov](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@pgagarinov](https://discourse.julialang.org/u/pgagarinov)\
**Post date:** [March 26, 2021, 2:18pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/5 "2021-03-26T14:18:04Z")

</div>

@krassowski I’m using jupyterlab-lsp 3.4.1 along with LanguageServer.jl, autocompletion works but I get a lot of “missing reference” warnings inside the notebook:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/b/eb11240c82ff357ec6453fa22a61e6a726819ea4.png)  
Is there any workaround for solving this problem?

---

<div class="post-metadata">

**Author:** ![krassowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krassowski/32/20833_2.png) [@krassowski](https://discourse.julialang.org/u/krassowski)\
**Post date:** [March 26, 2021, 2:32pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/6 "2021-03-26T14:32:12Z")

</div>

Could it be due to this bug in LanguageServer.jl: ["Missing reference" on module imports which aren't missing · Issue #391 · julia-vscode/LanguageServer.jl · GitHub](https://github.com/julia-vscode/LanguageServer.jl/issues/391) ?

PS. we released 3.5.0 this week, I hope you will like the improvements ([https://github.com/krassowski/jupyterlab-lsp/releases/tag/v3.5.0](https://github.com/krassowski/jupyterlab-lsp/releases/tag/v3.5.0)).

---

<div class="post-metadata">

**Author:** ![fenyutanchan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fenyutanchan/32/24081_2.png) [@fenyutanchan](https://discourse.julialang.org/u/fenyutanchan)\
**Post date:** [April 16, 2021, 6:43am UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/7 "2021-04-16T06:43:45Z")

</div>

Hello, I have some strange problems.  
Now I have installed LSP 3.5.0 and LanguageServer.jl, but LSP cannot auto-detect it.  
What should I do or what info should I show?

 ![图片](https://global.discourse-cdn.com/julialang/original/3X/7/e/7e337e6d1835388165b8c7024961511dcf9596f0.png)

---

<div class="post-metadata">

**Author:** ![fenyutanchan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fenyutanchan/32/24081_2.png) [@fenyutanchan](https://discourse.julialang.org/u/fenyutanchan)\
**Post date:** [April 16, 2021, 6:50am UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/8 "2021-04-16T06:50:04Z")

</div>

![图片](https://global.discourse-cdn.com/julialang/original/3X/5/3/539f741f61edc6482dbd4d86f491b39d87d3bf0e.png)

The Chinese in this picture means “julia is hashed.”

---

<div class="post-metadata">

**Author:** ![fenyutanchan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fenyutanchan/32/24081_2.png) [@fenyutanchan](https://discourse.julialang.org/u/fenyutanchan)\
**Post date:** [April 16, 2021, 6:50am UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/9 "2021-04-16T06:50:36Z")

</div>

![图片](https://global.discourse-cdn.com/julialang/original/3X/e/1/e1a33eb99e40e9fb14b745904c2eac28e74010ea.png)

---

<div class="post-metadata">

**Author:** ![krassowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krassowski/32/20833_2.png) [@krassowski](https://discourse.julialang.org/u/krassowski)\
**Post date:** [April 16, 2021, 9:36pm UTC](https://discourse.julialang.org/t/jupyter-lab-lsp-argv-path/48115/10 "2021-04-16T21:36:17Z")

</div>

Hi @fenyutanchan, could it be that your PATH is different when starting JupyterLab? Is it installed in conda base environment or somewhere else? Please see [https://github.com/krassowski/jupyterlab-lsp/issues/512](https://github.com/krassowski/jupyterlab-lsp/issues/512) where we discussed a related, but possibly different issue; you will find a PATH modification that worked for the user who had the problem, and maybe it could also help in your case.

If it does not, please open a new issue in the GitHub repository, describing your configuration in more details, and ideally providing instructions on how to reproduce problematic environment in a few simple steps.
