emacs-lsp/lsp-java

Emacs company-mode doesn't work correctly

Closed this issue · 16 comments

before i press Enter key
图片
after i press Enter key
图片

why the u letter is inserted at last?

check with M-x lsp-start-plain

check with M-x lsp-start-plain

图片

Type 3 symbols

@yyoncho Above is the input screenshot

I don't see anything wrong with that screenshot...

this is the backtrace log

Debugger entered--Lisp error: (error "Internal error.")
  error("Internal error.")
  (closure ((cleanup-fn closure ((func closure ((first-edited)) (start &rest _) (setq first-edited (if first-edited ... start)))) nil (remove-hook 'before-change-functions func t))) (err) (if cleanup-fn (progn (funcall cleanup-fn))) (error (lsp:json-error-message err)))(#<hash-table equal 3/3 0x157643c65d21>)
  funcall((closure ((cleanup-fn closure ((func closure ((first-edited)) (start &rest _) (setq first-edited (if first-edited ... start)))) nil (remove-hook 'before-change-functions func t))) (err) (if cleanup-fn (progn (funcall cleanup-fn))) (error (lsp:json-error-message err))) #<hash-table equal 3/3 0x157643c65d21>)
  (progn (funcall callback (if no-merge results (lsp--merge-results (-map #'cl-rest results) method))))
  (if (and (not (eq (length errors) (length workspaces))) (eq (+ (length errors) (length results)) (length workspaces))) (progn (funcall callback (if no-merge results (lsp--merge-results (-map #'cl-rest results) method)))))
  (closure ((errors) (results (... . #<hash-table equal 3/3 0x157643c65d21>)) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities ... :root "/home/yuchunzhou/my-app" :client ... :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>)) (no-merge) (method . "completionItem/resolve") (callback closure (...) (err) (if cleanup-fn ...) (error ...))) (result) (let* ((x ...)) (if (eq result :error) (setq errors ...) (setq results ...))) (if (and (not ...) (eq ... ...)) (progn (funcall callback ...))))(#<hash-table equal 3/3 0x157643c65d21>)
  funcall((closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities ... :root "/home/yuchunzhou/my-app" :client ... :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>) . #<hash-table equal 3/3 0x157643c65d21>)) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :root "/home/yuchunzhou/my-app" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x15764309ab45> :request-handlers #<hash-table equal 1/65 0x1576430ec485> :response-handlers #<hash-table eql 1/65 0x157643032e97> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1576430ec4c5> :action-handlers #<hash-table equal 11/65 0x1576430ec4a5> :major-modes ... :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options ... :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn ... :before-file-open-fn ... :initialized-fn ... :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157643032eb7> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer App.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>)) (no-merge) (method . "completionItem/resolve") (callback closure ((cleanup-fn closure ... nil ...)) (err) (if cleanup-fn (progn ...)) (error (lsp:json-error-message err)))) (result) (let* ((x (cons lsp--cur-workspace result))) (if (eq result :error) (setq errors (cons x errors)) (setq results (cons x results)))) (if (and (not (eq ... ...)) (eq (+ ... ...) (length workspaces))) (progn (funcall callback (if no-merge results ...))))) #<hash-table equal 3/3 0x157643c65d21>)
  (closure ((error-callback closure ((errors) (results (... . #<hash-table equal 3/3 0x157643c65d21>)) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities ... :root "/home/yuchunzhou/my-app" :client ... :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>)) (no-merge) (method . "completionItem/resolve") (callback closure (...) (err) (if cleanup-fn ...) (error ...))) (result) (let* ((x ...)) (if (eq result :error) (setq errors ...) (setq results ...))) (if (and (not ...) (eq ... ...)) (progn (funcall callback ...)))) (callback closure ((callback closure (... ... ... ... ... ...) (result) (let* ... ...) (if ... ...)) (id . 93)) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) (id . 93)) (error) (funcall callback :error) (lsp--request-cleanup-hooks id) (funcall error-callback error))(#<hash-table equal 3/3 0x157643c65d21>)
  funcall((closure ((error-callback closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities ... :root "/home/yuchunzhou/my-app" :client ... :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>) . #<hash-table equal 3/3 0x157643c65d21>)) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :root "/home/yuchunzhou/my-app" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x15764309ab45> :request-handlers #<hash-table equal 1/65 0x1576430ec485> :response-handlers #<hash-table eql 1/65 0x157643032e97> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1576430ec4c5> :action-handlers #<hash-table equal 11/65 0x1576430ec4a5> :major-modes ... :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options ... :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn ... :before-file-open-fn ... :initialized-fn ... :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157643032eb7> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer App.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>)) (no-merge) (method . "completionItem/resolve") (callback closure ((cleanup-fn closure ... nil ...)) (err) (if cleanup-fn (progn ...)) (error (lsp:json-error-message err)))) (result) (let* ((x (cons lsp--cur-workspace result))) (if (eq result :error) (setq errors (cons x errors)) (setq results (cons x results)))) (if (and (not (eq ... ...)) (eq (+ ... ...) (length workspaces))) (progn (funcall callback (if no-merge results ...))))) (callback closure ((callback closure ((errors ...) (results) (workspaces ...) (no-merge) (method . "completionItem/resolve") (callback closure ... ... ...)) (result) (let* (...) (if ... ... ...)) (if (and ... ...) (progn ...))) (id . 93)) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) (id . 93)) (error) (funcall callback :error) (lsp--request-cleanup-hooks id) (funcall error-callback error)) #<hash-table equal 3/3 0x157643c65d21>)
  (progn (remhash id (progn (or (progn (and (memq (type-of client) cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data)))
  (if callback (progn (remhash id (progn (or (progn (and (memq ... cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data))))
  (let* ((--dash-source-444-- (cdr (gethash id (progn (or (progn ...) (signal ... ...)) (aref client 8))))) (callback (car-safe (prog1 --dash-source-444-- (setq --dash-source-444-- (cdr --dash-source-444--))))) (method (car-safe (prog1 --dash-source-444-- (setq --dash-source-444-- (cdr --dash-source-444--))))) (before-send (car (cdr --dash-source-444--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id (lsp:json-response-error-error json-data) 'incoming-resp (lsp--ms-since before-send)) workspace))) (if callback (progn (remhash id (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data)))))
  (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-444-- (cdr (gethash id (progn (or ... ...) (aref client 8))))) (callback (car-safe (prog1 --dash-source-444-- (setq --dash-source-444-- (cdr --dash-source-444--))))) (method (car-safe (prog1 --dash-source-444-- (setq --dash-source-444-- (cdr --dash-source-444--))))) (before-send (car (cdr --dash-source-444--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id (lsp:json-response-error-error json-data) 'incoming-resp (lsp--ms-since before-send)) workspace))) (if callback (progn (remhash id (progn (or (progn ...) (signal ... ...)) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data))))))
  (cond ((eq val 'response) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-442-- (gethash id (progn ... ...))) (callback (car-safe (prog1 --dash-source-442-- ...))) (method (prog1 (car ...) (setq --dash-source-442-- ...))) (before-send (car (cdr --dash-source-442--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id data ... ...) workspace))) (if callback (progn (remhash id (progn ... ...)) (funcall callback (lsp:json-response-result json-data))))))) ((eq val 'response-error) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-444-- (cdr (gethash id ...))) (callback (car-safe (prog1 --dash-source-444-- ...))) (method (car-safe (prog1 --dash-source-444-- ...))) (before-send (car (cdr --dash-source-444--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id ... ... ...) workspace))) (if callback (progn (remhash id (progn ... ...)) (funcall callback (lsp:json-response-error-error json-data))))))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data))))
  (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-442-- (gethash id ...)) (callback (car-safe ...)) (method (prog1 ... ...)) (before-send (car ...))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new ... workspace))) (if callback (progn (remhash id ...) (funcall callback ...)))))) ((eq val 'response-error) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-444-- (cdr ...)) (callback (car-safe ...)) (method (car-safe ...)) (before-send (car ...))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new ... workspace))) (if callback (progn (remhash id ...) (funcall callback ...)))))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data)))))
  (let* ((client (progn (or (progn (and (memq ... cl-struct-lsp--workspace-tags) t)) (signal 'wrong-type-argument (list 'lsp--workspace workspace))) (aref workspace 5))) (id (let ((it (lsp:json-response-id json-data))) (if it (progn (if (stringp it) (string-to-number it) it))))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-442-- ...) (callback ...) (method ...) (before-send ...)) (if (lsp--log-io-p method) (progn ...)) (if callback (progn ... ...))))) ((eq val 'response-error) (let nil (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-444-- ...) (callback ...) (method ...) (before-send ...)) (if (lsp--log-io-p method) (progn ...)) (if callback (progn ... ...))))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data))))))
  (let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... workspace))) (aref workspace 5))) (id (let ((it (lsp:json-response-id json-data))) (if it (progn (if ... ... it))))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn (or id ...) nil) (let* (... ... ... ...) (if ... ...) (if callback ...)))) ((eq val 'response-error) (let nil (progn (or id ...) nil) (let* (... ... ... ...) (if ... ...) (if callback ...)))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data)))))))
  (condition-case err (let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (progn ...) (signal ... ...)) (aref workspace 5))) (id (let ((it ...)) (if it (progn ...)))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn ... nil) (let* ... ... ...))) ((eq val 'response-error) (let nil (progn ... nil) (let* ... ... ...))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data))))))) ((debug error) (message "Error processing message %S." err) nil))
  lsp--parser-on-message(#<hash-table equal 3/3 0x157643c65ccb> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities (#s(lsp--registered-capability :id "20e9985f-e537-42f1-bf66-1941f2fa14bb" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "1a96ed39-0be4-4e0f-989c-28438ed00fe0" :method "textDocument/foldingRange" :options nil) #s(lsp--registered-capability :id "ff3bc34c-98bc-46c0-a40d-155c89eb20a1" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0x157643b19931>) #s(lsp--registered-capability :id "84945b57-e70e-4798-9003-2f9686e3c877" :method "textDocument/rename" :options #<hash-table equal 1/1 0x157643b19711>) #s(lsp--registered-capability :id "bd4aee37-89a8-46c5-9003-6e9a2d60f360" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x157643b5d251>) #s(lsp--registered-capability :id "51892f89-6451-4e24-8474-ed441362a759" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x157643b5d005>) #s(lsp--registered-capability :id "01f27ef2-76cc-4862-bad5-1db6ca3cbade" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "c1f96b3a-cbca-4f41-9f2a-1ad1c6515700" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "fcdd7839-4ff3-4d85-971e-710cb32953b8" :method "textDocument/completion" :options #<hash-table equal 2/2 0x157643bf0f73>) #s(lsp--registered-capability :id "3afe9233-48b9-497c-bc7f-af1d34a28c07" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "cafe3a39-cdfa-47c3-95ed-a00565048212" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "dfa619b0-a49a-45cf-a564-5d40fef62ad2" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "df882503-2805-4121-85f1-7fda8d54e371" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "08ce1013-1f56-4d69-bdb4-9bad19e4f44b" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "d2e8473e-899d-4fe1-b093-d12ca96ce0ce" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "08e095c1-aca9-46da-af3e-968c83b694d7" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x157643b5b165>) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x157643b209dd>)) :root "/home/yuchunzhou/my-app" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure (...) (filter sentinel name environment-fn workspace) (if ... ... ...)) :test? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x15764309ab45> :request-handlers #<hash-table equal 1/65 0x1576430ec485> :response-handlers #<hash-table eql 1/65 0x157643032e97> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1576430ec4c5> :action-handlers #<hash-table equal 11/65 0x1576430ec4a5> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options (closure (t) nil (list :settings (lsp-configuration-section "java") :extendedClientCapabilities (list :progressReportProvider ... :classFileContentsSupport t :classFileContentsSupport t :overrideMethodsPromptSupport t :hashCodeEqualsPromptSupport t :advancedOrganizeImportsSupport t :generateConstructorsPromptSupport t :generateToStringPromptSupport t :advancedGenerateAccessorsSupport t :advancedExtractRefactoringSupport t :moveRefactoringSupport t :resolveAdditionalTextEditsSupport t) :bundles (lsp-java--bundles) :workspaceFolders (apply ... ...))) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn (closure (t) (_workspace) (list lsp-java-workspace-cache-dir)) :before-file-open-fn (closure (t) (_workspace) (let (...) (set ... ...))) :initialized-fn (closure (t) (workspace) (let (...) (lsp--set-configuration ...) (lsp--server-register-capability ...))) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157643032eb7> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer App.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>))
  (closure ((workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :root "/home/yuchunzhou/my-app" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x15764309ab45> :request-handlers #<hash-table equal 1/65 0x1576430ec485> :response-handlers #<hash-table eql 1/65 0x157643032e97> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1576430ec4c5> :action-handlers #<hash-table equal 11/65 0x1576430ec4a5> :major-modes ... :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options ... :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn ... :before-file-open-fn ... :initialized-fn ... :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157643032eb7> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer App.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>))) (msg) (lsp--parser-on-message msg workspace))(#<hash-table equal 3/3 0x157643c65ccb>)
  mapc((closure ((workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities (#s(lsp--registered-capability :id "20e9985f-e537-42f1-bf66-1941f2fa14bb" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "1a96ed39-0be4-4e0f-989c-28438ed00fe0" :method "textDocument/foldingRange" :options nil) #s(lsp--registered-capability :id "ff3bc34c-98bc-46c0-a40d-155c89eb20a1" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0x157643b19931>) #s(lsp--registered-capability :id "84945b57-e70e-4798-9003-2f9686e3c877" :method "textDocument/rename" :options #<hash-table equal 1/1 0x157643b19711>) #s(lsp--registered-capability :id "bd4aee37-89a8-46c5-9003-6e9a2d60f360" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x157643b5d251>) #s(lsp--registered-capability :id "51892f89-6451-4e24-8474-ed441362a759" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x157643b5d005>) #s(lsp--registered-capability :id "01f27ef2-76cc-4862-bad5-1db6ca3cbade" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "c1f96b3a-cbca-4f41-9f2a-1ad1c6515700" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "fcdd7839-4ff3-4d85-971e-710cb32953b8" :method "textDocument/completion" :options #<hash-table equal 2/2 0x157643bf0f73>) #s(lsp--registered-capability :id "3afe9233-48b9-497c-bc7f-af1d34a28c07" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "cafe3a39-cdfa-47c3-95ed-a00565048212" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "dfa619b0-a49a-45cf-a564-5d40fef62ad2" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "df882503-2805-4121-85f1-7fda8d54e371" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "08ce1013-1f56-4d69-bdb4-9bad19e4f44b" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "d2e8473e-899d-4fe1-b093-d12ca96ce0ce" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "08e095c1-aca9-46da-af3e-968c83b694d7" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x157643b5b165>) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x157643b209dd>)) :root "/home/yuchunzhou/my-app" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x15764309ab45> :request-handlers #<hash-table equal 1/65 0x1576430ec485> :response-handlers #<hash-table eql 1/65 0x157643032e97> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1576430ec4c5> :action-handlers #<hash-table equal 11/65 0x1576430ec4a5> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options (closure (t) nil (list :settings ... :extendedClientCapabilities ... :bundles ... :workspaceFolders ...)) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn (closure (t) (_workspace) (list lsp-java-workspace-cache-dir)) :before-file-open-fn (closure (t) (_workspace) (let ... ...)) :initialized-fn (closure (t) (workspace) (let ... ... ...)) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157643032eb7> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer App.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>))) (msg) (lsp--parser-on-message msg workspace)) (#<hash-table equal 3/3 0x157643c65ccb>))
  (let (messages) (while (not (s-blank? chunk)) (if (not body-length) (let* ((body-sep-pos (and t (string-match-p "\15\n\15\n" chunk)))) (if body-sep-pos (progn (setq body-length (lsp--get-body-length ...)) (setq body-received 0) (setq leftovers nil) (setq chunk (substring-no-properties chunk ...))) (progn (setq leftovers chunk) (setq chunk nil)))) (let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 ... ...) (prog1 chunk ...))) (body-bytes (string-bytes this-body))) (setq body (cons this-body body)) (setq body-received (+ body-received body-bytes)) (if (>= chunk-length left-to-receive) (progn (condition-case err (let ... ...) (error ...))))))) (mapc #'(lambda (msg) (lsp--parser-on-message msg workspace)) (nreverse messages)))
  (closure ((chunk) (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x157643b66153> :registered-server-capabilities (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :root "/home/yuchunzhou/my-app" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x15764309ab45> :request-handlers #<hash-table equal 1/65 0x1576430ec485> :response-handlers #<hash-table eql 1/65 0x157643032e97> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1576430ec4c5> :action-handlers #<hash-table equal 11/65 0x1576430ec4a5> :major-modes ... :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options ... :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn ... :before-file-open-fn ... :initialized-fn ... :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157643032eb7> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer App.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x157643b5eeef> :watches #<hash-table equal 0/65 0x157643b5f11d> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x157643b604ab> :work-done-tokens #<hash-table equal 0/65 0x157643b604cb>))) (_proc input) (setq chunk (if (s-blank? leftovers) input (concat leftovers input))) (let (messages) (while (not (s-blank? chunk)) (if (not body-length) (let* ... ...) (let* ... ... ... ...))) (mapc #'(lambda ... ...) (nreverse messages))))(#<process jdtls> "Content-Length: 2525\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":93,\"...")
  accept-process-output(nil 10.0)
  (catch 'lsp-done (accept-process-output nil (if expected-time (- expected-time send-time) 1)))
  (if (functionp 'json-rpc-connection) (catch 'lsp-done (sit-for 0.01)) (catch 'lsp-done (accept-process-output nil (if expected-time (- expected-time send-time) 1))))
  (while (not (or resp-error resp-result)) (if (functionp 'json-rpc-connection) (catch 'lsp-done (sit-for 0.01)) (catch 'lsp-done (accept-process-output nil (if expected-time (- expected-time send-time) 1)))) (setq send-time (float-time)) (if (and expected-time (< expected-time send-time)) (progn (error "Timeout while waiting for response.  Method: %s" method))))
  (progn (lsp-request-async method params #'(lambda (res) (setq resp-result (or res :finished)) (throw 'lsp-done '_)) :error-handler #'(lambda (err) (setq resp-error err) (throw 'lsp-done '_)) :no-merge no-merge :mode 'detached :cancel-token :sync-request) (while (not (or resp-error resp-result)) (if (functionp 'json-rpc-connection) (catch 'lsp-done (sit-for 0.01)) (catch 'lsp-done (accept-process-output nil (if expected-time (- expected-time send-time) 1)))) (setq send-time (float-time)) (if (and expected-time (< expected-time send-time)) (progn (error "Timeout while waiting for response.  Method: %s" method)))) (setq done? t) (cond ((eq resp-result :finished) nil) (resp-result resp-result) ((lsp-json-error? resp-error) (error (lsp:json-error-message resp-error))) ((lsp-json-error? (cl-first resp-error)) (error (lsp:json-error-message (cl-first resp-error))))))
  (unwind-protect (progn (lsp-request-async method params #'(lambda (res) (setq resp-result (or res :finished)) (throw 'lsp-done '_)) :error-handler #'(lambda (err) (setq resp-error err) (throw 'lsp-done '_)) :no-merge no-merge :mode 'detached :cancel-token :sync-request) (while (not (or resp-error resp-result)) (if (functionp 'json-rpc-connection) (catch 'lsp-done (sit-for 0.01)) (catch 'lsp-done (accept-process-output nil (if expected-time (- expected-time send-time) 1)))) (setq send-time (float-time)) (if (and expected-time (< expected-time send-time)) (progn (error "Timeout while waiting for response.  Method: %s" method)))) (setq done? t) (cond ((eq resp-result :finished) nil) (resp-result resp-result) ((lsp-json-error? resp-error) (error (lsp:json-error-message resp-error))) ((lsp-json-error? (cl-first resp-error)) (error (lsp:json-error-message (cl-first resp-error)))))) (if done? nil (lsp-cancel-request-by-token :sync-request)))
  (let* ((send-time (float-time)) (expected-time (and lsp-response-timeout (+ send-time lsp-response-timeout))) resp-result resp-error done?) (unwind-protect (progn (lsp-request-async method params #'(lambda (res) (setq resp-result (or res :finished)) (throw 'lsp-done '_)) :error-handler #'(lambda (err) (setq resp-error err) (throw 'lsp-done '_)) :no-merge no-merge :mode 'detached :cancel-token :sync-request) (while (not (or resp-error resp-result)) (if (functionp 'json-rpc-connection) (catch 'lsp-done (sit-for 0.01)) (catch 'lsp-done (accept-process-output nil (if expected-time ... 1)))) (setq send-time (float-time)) (if (and expected-time (< expected-time send-time)) (progn (error "Timeout while waiting for response.  Method: %s" method)))) (setq done? t) (cond ((eq resp-result :finished) nil) (resp-result resp-result) ((lsp-json-error? resp-error) (error (lsp:json-error-message resp-error))) ((lsp-json-error? (cl-first resp-error)) (error (lsp:json-error-message (cl-first resp-error)))))) (if done? nil (lsp-cancel-request-by-token :sync-request))))
  (if no-wait (lsp-notify method params) (let* ((send-time (float-time)) (expected-time (and lsp-response-timeout (+ send-time lsp-response-timeout))) resp-result resp-error done?) (unwind-protect (progn (lsp-request-async method params #'(lambda (res) (setq resp-result ...) (throw ... ...)) :error-handler #'(lambda (err) (setq resp-error err) (throw ... ...)) :no-merge no-merge :mode 'detached :cancel-token :sync-request) (while (not (or resp-error resp-result)) (if (functionp 'json-rpc-connection) (catch 'lsp-done (sit-for 0.01)) (catch 'lsp-done (accept-process-output nil ...))) (setq send-time (float-time)) (if (and expected-time (< expected-time send-time)) (progn (error "Timeout while waiting for response.  Method: %s" method)))) (setq done? t) (cond ((eq resp-result :finished) nil) (resp-result resp-result) ((lsp-json-error? resp-error) (error (lsp:json-error-message resp-error))) ((lsp-json-error? (cl-first resp-error)) (error (lsp:json-error-message ...))))) (if done? nil (lsp-cancel-request-by-token :sync-request)))))
  (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:no-wait :no-merge :allow-other-keys)) (if (cdr --cl-keys--) nil (error "Missing argument for %s" (car --cl-keys--))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:no-wait :no-merge..." (car --cl-keys--)))))) (if no-wait (lsp-notify method params) (let* ((send-time (float-time)) (expected-time (and lsp-response-timeout (+ send-time lsp-response-timeout))) resp-result resp-error done?) (unwind-protect (progn (lsp-request-async method params #'(lambda ... ... ...) :error-handler #'(lambda ... ... ...) :no-merge no-merge :mode 'detached :cancel-token :sync-request) (while (not (or resp-error resp-result)) (if (functionp ...) (catch ... ...) (catch ... ...)) (setq send-time (float-time)) (if (and expected-time ...) (progn ...))) (setq done? t) (cond ((eq resp-result :finished) nil) (resp-result resp-result) ((lsp-json-error? resp-error) (error ...)) ((lsp-json-error? ...) (error ...)))) (if done? nil (lsp-cancel-request-by-token :sync-request))))))
  (let* ((no-wait (car (cdr (plist-member --cl-rest-- ':no-wait)))) (no-merge (car (cdr (plist-member --cl-rest-- ':no-merge))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (if (cdr --cl-keys--) nil (error "Missing argument for %s" ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:no-wait :no-merge..." (car --cl-keys--)))))) (if no-wait (lsp-notify method params) (let* ((send-time (float-time)) (expected-time (and lsp-response-timeout (+ send-time lsp-response-timeout))) resp-result resp-error done?) (unwind-protect (progn (lsp-request-async method params #'... :error-handler #'... :no-merge no-merge :mode 'detached :cancel-token :sync-request) (while (not ...) (if ... ... ...) (setq send-time ...) (if ... ...)) (setq done? t) (cond (... nil) (resp-result resp-result) (... ...) (... ...))) (if done? nil (lsp-cancel-request-by-token :sync-request)))))))
  lsp-request("workspace/executeCommand" (:command "java.completion.onDidSelect" :arguments ["9" "1"]))
  (let ((params (if args (list :command command :arguments args) (list :command command)))) (lsp-request "workspace/executeCommand" params))
  (condition-case err (let ((params (if args (list :command command :arguments args) (list :command command)))) (lsp-request "workspace/executeCommand" params)) ((debug error) (error "`workspace/executeCommand' with `%s' failed.\n\n%S" command err)))
  lsp-workspace-command-execute("java.completion.onDidSelect" ["9" "1"])
  lsp-send-execute-command("java.completion.onDidSelect" ["9" "1"])
  (if action-handler (funcall action-handler action) (lsp-send-execute-command command arguments?))
  (let* ((action-handler (and t (lsp--find-action-handler command)))) (if action-handler (funcall action-handler action) (lsp-send-execute-command command arguments?)))
  (condition-case nil (with-no-warnings (lsp-execute-command server-id (intern command) arguments?)) (cl-no-applicable-method (let* ((action-handler (and t (lsp--find-action-handler command)))) (if action-handler (funcall action-handler action) (lsp-send-execute-command command arguments?)))))
  (let ((server-id (let ((cl-x (let (...) (progn ... ...)))) (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 15))))) (condition-case nil (with-no-warnings (lsp-execute-command server-id (intern command) arguments?)) (cl-no-applicable-method (let* ((action-handler (and t (lsp--find-action-handler command)))) (if action-handler (funcall action-handler action) (lsp-send-execute-command command arguments?))))))
  (let* ((action input0) (command (gethash "command" action)) (arguments? (gethash "arguments" action))) (let ((server-id (let ((cl-x (let ... ...))) (progn (or (progn ...) (signal ... ...)) (aref cl-x 15))))) (condition-case nil (with-no-warnings (lsp-execute-command server-id (intern command) arguments?)) (cl-no-applicable-method (let* ((action-handler (and t ...))) (if action-handler (funcall action-handler action) (lsp-send-execute-command command arguments?)))))))
  lsp--execute-command(#<hash-table equal 3/3 0x157643b1ebd1>)
  (progn (lsp--execute-command command?))
  (if command? (progn (lsp--execute-command command?)))
  (if (or (get-text-property 0 'lsp-completion-resolved candidate) command?) (if command? (progn (lsp--execute-command command?))) (lsp-completion--resolve-async item #'(lambda (input0) (let* ((command? (if ... ...))) (if command? (progn (lsp--execute-command command?)))))))
  (let* ((candidate (if (plist-member (text-properties-at 0 candidate) 'lsp-completion-item) candidate (cl-find candidate (funcall candidates) :test #'equal))) (--dash-source-1005-- (text-properties-at 0 candidate)) (item (plist-get --dash-source-1005-- 'lsp-completion-item)) (start-point (plist-get --dash-source-1005-- 'lsp-completion-start-point)) (markers (plist-get --dash-source-1005-- 'lsp-completion-markers)) (resolved (plist-get --dash-source-1005-- 'lsp-completion-resolved)) (prefix (plist-get --dash-source-1005-- 'lsp-completion-prefix)) (--dash-source-1006-- (if (and (lsp-completion--find-workspace 'ts-ls) (not resolved)) (lsp-completion--resolve item) item)) (label (if (ht? --dash-source-1006--) (progn (gethash "label" --dash-source-1006--)))) (insert-text? (if (ht? --dash-source-1006--) (progn (gethash "insertText" --dash-source-1006--)))) (text-edit? (if (ht? --dash-source-1006--) (progn (gethash "textEdit" --dash-source-1006--)))) (insert-text-format? (if (ht? --dash-source-1006--) (progn (gethash "insertTextFormat" --dash-source-1006--)))) (additional-text-edits? (if (ht? --dash-source-1006--) (progn (gethash "additionalTextEdits" --dash-source-1006--)))) (insert-text-mode? (if (ht? --dash-source-1006--) (progn (gethash "insertTextMode" --dash-source-1006--)))) (command? (if (ht? --dash-source-1006--) (progn (gethash "command" --dash-source-1006--))))) (cond (text-edit? (apply #'delete-region markers) (insert prefix) (cond ((not (ht? text-edit?)) nil) ((not (let (...) (let ... ...))) nil) ((let ((hash-table text-edit?)) (let (...) (not ...))) (let nil (lsp--apply-text-edit text-edit?))) ((not (let (...) (let ... ...))) nil) ((let ((hash-table text-edit?)) (let (...) (not ...))) (let* ((x482 ...) (x483 ...) (x484 ...)) (let (... ... ...) (lsp--apply-text-edit ...)))))) ((or (if (lsp-falsy? insert-text?) nil insert-text?) label) (apply #'delete-region markers) (insert prefix) (delete-region start-point (point)) (insert (or (if (lsp-falsy? insert-text?) nil insert-text?) label)))) (lsp--indent-lines start-point (point) insert-text-mode?) (if (equal insert-text-format? lsp/insert-text-format-snippet) (progn (lsp--expand-snippet (buffer-substring start-point (point)) start-point (point)))) (if lsp-completion-enable-additional-text-edit (progn (if (or (get-text-property 0 'lsp-completion-resolved candidate) (not (seq-empty-p additional-text-edits?))) (lsp--apply-text-edits additional-text-edits? 'completion) (let* ((--dash-source-1010-- (lsp--create-apply-text-edits-handlers)) (callback (car-safe ...)) (cleanup-fn (car --dash-source-1010--))) (lsp-completion--resolve-async item (-compose callback #'lsp:completion-item-additional-text-edits?) cleanup-fn))))) (if (or (get-text-property 0 'lsp-completion-resolved candidate) command?) (if command? (progn (lsp--execute-command command?))) (lsp-completion--resolve-async item #'(lambda (input0) (let* ((command? ...)) (if command? (progn ...)))))) (if (and (or (equal lsp-signature-auto-activate t) (memq :after-completion lsp-signature-auto-activate) (and (memq :on-trigger-char lsp-signature-auto-activate) (let ((trigger-characters? ...)) (if trigger-characters? (progn ...))))) (lsp-feature? "textDocument/signatureHelp")) (progn (lsp-signature-activate))) (set (make-local-variable 'lsp-inhibit-lsp-hooks) nil))
  (unwind-protect (let* ((candidate (if (plist-member (text-properties-at 0 candidate) 'lsp-completion-item) candidate (cl-find candidate (funcall candidates) :test #'equal))) (--dash-source-1005-- (text-properties-at 0 candidate)) (item (plist-get --dash-source-1005-- 'lsp-completion-item)) (start-point (plist-get --dash-source-1005-- 'lsp-completion-start-point)) (markers (plist-get --dash-source-1005-- 'lsp-completion-markers)) (resolved (plist-get --dash-source-1005-- 'lsp-completion-resolved)) (prefix (plist-get --dash-source-1005-- 'lsp-completion-prefix)) (--dash-source-1006-- (if (and (lsp-completion--find-workspace 'ts-ls) (not resolved)) (lsp-completion--resolve item) item)) (label (if (ht? --dash-source-1006--) (progn (gethash "label" --dash-source-1006--)))) (insert-text? (if (ht? --dash-source-1006--) (progn (gethash "insertText" --dash-source-1006--)))) (text-edit? (if (ht? --dash-source-1006--) (progn (gethash "textEdit" --dash-source-1006--)))) (insert-text-format? (if (ht? --dash-source-1006--) (progn (gethash "insertTextFormat" --dash-source-1006--)))) (additional-text-edits? (if (ht? --dash-source-1006--) (progn (gethash "additionalTextEdits" --dash-source-1006--)))) (insert-text-mode? (if (ht? --dash-source-1006--) (progn (gethash "insertTextMode" --dash-source-1006--)))) (command? (if (ht? --dash-source-1006--) (progn (gethash "command" --dash-source-1006--))))) (cond (text-edit? (apply #'delete-region markers) (insert prefix) (cond ((not (ht? text-edit?)) nil) ((not (let ... ...)) nil) ((let (...) (let ... ...)) (let nil (lsp--apply-text-edit text-edit?))) ((not (let ... ...)) nil) ((let (...) (let ... ...)) (let* (... ... ...) (let ... ...))))) ((or (if (lsp-falsy? insert-text?) nil insert-text?) label) (apply #'delete-region markers) (insert prefix) (delete-region start-point (point)) (insert (or (if (lsp-falsy? insert-text?) nil insert-text?) label)))) (lsp--indent-lines start-point (point) insert-text-mode?) (if (equal insert-text-format? lsp/insert-text-format-snippet) (progn (lsp--expand-snippet (buffer-substring start-point (point)) start-point (point)))) (if lsp-completion-enable-additional-text-edit (progn (if (or (get-text-property 0 'lsp-completion-resolved candidate) (not (seq-empty-p additional-text-edits?))) (lsp--apply-text-edits additional-text-edits? 'completion) (let* ((--dash-source-1010-- ...) (callback ...) (cleanup-fn ...)) (lsp-completion--resolve-async item (-compose callback ...) cleanup-fn))))) (if (or (get-text-property 0 'lsp-completion-resolved candidate) command?) (if command? (progn (lsp--execute-command command?))) (lsp-completion--resolve-async item #'(lambda (input0) (let* (...) (if command? ...))))) (if (and (or (equal lsp-signature-auto-activate t) (memq :after-completion lsp-signature-auto-activate) (and (memq :on-trigger-char lsp-signature-auto-activate) (let (...) (if trigger-characters? ...)))) (lsp-feature? "textDocument/signatureHelp")) (progn (lsp-signature-activate))) (set (make-local-variable 'lsp-inhibit-lsp-hooks) nil)) (lsp-completion--clear-cache))
  lsp-completion--exit-fn(#("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))) finished (closure ((done?) (result #("sout" 0 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))) #("soutm" 0 5 (lsp-completion-item #<hash-table equal 8/10 0x157643b1ec7b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))) #("sysout" 0 6 (lsp-completion-item #<hash-table equal 8/10 0x15764258ee4f> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 6 0 1 3 4 4 5 5 6)))) (bounds-start . 197) (trigger-chars . ["." "@" "#" "*" " "])) nil (let ((re (catch 'input (let (... ...) (cond ... ... ...))))) (if (eq re :interrupted) (let nil lsp-completion--last-result) (let ((res re)) (setq lsp-completion--last-result res))))))
  apply(lsp-completion--exit-fn (#("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))) finished (closure ((done?) (result #("sout" 0 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))) #("soutm" 0 5 (lsp-completion-item #<hash-table equal 8/10 0x157643b1ec7b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))) #("sysout" 0 6 (lsp-completion-item #<hash-table equal 8/10 0x15764258ee4f> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 6 0 1 3 4 4 5 5 6)))) (bounds-start . 197) (trigger-chars . ["." "@" "#" "*" " "])) nil (let ((re (catch 'input (let ... ...)))) (if (eq re :interrupted) (let nil lsp-completion--last-result) (let ((res re)) (setq lsp-completion--last-result res)))))))
  (closure ((args (closure ((done?) (result #("sout" 0 4 ...) #("soutm" 0 5 ...) #("sysout" 0 6 ...)) (bounds-start . 197) (trigger-chars . ["." "@" "#" "*" " "])) nil (let ((re ...)) (if (eq re :interrupted) (let nil lsp-completion--last-result) (let ... ...))))) (fn . lsp-completion--exit-fn)) (&rest args-before) (apply fn (append args-before args)))(#("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))) finished)
  company--capf-post-completion(#("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))))
  company-capf(post-completion #("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))))
  apply(company-capf (post-completion #("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)))))
  (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 #("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))))
  apply(company-call-backend-raw (post-completion #("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)))))
  (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 #("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)))) company-capf)
  company-call-backend(post-completion #("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))))
  (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)) (progn (setq company-backend nil) (setq company-prefix nil) (setq company-candidates nil) (setq company-candidates-length nil) (setq company-candidates-cache nil) (setq company-candidates-predicate nil) (setq company-common nil) (setq company-selection company-selection-default) (setq company-selection-changed nil) (setq company--manual-action nil) (setq company--manual-prefix nil) (setq company--point-max nil) (setq 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(#("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))))
  company-finish(#("sout" 0 1 (face (completions-first-difference) lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4)) 1 4 (lsp-completion-item #<hash-table equal 8/10 0x157643c35b0b> lsp-sort-text nil lsp-completion-start-point 197 lsp-completion-markers (197 #<marker (moves after insertion) at 220 in App.java>) lsp-completion-prefix "sou" match-data (0 4 0 1 1 2 2 3 3 4))))
  (let ((result (nth company-selection company-candidates))) (company-finish result))
  (progn (let ((result (nth company-selection company-candidates))) (company-finish result)))
  (if (and (company-manual-begin) company-selection) (progn (let ((result (nth company-selection company-candidates))) (company-finish result))))
  company-complete-selection()
  funcall-interactively(company-complete-selection)
  command-execute(company-complete-selection)

Type 3 symbols

@yyoncho i upload the screenshot

@yyoncho Maybe it's the snippet completion's problem, usual completion is ok

@yyoncho Can you look at the backtrace log?

Superficially, it looks like an error in the language server ("Internal error"). But it could be triggered by some particular behavior of lsp-mode.

Superficially, it looks like an error in the language server ("Internal error"). But it could be triggered by some particular behavior of lsp-mode.

Just the snippet completion will raise the error, other kind completion is ok

I didn't have this issue until I tried the workaround from #447 yesterday at around 11 pm UTC+3. It may not be related with #447, just a coincidence. I'm sure jdtls snippet expansion worked correctly a few days ago. I don't know how is this possible, but after the workaround, reverting changes back or even deleting .emacs.d didn't help me.

*lsp-log*

Sep 5, 2023, 11:00:10 AM Cannot evaluate the template.
Cannot evaluate the template.
org.eclipse.jface.text.templates.TemplateException: Cannot evaluate the template.
	at org.eclipse.jdt.internal.corext.template.java.JavaContextCore.evaluate(JavaContextCore.java:142)
	at org.eclipse.jdt.ls.core.internal.contentassist.SnippetCompletionProposal.evaluateGenericTemplate(SnippetCompletionProposal.java:395)
	at org.eclipse.jdt.ls.core.internal.handlers.CompletionResolveHandler.resolve(CompletionResolveHandler.java:131)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.resolveCompletionItem(JDTLanguageServer.java:620)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:144)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

java -version

openjdk version "17.0.8" 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+6-void-r1)
OpenJDK 64-Bit Server VM (build 17.0.8+6-void-r1, mixed mode, sharing)

It looks like the problem was only with the jdtls that lsp-java uses by default.

What worked for me

  1. Download jdtls 1.26.0 milestone and extract it
  2. (setq lsp-java-server-install-dir "path/to/jdtls")

It looks like the problem was only with the jdtls that lsp-java uses by default.

What worked for me

1. Download [jdtls 1.26.0 milestone](https://download.eclipse.org/jdtls/milestones/1.26.0/) and extract it

2. `(setq lsp-java-server-install-dir "path/to/jdtls")`

Thank you @marasenna , it seems that jdtls 1.26.0 has fixed this problem, i also tried this version, it's ok.