Comments (13)
What do you for completion - company-lsp or completion-at-point?
from lsp-java.
I have fixed this behavior in tigersoldier/company-lsp#36
from lsp-java.
Verified with latest company-lsp.
from lsp-java.
No, it still does not work.
from lsp-java.
Can you make sure that you are using latest JDT/lsp-mode/lsp-java? Also, is your project configured in lsp-java--workspace-folders as per java-mode readme?
If the problem still exists, can you set lsp-print-io to t and post the logs(in messages) from starting the server to the reproducing the issue?
from lsp-java.
(require-package 'lsp-java)
(with-eval-after-load 'cc-mode
(defun my-lsp-java-setup ()
"lsp java setup"
(interactive "P")
(require 'lsp-java)
(lsp-java-enable))
(setq lsp-java-server-install-dir (expand-file-name "/opt/eclipse.jdt.ls/server/"))
(setq lsp-java-workspace-dir (expand-file-name "~/workspace/"))
(setq lsp-java-workspace-cache-dir (expand-file-name "~/workspace/.cache/"))
(setq lsp-print-io t)
;; set the projects that are going to be imported into the workspace.
(setq lsp-java--workspace-folders (list
"/home/xianghx/workspace/hello-world"
;; "~/workspace/hello-world"
))
;; 必须my-lsp-java-setup前面
(add-hook 'java-mode-hook 'lsp-mode)
(add-hook 'java-mode-hook 'my-lsp-java-setup)
(add-hook 'java-mode-hook 'flycheck-mode)
(add-hook 'java-mode-hook 'company-mode)
(add-hook 'java-mode-hook (lambda () (set (make-local-variable 'company-backends)
'(company-lsp
(company-dabbrev-code company-gtags company-etags company-keywords)
company-files company-dabbrev))))
)
(provide 'init-java)
from lsp-java.
From what I can see everything seems to be fine: Can you use the function described in tigersoldier/company-lsp#39 (comment) and post the messages content? I hope that this will be the final step to resolve the issue.
from lsp-java.
I try rust and go, that's all ok.
from lsp-java.
From what I can see this line is not present in the logs, that means that company-lsp--post-completion
version is not called.
(message "Starting content:%s" (thing-at-point 'line))
RUST and GO work probably because they do not do snippet completion.
from lsp-java.
I close yasnippet.
when I input slowly:
h.na
name
name2
Results >> h.name()na or h.name()a or h.name(): String etc
but when I input fast.
h.na
name
name2
finalize
Result >> h.name()
from lsp-java.
can you check the value of company-lsp-cache-candidates
? It should be nil
for lsp-java
.
from lsp-java.
OK:)))
(setq company-lsp-cache-candidates nil)
from lsp-java.
Sometime, first init, they have some problem, not always.
Company: An error occurred in auto-begin
Company: backend company-lsp error "Wrong type argument: hash-table-p, nil" with args (prefix)
from lsp-java.
Related Issues (20)
- Emacs company-mode doesn't work correctly HOT 16
- lsp-java not working with java-ts-mode HOT 1
- Have to start emacs with sudo, otherwise jdtls won't work HOT 3
- [Question] How to enable annotation processing
- `lsp-jt-run` not works
- Auto indent for empty line HOT 2
- (lsp-java--get-java-version) buggy
- Support for newest version of JDK 20, 21?
- test.java is not part of any project
- Is possible to get the oracle documentation of methods?
- support for netbeans lsp server HOT 1
- may not be accessible to clients due to missing ’requires transitive’, adding it breaks company-capf
- install jdtls but Non-readable POM HOT 1
- Gradle Tasks
- lsp-java-update-server is deprecated: update to README required
- vmArgs field in the launch.json file is not parsed or used. HOT 2
- lsp-java-server-install-dir variable does not seem to work HOT 2
- Lombok support does not work
- Null annotation types config? HOT 2
- eldoc not working HOT 3
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 lsp-java.