Closed benwainwright closed 4 years ago
Can you follow https://emacs-lsp.github.io/lsp-mode/page/troubleshooting/ and gather *lsp-log*
and workspace log (lsp-toggle-trace-io
and lsp-workspace-show-log
) after you can repro your issue?
Also, I noticed that I appear to suddenly be getting an error with the following stack trace. After I q
out of the stack trace company-mode is no longer working:
Debugger entered--Lisp error: (cl-assertion-failed ((and yas-minor-mode (memq 'yas--post-command-handler post-command-hook)) "[yas] `yas-expand-snippet' needs properly setup `y..."))
cl--assertion-failed((and yas-minor-mode (memq 'yas--post-command-handler post-command-hook)) "[yas] `yas-expand-snippet' needs properly setup `y..." nil nil)
(or (and yas-minor-mode (memq 'yas--post-command-handler post-command-hook)) (cl--assertion-failed '(and yas-minor-mode (memq 'yas--post-command-handler post-command-hook)) "[yas] `yas-expand-snippet' needs properly setup `y..." (list) (list)))
(progn (or (and yas-minor-mode (memq 'yas--post-command-handler post-command-hook)) (cl--assertion-failed '(and yas-minor-mode (memq 'yas--post-command-handler post-command-hook)) "[yas] `yas-expand-snippet' needs properly setup `y..." (list) (list))) nil)
yas-expand-snippet(#("addEnvironment" 0 14 (fontified nil)) 821 835)
(let (yas-indent-line) (yas-expand-snippet (lsp--to-yasnippet-snippet (buffer-substring start-point (point))) start-point (point)))
(progn (let (yas-indent-line) (yas-expand-snippet (lsp--to-yasnippet-snippet (buffer-substring start-point (point))) start-point (point))))
(if (eq insert-text-format\? 2) (progn (let (yas-indent-line) (yas-expand-snippet (lsp--to-yasnippet-snippet (buffer-substring start-point (point))) start-point (point)))))
(let* ((--dash-source-106-- (text-properties-at 0 candidate)) (item (plist-get --dash-source-106-- 'lsp-completion-item)) (start-point (plist-get --dash-source-106-- 'lsp-completion-start-point)) (markers (plist-get --dash-source-106-- 'lsp-completion-markers)) (prefix (plist-get --dash-source-106-- 'lsp-completion-prefix)) (label (gethash "label" item)) (insert-text\? (gethash "insertText" item)) (text-edit\? (gethash "textEdit" item)) (insert-text-format\? (gethash "insertTextFormat" item)) (additional-text-edits\? (gethash "additionalTextEdits" item))) (cond (text-edit\? (apply #'delete-region markers) (insert prefix) (lsp--apply-text-edit text-edit\?)) ((or insert-text\? label) (apply #'delete-region markers) (insert prefix) (delete-region start-point (point)) (insert (or insert-text\? label)))) (if (eq insert-text-format\? 2) (progn (let (yas-indent-line) (yas-expand-snippet (lsp--to-yasnippet-snippet (buffer-substring start-point (point))) start-point (point))))) (if (and lsp-completion-enable-additional-text-edit additional-text-edits\?) (progn (lsp--apply-text-edits additional-text-edits\?))))
lsp--capf-exit-fn(#("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)) finished ["." "\"" "'" "/" "@" "<"])
apply(lsp--capf-exit-fn (#("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)) finished ["." "\"" "'" "/" "@" "<"]))
(closure ((args ["." "\"" "'" "/" "@" "<"]) (fn . lsp--capf-exit-fn) t) (&rest args-before) (apply fn (append args-before args)))(#("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)) finished)
funcall((closure ((args ["." "\"" "'" "/" "@" "<"]) (fn . lsp--capf-exit-fn) t) (&rest args-before) (apply fn (append args-before args))) #("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)) finished)
(if exit-function (funcall exit-function arg (if (= (car (completion-boundaries arg table nil "")) (length arg)) 'sole 'finished)))
(let* ((res company-capf--current-completion-data) (exit-function (plist-get (nthcdr 4 res) :exit-function)) (table (nth 3 res))) (if exit-function (funcall exit-function arg (if (= (car (completion-boundaries arg table nil "")) (length arg)) 'sole 'finished))))
company--capf-post-completion(#("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)))
(cond ((eq command 'interactive) (company-begin-backend 'company-capf)) ((eq command 'prefix) (let ((res (company--capf-data))) (if res (progn (let ((length ...) (prefix ...)) (cond (... ...) (length ...) (t prefix))))))) ((eq command 'candidates) (company-capf--candidates arg)) ((eq command 'sorted) company-capf--sorted) ((eq command 'match) (let ((f (plist-get (nthcdr 4 company-capf--current-completion-data) :company-match))) (if f (funcall f arg) (let* ((match-start nil) (pos -1) (prop-value nil) (faces nil) (has-face-p nil) chunks (limit (length arg))) (while (< pos limit) (setq pos (if ... 0 ...)) (setq prop-value (or ... ...) faces (if ... prop-value ...) has-face-p (memq ... faces)) (cond (... ...) (... ... ...))) (nreverse chunks))))) ((eq command 'duplicates) t) ((eq command 'no-cache) t) ((eq command 'meta) (let ((f (plist-get (nthcdr 4 company-capf--current-completion-data) :company-docsig))) (if f (progn (funcall f arg))))) ((eq command 'doc-buffer) (let ((f (plist-get (nthcdr 4 company-capf--current-completion-data) :company-doc-buffer))) (if f (progn (funcall f arg))))) ((eq command 'location) (let ((f (plist-get (nthcdr 4 company-capf--current-completion-data) :company-location))) (if f (progn (funcall f arg))))) ((eq command 'annotation) (let ((f (plist-get (nthcdr 4 company-capf--current-completion-data) :annotation-function))) (if f (progn (funcall f arg))))) ((eq command 'require-match) (plist-get (nthcdr 4 (company--capf-data)) :company-require-match)) ((or (eq command 'init) (not (eq command 'post-completion))) nil) (t (company--capf-post-completion arg)))
company-capf(post-completion #("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)))
apply(company-capf (post-completion #("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>))))
(if (functionp company-backend) (apply company-backend args) (apply #'company--multi-backend-adapter company-backend args))
(condition-case err (if (functionp company-backend) (apply company-backend args) (apply #'company--multi-backend-adapter company-backend args)) ((debug user-error) (user-error "Company: backend %s user-error: %s" company-backend (error-message-string err))) ((debug error) (error "Company: backend %s error \"%s\" with args %s" company-backend (error-message-string err) args)))
company-call-backend-raw(post-completion #("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)))
apply(company-call-backend-raw (post-completion #("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>))))
(let ((value (apply fun args))) (if (not (eq (car-safe value) :async)) value (let ((res 'trash) (start (time-to-seconds))) (funcall (cdr value) #'(lambda (result) (setq res result))) (while (eq res 'trash) (if (> (- (time-to-seconds) start) company-async-timeout) (error "Company: backend %s async timeout with args %s" backend args) (sleep-for company-async-wait))) res)))
company--force-sync(company-call-backend-raw (post-completion #("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>))) company-capf)
company-call-backend(post-completion #("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)))
(let ((company-backend backend)) (run-hook-with-args 'company-completion-finished-hook result) (company-call-backend 'post-completion result))
(if (stringp result) (let ((company-backend backend)) (run-hook-with-args 'company-completion-finished-hook result) (company-call-backend 'post-completion result)) (run-hook-with-args 'company-completion-cancelled-hook result))
(progn (if (stringp result) (let ((company-backend backend)) (run-hook-with-args 'company-completion-finished-hook result) (company-call-backend 'post-completion result)) (run-hook-with-args 'company-completion-cancelled-hook result)) (run-hook-with-args 'company-after-completion-hook result))
(if prefix (progn (if (stringp result) (let ((company-backend backend)) (run-hook-with-args 'company-completion-finished-hook result) (company-call-backend 'post-completion result)) (run-hook-with-args 'company-completion-cancelled-hook result)) (run-hook-with-args 'company-after-completion-hook result)))
(let ((prefix company-prefix) (backend company-backend)) (setq company-backend nil company-prefix nil company-candidates nil company-candidates-length nil company-candidates-cache nil company-candidates-predicate nil company-common nil company-selection 0 company-selection-changed nil company--manual-action nil company--manual-prefix nil company--point-max nil company-point nil) (if company-timer (progn (cancel-timer company-timer))) (company-echo-cancel t) (company-search-mode 0) (company-call-frontends 'hide) (company-enable-overriding-keymap nil) (if prefix (progn (if (stringp result) (let ((company-backend backend)) (run-hook-with-args 'company-completion-finished-hook result) (company-call-backend 'post-completion result)) (run-hook-with-args 'company-completion-cancelled-hook result)) (run-hook-with-args 'company-after-completion-hook result))))
company-cancel(#("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)))
company-finish(#("addEnvironment" 0 1 (face (completions-first-difference) lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>) 1 14 (lsp-completion-prefix "" lsp-completion-markers (821 #<marker (moves after insertion) at 835 in TsbRegisterApplicationStack.ts>) lsp-completion-start-point 821 lsp-sort-text "0" lsp-completion-item #<hash-table equal 7/9 0x1fe892e7ce27>)))
(let ((result (nth company-selection company-candidates))) (company-finish result))
(progn (let ((result (nth company-selection company-candidates))) (company-finish result)))
(if (company-manual-begin) (progn (let ((result (nth company-selection company-candidates))) (company-finish result))))
company-complete-selection()
funcall-interactively(company-complete-selection)
call-interactively(company-complete-selection nil nil)
command-execute(company-complete-selection)
The log is too long. Can you try to get to repro the issue first, toggle the io trace, try to repro it again and paste the log from there?
Also, it will be useful if you can describe steps to reproduce with lsp-start-plain.el.
The log is too long. Can you try to get to repro the issue first, toggle the io trace, try to repro it again and paste the log from there?
That's literally what I did. But I'll give it a go and see if it produces a shorter log?
Also, it will be useful if you can describe steps to reproduce with lsp-start-plain.el.
The steps are basically
lsp-start-plain.el
along with the config I've described aboveI can't be more specific than that. As noted above, it appears that using lsp-start-plain.el
an error is appearing which might be related, but I can't be certain.
Thanks, the error is saying [yas] yas-expand-snippet needs properly setup
though
I was able to reproduce with lsp-start-plain.el but doing C-g in the callstack after closing the callstack buffer after yasnippet exception. But it seems to me that issue is as a side effect from that exception. In your original setup do you have yas-global-mode enabled?
I do yes; just to be clear, in my original setup company mode does work for a bit... it just stops working.
Ok. I've disabled yas-global-mode
for now. First impressions, it definitely seems to be lasting longer than normal; I'll work with it for a bit and see if it sticks.
@yyoncho Ok, completely removing yassnippets
hasn't resolved the problem. I'll have another go and trying to narrow down the repro tomorrow.
I think that at this point it is best to ask @kiennq to provide some tracepoints so we can diagnose the issue. IMO we break due to exception during completion and we(or company?) end up in broken state.
I'm more curious about if we get any completions from server after this issue occurred.
So just trace-io after the we can repo it would be enough.
Also, can you dump value of lsp--capf-cache
when this issue happens?
And try to call lsp--capf-clear-cache
to see if it resolves the issue?
@kiennq here are steps to reproduce:
(yas-global-mode)
call.emacs -q -l lsp-start-plain.el js.js
var s = "xx"
then type
s.rep
and complete the selection.
It will show an error press q. Go on the next line and try again s.rep
- it does not show completion.
Okay, clear cache will fix the issue.
Seems like we should have clear cache call in company-completion-started-hook
, right?
(add-hook 'company-completion-started-hook
(lambda (&rest _)
(setq-local lsp-inhibit-lsp-hooks t)
(lsp--capf-clear-cache))
nil
t)
This change seems to be fixing the issue.
That's not enough. For example you can still see that the completion is not suggested in this case
let stand = "xx"
stand.repeat repe<|>
There will be no candidate being suggested.
I think the completion start detection in company-mode
is not that accurate, we should really wrap to always clean cache when completion completed (which is more accurately detected?)
Wow, thanks for the prompt action guys. I'll await that merge and see if it fixes things at my end :)
I just nuked my elpa/lsp-mode
folder and I don't seem to have gotten the changes. Is there anything I need to get the update?
You may need to wait a little bit more to get the change, it depends on when MELPA build every packages.
Alternatively, you can try quelpa
, and type C-u M-x quelpa
, select lsp-mode
and install it rightaway
Ok, the problem appears resolved. Thanks for your help.
@kiennq problem is not resolved. Will try to properly rep again tomorrow. Could you reopen issue please?
@benwainwright can you try calling (lsp--capf-clear-cache) when you hit the issue? Also, as suggested by @kiennq can you turn on the logs and inspect if M-x company-complete results in textDocument/completion call to the server.
@benwainwright can you try calling (lsp--capf-clear-cache) when you hit the issue?
Can confirm that suggestions start working again after I make this function call.
Also, as suggested by @kiennq can you turn on the logs and inspect if M-x company-complete results in textDocument/completion call to the server.
I'll do this later this evening if you still need it (technically working atm), unless the above is enough of a smoking gun for you?
I'll do this later this evening if you still need it (technically working atm), unless the above is enough of a smoking gun for you?
There is no need for that. Apparently the exit function is not called. Can you test with the following change:
(defun lsp--clean-company ()
(remove-hook 'company-completion-started-hook
(lambda (&rest _)
(lsp--capf-clear-cache)
(setq-local lsp-inhibit-lsp-hooks t))
t)
(remove-hook 'company-after-completion-hook
(lambda (&rest _)
(lsp--capf-clear-cache)
(setq-local lsp-inhibit-lsp-hooks nil))
t))
This will force cleanup on startup.
Ok, I've put that in my config and I'll continue to work and see if it resolves the issue.
@benwainwright Do you also encounter any error when completion stops working?
@benwainwright any update?
Apologies for the delay; I've been quite busy at work. I've got a bit of time now; will confirm
Ok, this is what the my lsp-mode configuration looks like:
(use-package lsp-mode
:ensure t
:config
(setenv "TSSERVER_LOG_FILE" "/tmp/tsserver.log")
(add-hook 'go-mode-hook #'lsp)
(add-hook 'js-mode-hook #'lsp)
(add-hook 'web-mode-hook #'lsp)
(add-hook 'typescript-mode-hook #'lsp)
(add-hook 'python-mode-hook #'lsp)
(defun lsp--clean-company ()
(remove-hook 'company-completion-started-hook
(lambda (&rest _)
(lsp--capf-clear-cache)
(setq-local lsp-inhibit-lsp-hooks t))
t)
(remove-hook 'company-after-completion-hook
(lambda (&rest _)
(lsp--capf-clear-cache)
(setq-local lsp-inhibit-lsp-hooks nil))
t)))
Unfortunately, the issue is still appearing; even though calling the function that you suggestion manually still appears to solve the issue.
can you check if company-completion-started-hook is the correct one when you are in the buffer?
company-completion-started-hook is a variable defined in ‘company.el’.
Its value is
(#f(compiled-function
(&rest _)
#<bytecode 0x1ead3174ee7be37c>)
t)
Original value was nil
Local in buffer HttpCommandBus.ts; global value is nil
@yyoncho I'm guessing this means no?
Perhaps I'm configuring this incorrectly?
can you replace the function directly in lsp-mode.el and then bytecompile the file with M-x byte-compile-file? Then restart emacs.
Ok; I've done that. At first appearance it appears to be working. Let me try it for a more protracted period at work tomorrow to confirm.
I am marking this as closed, please reopen if #1887 is not suffient.
Ok, so it's been reverted. Is there any other potential fixes I can try?
I believe the fix works but results in one more call to the server.
@yyoncho Ok. But at the moment things are still breaking for me, and I can't believe this isn't coming up for many others. Is there no alternative fix that doesn't do that?
Hi, everyone. I don't know if it's related, but for me completion stops working in lsp-java after some time as well. As I can see from *lsp-log*
it seems like client doesn't send document/completion
request anymore. lsp-workspace-restart
doesn't help, only restarting emacs. Maybe I should open separate issue?
EDIT: the rest functionality is working perfectly (code actions, diagnostics etc...)
*lsp-log*
:
Jul 7, 2020, 10:48:38 AM >> workspace/didChangeWatchedFiles
Jul 7, 2020, 10:48:38 AM begin problem for /ThumbnailMinerHollowFaker.java
Jul 7, 2020, 10:48:38 AM 0 problems reported for /ThumbnailMinerHollowFaker.java
Jul 7, 2020, 10:48:38 AM >> workspace/didChangeWatchedFiles
Jul 7, 2020, 10:48:38 AM >> workspace/didChangeWatchedFiles
Jul 7, 2020, 10:48:38 AM begin problem for /TestProperties.java
Jul 7, 2020, 10:48:38 AM 0 problems reported for /TestProperties.java
Jul 7, 2020, 10:48:38 AM Validated 1. Took 75 ms
Jul 7, 2020, 10:49:05 AM >> workspace/didChangeWatchedFiles
Updating integration-tests configuration[Message]
Jul 7, 2020, 10:49:05 AM Starting Maven update for integration-tests
Jul 7, 2020, 10:49:07 AM Updated integration-tests in 1737 ms
Jul 7, 2020, 10:49:09 AM >> registerFeature 'workspace/didChangeWatchedFiles'
Jul 7, 2020, 10:49:48 AM >> workspace/didChangeWatchedFiles
Updating integration-tests configuration[Message]
Jul 7, 2020, 10:49:48 AM Starting Maven update for integration-tests
Jul 7, 2020, 10:49:49 AM Updated integration-tests in 1038 ms
Jul 7, 2020, 10:49:51 AM >> registerFeature 'workspace/didChangeWatchedFiles'
Jul 7, 2020, 10:49:52 AM >> document/didChange
Jul 7, 2020, 10:49:53 AM >> document/didChange
Jul 7, 2020, 10:49:53 AM >> document/didChange
Jul 7, 2020, 10:49:53 AM >> document/didChange
Jul 7, 2020, 10:49:53 AM >> document/didChange
Jul 7, 2020, 10:49:53 AM >> document/completion
Jul 7, 2020, 10:49:53 AM Completion request completed
<-- here completion stops working
Jul 7, 2020, 10:49:54 AM >> document/didChange
Jul 7, 2020, 10:49:56 AM >> document/didChange
Jul 7, 2020, 10:49:56 AM >> document/didChange
Jul 7, 2020, 10:49:56 AM >> document/didChange
Jul 7, 2020, 10:49:56 AM >> document/didChange
Jul 7, 2020, 10:49:57 AM >> document/didChange
Jul 7, 2020, 10:49:57 AM >> document/didChange
Jul 7, 2020, 10:49:57 AM >> document/willSaveWaitUntil
Jul 7, 2020, 10:49:57 AM >> document/didSave
Jul 7, 2020, 10:49:57 AM >> workspace/didChangeWatchedFiles
Jul 7, 2020, 10:50:08 AM >> document/didChange
Jul 7, 2020, 10:50:08 AM >> document/didChange
Jul 7, 2020, 10:50:08 AM >> document/didChange
Jul 7, 2020, 10:50:08 AM >> document/didChange
Jul 7, 2020, 10:50:08 AM >> document/didChange
Jul 7, 2020, 10:50:09 AM >> document/didChange
Jul 7, 2020, 10:50:09 AM >> document/didChange
Jul 7, 2020, 10:50:13 AM >> document/didChange
Jul 7, 2020, 10:50:14 AM >> document/didChange
Jul 7, 2020, 10:50:14 AM >> document/didChange
Jul 7, 2020, 10:50:14 AM >> document/didChange
Jul 7, 2020, 10:50:14 AM >> document/didChange
Jul 7, 2020, 10:50:14 AM >> document/didChange
Jul 7, 2020, 10:50:14 AM >> document/didChange
Jul 7, 2020, 10:50:16 AM >> document/didChange
Jul 7, 2020, 10:50:16 AM >> document/didChange
Jul 7, 2020, 10:50:17 AM >> document/didChange
Jul 7, 2020, 10:50:17 AM >> document/didChange
Jul 7, 2020, 10:50:17 AM >> document/didChange
Jul 7, 2020, 10:50:18 AM >> document/didChange
Jul 7, 2020, 10:50:18 AM >> document/didChange
Jul 7, 2020, 10:50:18 AM >> document/didChange
Jul 7, 2020, 10:50:18 AM >> document/didChange
Found the following clients for /home/rrudakov/Work/EPAM/thumbnail-service/integration-tests/src/test/java/com/lgi/thumbnail/miner/mock/hollow/ThumbnailMinerHollowFaker.java: (server-id jdtls, priority 0)
The following clients were selected based on priority: (server-id jdtls, priority 0)
Jul 7, 2020, 10:50:21 AM >> document/didOpen
Jul 7, 2020, 10:50:22 AM Reconciled 0. Took 2 ms
Jul 7, 2020, 10:50:22 AM begin problem for /TestProperties.java
Jul 7, 2020, 10:50:22 AM 0 problems reported for /TestProperties.java
Jul 7, 2020, 10:50:22 AM begin problem for /ThumbnailMinerHollowFaker.java
Jul 7, 2020, 10:50:22 AM 0 problems reported for /ThumbnailMinerHollowFaker.java
Jul 7, 2020, 10:50:22 AM Validated 2. Took 66 ms
Jul 7, 2020, 10:50:24 AM >> document/didChange
Jul 7, 2020, 10:50:24 AM >> document/didChange
Jul 7, 2020, 10:50:24 AM >> document/didChange
Jul 7, 2020, 10:50:24 AM >> document/didChange
Jul 7, 2020, 10:50:25 AM Reconciled 0. Took 6 ms
Jul 7, 2020, 10:50:25 AM begin problem for /TestProperties.java
Jul 7, 2020, 10:50:25 AM 0 problems reported for /TestProperties.java
Jul 7, 2020, 10:50:25 AM begin problem for /ThumbnailMinerHollowFaker.java
Jul 7, 2020, 10:50:25 AM 1 problems reported for /ThumbnailMinerHollowFaker.java
Jul 7, 2020, 10:50:25 AM Validated 2. Took 61 ms
Jul 7, 2020, 10:50:25 AM >> document/didChange
Jul 7, 2020, 10:50:26 AM Reconciled 0. Took 5 ms
Jul 7, 2020, 10:50:26 AM >> document/didChange
Jul 7, 2020, 10:50:26 AM Reconciled 0. Took 3 ms
Jul 7, 2020, 10:50:26 AM >> document/didChange
Jul 7, 2020, 10:50:27 AM Reconciled 0. Took 2 ms
Jul 7, 2020, 10:50:27 AM begin problem for /TestProperties.java
Jul 7, 2020, 10:50:27 AM 0 problems reported for /TestProperties.java
@benwainwright Can you check if #1896 fixes your issue?
This one should be fixed, @benwainwright reopen the issue if you hit it again.
Cool I'll have a look this morning :)
Hello!
I have been experiencing a similar behavior when using lsp-metals to edit Scala source.
The completion functionality stopped working a few months ago.
I am using Doom Emacs. When I clean the cache by running (setq company--capf-cache nil)
, sometimes the completion works but most of the time it doesn't.
Sometimes I get some garbage completion too, but most of the time I don't get any completion at all.
The other functionalities like type inference and goto definition seems to work.
I appreciate any help. I have raised this issue in multiple projects past few months with no luck so far
@ashkan-leo make sure you are using the latest lsp-mode.
Then: Use M-x company-diag to verify complany completion is using lsp-mode You can also enable logging by setting lsp-print-io to t and then match your typing to textDocument/completion requests and your typing.
Before logging the bug, please make sure that:
lsp-mode
related packages. ✅company
interacts withlsp-mode
, and isn't covered there.Describe the bug I use
company-mode
in conjunction withlsp-mode
and it seems that when I'm using it, after a period of time, it just... stops working.lsp-mode
appears to be still active and working, but the company autosuggestion box seems to just stop appearing. At the present time I only seem to be able to resolve it by restarting emacs. Any suggestions on what I can do to debug this would be much appreciated.I've already raised an issue with
company-mode
(https://github.com/company-mode/company-mode/issues/991) and they've advised me to post hereTo Reproduce I've managed to reproduce by taking
lsp-start-plain.el
and addingcompany
to the package list and the specific parts of my config that relate to company and lsp (alsoevil
because I can't really use raw emacs, so its hard to test without it):Expected behavior Autosuggestions continue to appear until the end of time
Which Language Server did you use
ts-ls
OS MacOS 10.14.6