emacs-lsp / lsp-java

lsp-mode :heart: java
https://emacs-lsp.github.io/lsp-java
GNU General Public License v3.0
650 stars 90 forks source link

Buffer name become lowercase when opened by going to definition #190

Closed zijianyue closed 4 years ago

zijianyue commented 4 years ago

image The real buffer name is BusinessTypeUtil.java

yyoncho commented 4 years ago

I guess this is on windows, right? On Windows a file can be opened in multiple ways, e. g. FooBar.txt, foobar.txt, fOobar.txt and that becomes the name of the file. So in order to make packages like flycheck work we downcase the paths. In this case, the buffer that you see is a virtual buffer name.

zijianyue commented 4 years ago

Yes , on windows 10, how can I avoid this? I've tested it on Eglot, no such issue.

yyoncho commented 4 years ago

AFAIK Eglot does not support flycheck. I will take a look and eventually provide a path. You do not use flycheck you may eval the following function and it will probably solve it on your side:

(defun lsp--fix-path-casing (path)
  ""
  path)
zijianyue commented 4 years ago

AFAIK Eglot does not support flycheck. I will take a look and eventually provide a path. You do not use flycheck you may eval the following function and it will probably solve it on your side:

(defun lsp--fix-path-casing (path)
  ""
  path)

tested ok

zijianyue commented 4 years ago

The below method will cause flycheck can't display errors

(defun lsp--fix-path-casing (path) "" path)

image

BTW: I tested lsp-mode with flymake preferred , lowercase as well.