elixir-ls icon indicating copy to clipboard operation
elixir-ls copied to clipboard

changing .elixir_ls path

Open ignamartinoli opened this issue 3 years ago • 2 comments

Environment

  • Elixir & Erlang versions (elixir --version): Elixir 1.13.4 (compiled with Erlang/OTP 25)
  • Elixir Language Server version: 0.11.0
  • Operating system: Gentoo Linux
  • Editor or IDE name (e.g. Emacs/VSCode): Neovim 0.7.2
  • Editor Plugin/LSP Client name and version: nvim-lspconfig and mason.nvim (elixir_ls)

Current behavior

When launching the Language Server, the .elixir_ls directory gets created in my $HOME.

Is there an environment variable or something that can change the path where this directory gets created? Can it be disabled altogether?

ignamartinoli avatar Sep 06 '22 13:09 ignamartinoli

How are you launching it?

lukaszsamson avatar Sep 17 '22 05:09 lukaszsamson

It gets launched by nvim-lspconfig and mason-lspconfig.

From what I set up, following the guide, the executable just gets called

ignamartinoli avatar Sep 17 '22 06:09 ignamartinoli

Can you post a detailed trace? I think your client is sending rootUri/rootPath/workspaceFolders pointing to your $HOME and elixir-ls is convinced that it opens a project that needs to be compiled and it needs.elixir_ls dir for that. I cannot reproduce it in vscode - when I open a project dir it creates .elixir_ls in that project dir. When I open a single file (rootUri is null) then .elixir-ls is not created at all.

Is there an environment variable or something that can change the path where this directory gets created?

No. How would you make it work? It needs to be relative to the open dir

Can it be disabled altogether?

I don't think we can do that

lukaszsamson avatar Oct 06 '22 15:10 lukaszsamson

Running :LspLog yields:

[START][2022-10-06 17:00:21] LSP logging initiated
[WARN][2022-10-06 17:00:21] .../lua/vim/lsp.lua:1072	"server_request: no handler found for"	"workspace/diagnostic/refresh"

I also receive this message:

LSP[elixir][Info] Did not receive workspace/didChangeConfiguration notification after 5 seconds. Using default settings.

ignamartinoli avatar Oct 06 '22 20:10 ignamartinoli

This looks like a configuration issue on your end. Please use forum for help or post a reproduction steps.

lukaszsamson avatar Jan 20 '23 23:01 lukaszsamson