Closed CodyRude closed 1 year ago
I encountered the same issue.
@CodyRude have you tried (lsp-semantic-tokens-enable t)
? By toggle this on, java-ts-mode is no longer needed. However, I feel the highlight provided by jdtls is confusing and inconsistent. The colors don't make sense to me. Let me show you a screen shot.
Hi @huangfeiyu
I get similar results when I use lsp-semantic-tokens-enable, the highlighting is a little confusing. For now, I can continue using the old java-mode. I just struggle with it sometimes, and was hoping the new java-ts-mode would be cleaner.
Try this:
(setq lsp-java-format-tab-size 4)
Then restart lsp server.
If it works for you then I can push a fix.
Try this:
(setq lsp-java-format-tab-size 4)
Then restart lsp server.
If it works for you then I can push a fix.
Yep, that fixes it. Thank you!!
@thanhvg
Try this:
(setq lsp-java-format-tab-size 4)
Then restart lsp server.
If it works for you then I can push a fix.
It fixed the launching issue for me too. However, it broke jdtls' snippet expansion (#449). Setting it back to its default value and switching to java-mode
doesn't help. I have noticed that sometimes it starts working correctly until you restart emacs or lsp.
Upd: I'm sorry for this confusion. The problem was with the .emacs.d/.cache/lsp/eclipse.jdt.ls
, which I updated by reinstalling it when I tried to get lsp-java work with java-ts-mode. Manually downloaded jdtls 1.26.0 milestone works as intended.
Describe the bug Stuck on "Main thread is waiting" when using java-ts-mode (tree sitter mode) now available in Emacs 29. Using standard java-mode seems to work.
To Reproduce Get tree-sitter grammer for java libtree-sitter-java.so and place in ~/.emacs.d/tree-sitter/ emacs -Q
open test java file
Expected behavior lsp server will initialize and start working
Logs