emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.79k stars 888 forks source link

flycheck dosen't work when a file was opened through Symbolic link #3796

Open SimoneRiccardi opened 1 year ago

SimoneRiccardi commented 1 year ago

Thank you for the bug report

Bug description

Flycheck dosen't work. Even when there are errors, flycheck-list-error remains empty and on screen and dosen't appear any error on screen

Steps to reproduce

Open a project using a symbolic link in the workspace path / Open a project file with a file path that use a symbolic linked folder

Expected behavior

When there is a syntax error, flycheck should show them

Which Language Server did you use?

lsp-java with jdtls as language server

OS

Linux

Error callstack

No response

Anything else?

With c++ and clangd there is no such problem

XO39 commented 1 year ago

I've noticed this a while ago on Mac, working on golang gopls server.

We have a lot of in-house dependency packages that we need to tweak every now and then, we use symbolic links for sharing across different setups and developers, when using the jump/go to implementation, it uses the symbolic link to open dependency module file, but lsp functionalities are totally disabled, and no errors are reported at all.

We have to open every package manually using the absolute path in order to make the lsp/flycheck functionality to work in emacs, which becomes more and more annoying.