Skip to content

.cache directory affects compilation of certain lsp servers #4809

@StiglCZ

Description

@StiglCZ

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

The go to definition functionality of lsp copys the file into the .cache directory of the workspace, which makes compilation errors in some languages, notably c# that takes into effect everything in the current directory.

This issue was also escalated from: razzmatazz/csharp-language-server#232

Steps to reproduce

  1. Setup lsp, csharp-ls.
  2. Start a c# file in lsp, and go to definition of quite literally anything via right click or via M-x
  3. Now, when the file is copied to .cache, it will cause errors unless you modify the project for every single one

Expected behavior

I would imagine either using .emacs.d or some kind of other directory, or make it able to be set by user would help, altho it propably wouldnt be covered under the same workspace.

Which Language Server did you use?

csharp-ls

OS

Linux

Error callstack

No error directly inside elisp.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions