Comments (1)
Hi @resendecode,
I am working with jdtls as well and its working most of the time, I sometimes also have mysterious freezes and company-capf timeouts but this only happens occasionally. Upgrading my lsp server to the latest version and upgrading lsp-mode also lowered the frequency of these issues.
Ok with this being said, lets try some troubleshooting. First I would like to have your system details this is the content of what spacemacs/report-issue
returns to you.
Then we should make sure that your config is proper.
Here is my java config:
(java :variables
java-backend 'lsp)
As you see I do not have given any path, instead lsp-mode asked me to install jdtls which it will then do into your spacemacs directory. Also you should make sure you configure the java settings, the defaults are horribly underrated for a non toy lsp server.
I.e. here is what I am using in my user-config:
;; Setup lsp
(defconst lsp-java-lombok-jar-path (expand-file-name
(locate-user-emacs-file
(f-join ".cache" "lombok.jar"))))
(defun smile13241324/lombok-download ()
"Download the latest Lombok JAR file and install it into `lsp-java-lombok-jar-path'."
(interactive)
(if (and (y-or-n-p (format "Download the latest Lombok JAR into %s? "
lsp-java-lombok-jar-path))
(or (not (file-exists-p lsp-java-lombok-jar-path))
(y-or-n-p (format "The Lombok JAR already exists at %s, overwrite? "
lsp-java-lombok-jar-path))))
(progn
(mkdir (file-name-directory lsp-java-lombok-jar-path) t)
(message "Downloading Lombok JAR into %s" lsp-java-lombok-jar-path)
(url-copy-file "https://projectlombok.org/downloads/lombok.jar" lsp-java-lombok-jar-path t))
(message "Aborted.")))
(defun smile13241324/setup-lsp-java-vmargs ()
(setq lsp-java-vmargs '("-XX:+UseZGC" "-XX:+ZGenerational" "-Xmx20G" "-Xms20G" "-XX:MaxMetaspaceSize=10G" "-XX:+UseStringDeduplication"))
(setq lsp-java-vmargs
(append lsp-java-vmargs
(list (concat "-javaagent:" lsp-java-lombok-jar-path)))))
;; Setup lsp java with productive settings
(setq lsp-java-jdt-download-url "https://www.eclipse.org/downloads/download.php?file=/jdtls/milestones/1.36.0/jdt-language-server-1.36.0-202405301306.tar.gz")
;; Setup the lsp-java vmargs
(smile13241324/setup-lsp-java-vmargs)
When this does not solve your issue, you should execute company-diag
and post the output.
from spacemacs.
Related Issues (20)
- Slow opening of tex files HOT 6
- Passing lintr options to ESS from the configuration. HOT 3
- `n` navigation key can search in the wrong direction after exiting `symbol-highlight-transient-state` HOT 1
- Lsp layer changes latex keybindings HOT 5
- Help to add contrib-roam2.el to spacemacs
- M-x broken in the magit status buffer (and potentially others too) HOT 8
- Many shortcuts broken (byte-code: Key sequence M-m h d m starts with non-prefix key M-m) HOT 3
- [low-prio] Warning (lsp-mode): Unknown notification: semgrep/rulesRefreshed HOT 2
- Suggestion: Migrate to a better formatter like apheleia instead of srefactor HOT 3
- spacemacs fails to start on my emacs for android HOT 3
- Vterm shell doesn't open expectedly HOT 1
- Cannot enable dotspacemacs-swap-number-row.
- error (use-package) - symbol's fuction definition is void HOT 9
- Error (use-package) : org-projectile/:init: -- no such file or directory : org-projecticle HOT 4
- How to install source code pro? HOT 1
- "dotspacemacs-auto-save-file-location" not triggering "after-save-hook"? HOT 2
- helm-spacemacs-help-faq (M-m h f) fails with "if: Wrong type argument: stringp, helm"
- Cannot create new file if similar name exists HOT 7
- Need a Brawlstar plugin
- Compleseus and ripgrep filter ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spacemacs.