Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With recent releases of rust-analyzer only few inlay hints show up #3896

Closed
3 tasks done
rksm opened this issue Jan 6, 2023 · 7 comments · Fixed by #3943
Closed
3 tasks done

With recent releases of rust-analyzer only few inlay hints show up #3896

rksm opened this issue Jan 6, 2023 · 7 comments · Fixed by #3943
Assignees
Labels

Comments

@rksm
Copy link
Sponsor

rksm commented Jan 6, 2023

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

lsp-mode version: 20230106.1721

With lsp-rust-analyzer-server-display-inlay-hints set to t I get the following with rust-analyzer release 2022-12-19:
image

With rust-analyzer release 2022-12-26:
image

I didn't see any errors in the lsp io log, a few hints (types in for loops) do show up.

Steps to reproduce

Open a rust buffer with lsp-rust-analyzer-server-display-inlay-hints enabled.

Expected behavior

Inlay hints for variables etc. are shown.

Which Language Server did you use?

rust-analyzer

OS

Linux

Error callstack

No response

Anything else?

No response

@rksm rksm added the bug label Jan 6, 2023
@brotzeit brotzeit self-assigned this Jan 6, 2023
@yyoncho
Copy link
Member

yyoncho commented Jan 8, 2023

I think that @brotzeit changed the properties, so they are compatible only with the latest version of rust analyzer.

@rksm
Copy link
Sponsor Author

rksm commented Jan 8, 2023

The same issue happens for rust-analyzer release 2023-01-02 and the current commit on master (I should have mentioned that in the initial description).

@brotzeit
Copy link
Member

Does it work with #3924 ?

@brotzeit
Copy link
Member

I think the right way to fix this is changing lsp-interface for rust-analyzer. I'll take another look.

@rksm
Copy link
Sponsor Author

rksm commented Jan 22, 2023

Yes it does, thank you!

@rksm
Copy link
Sponsor Author

rksm commented Jan 22, 2023

Sorry spoke to early, it was loading an older version of lsp.

With the branch and the newest rust-analyzer release I get the following error

Error processing message (wrong-type-argument stringp [#s(hash-table size 1 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("value" ": ")) #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("value" "Extent2" "location" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("uri" "file:///Users/robert/.cargo/registry/src/github.com-1ecc6299db9ec823/vek-0.15.9/src/vec.rs" "range" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 3624 "character" 4)) "end" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 3624 "character" 56)))))))) #s(hash-table size 1 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("value" "<f32>"))]). [3 times]

Stack trace looks like

Debugger entered--Lisp error: (wrong-type-argument stringp [#<hash-table equal 1/1 0x1feb1a8ba381> #<hash-table equal 2/2 0x1feb1a8ba3a7> #<hash-table equal 1/1 0x1feb1a8bd92f>])
  propertize([#<hash-table equal 1/1 0x1feb1a8ba381> #<hash-table equal 2/2 0x1feb1a8ba3a7> #<hash-table equal 1/1 0x1feb1a8bd92f>] font-lock-face lsp-rust-analyzer-inlay-type-face)
  (format "%s%s%s" (if padding-left " " "") (propertize (lsp-rust-analyzer-format-inlay label kind) 'font-lock-face (lsp-rust-analyzer-face-for-inlay kind)) (if padding-right " " ""))
  (overlay-put overlay 'before-string (format "%s%s%s" (if padding-left " " "") (propertize (lsp-rust-analyzer-format-inlay label kind) 'font-lock-face (lsp-rust-analyzer-face-for-inlay kind)) (if padding-right " " "")))
  (let* ((position (gethash "position" hint)) (label (gethash "label" hint)) (kind (gethash "kind" hint)) (padding-left (gethash "paddingLeft" hint)) (padding-right (gethash "paddingRight" hint)) (pos (lsp--position-to-point position)) (overlay (make-overlay pos pos nil 'front-advance 'end-advance))) (if (hash-table-p label) (progn (setq label (mapconcat '(lambda (h) (lsp-get h :value)) label)))) (overlay-put overlay 'lsp-rust-analyzer-inlay-hint t) (overlay-put overlay 'before-string (format "%s%s%s" (if padding-left " " "") (propertize (lsp-rust-analyzer-format-inlay label kind) 'font-lock-face (lsp-rust-analyzer-face-for-inlay kind)) (if padding-right " " ""))))
  (let ((hint (car --dolist-tail--))) (let* ((position (gethash "position" hint)) (label (gethash "label" hint)) (kind (gethash "kind" hint)) (padding-left (gethash "paddingLeft" hint)) (padding-right (gethash "paddingRight" hint)) (pos (lsp--position-to-point position)) (overlay (make-overlay pos pos nil 'front-advance 'end-advance))) (if (hash-table-p label) (progn (setq label (mapconcat '(lambda ... ...) label)))) (overlay-put overlay 'lsp-rust-analyzer-inlay-hint t) (overlay-put overlay 'before-string (format "%s%s%s" (if padding-left " " "") (propertize (lsp-rust-analyzer-format-inlay label kind) 'font-lock-face (lsp-rust-analyzer-face-for-inlay kind)) (if padding-right " " "")))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (while --dolist-tail-- (let ((hint (car --dolist-tail--))) (let* ((position (gethash "position" hint)) (label (gethash "label" hint)) (kind (gethash "kind" hint)) (padding-left (gethash "paddingLeft" hint)) (padding-right (gethash "paddingRight" hint)) (pos (lsp--position-to-point position)) (overlay (make-overlay pos pos nil 'front-advance 'end-advance))) (if (hash-table-p label) (progn (setq label (mapconcat '... label)))) (overlay-put overlay 'lsp-rust-analyzer-inlay-hint t) (overlay-put overlay 'before-string (format "%s%s%s" (if padding-left " " "") (propertize (lsp-rust-analyzer-format-inlay label kind) 'font-lock-face (lsp-rust-analyzer-face-for-inlay kind)) (if padding-right " " "")))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((--dolist-tail-- res)) (while --dolist-tail-- (let ((hint (car --dolist-tail--))) (let* ((position (gethash "position" hint)) (label (gethash "label" hint)) (kind (gethash "kind" hint)) (padding-left (gethash "paddingLeft" hint)) (padding-right (gethash "paddingRight" hint)) (pos (lsp--position-to-point position)) (overlay (make-overlay pos pos nil 'front-advance 'end-advance))) (if (hash-table-p label) (progn (setq label (mapconcat ... label)))) (overlay-put overlay 'lsp-rust-analyzer-inlay-hint t) (overlay-put overlay 'before-string (format "%s%s%s" (if padding-left " " "") (propertize (lsp-rust-analyzer-format-inlay label kind) 'font-lock-face (lsp-rust-analyzer-face-for-inlay kind)) (if padding-right " " "")))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  (closure ((buffer . #<buffer layout.rs>) lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (res) (remove-overlays (point-min) (point-max) 'lsp-rust-analyzer-inlay-hint t) (let ((--dolist-tail-- res)) (while --dolist-tail-- (let ((hint (car --dolist-tail--))) (let* ((position ...) (label ...) (kind ...) (padding-left ...) (padding-right ...) (pos ...) (overlay ...)) (if (hash-table-p label) (progn ...)) (overlay-put overlay 'lsp-rust-analyzer-inlay-hint t) (overlay-put overlay 'before-string (format "%s%s%s" ... ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))))((#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>))
  apply((closure ((buffer . #<buffer layout.rs>) lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (res) (remove-overlays (point-min) (point-max) 'lsp-rust-analyzer-inlay-hint t) (let ((--dolist-tail-- res)) (while --dolist-tail-- (let ((hint (car --dolist-tail--))) (let* ((position ...) (label ...) (kind ...) (padding-left ...) (padding-right ...) (pos ...) (overlay ...)) (if (hash-table-p label) (progn ...)) (overlay-put overlay 'lsp-rust-analyzer-inlay-hint t) (overlay-put overlay 'before-string (format "%s%s%s" ... ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>))
  (save-current-buffer (set-buffer buf) (apply callback args))
  (closure ((cleanup-hooks closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) nil (mapc ... hooks) (remhash cancel-token lsp--cancelable-requests)) (hooks (kill-buffer-hook . t) (after-change-functions . t)) (cancel-callback) (buf . #<buffer layout.rs>) (id . 44) (method . "textDocument/inlayHint") (start-time 25549 31296 369579 0) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities ... :root "/Users/robert/projects/rust/f..." :client ... :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>)) (cancel-token) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure (... lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (res) (remove-overlays ... ... ... t) (let ... ...)) (body :jsonrpc "2.0" :method "textDocument/inlayHint" :params #<hash-table equal 2/65 0x1feb1a8a0d31> :id 44) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (&rest args) (save-current-buffer (set-buffer buf) (apply callback args)))((#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>))
  funcall((closure ((cleanup-hooks closure ((hooks ... ...) (cancel-callback) (buf . #<buffer layout.rs>) (id . 44) (method . "textDocument/inlayHint") (start-time 25549 31296 369579 0) (target-workspaces ...) (cancel-token) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ... ... ... ...) (body :jsonrpc "2.0" :method "textDocument/inlayHint" :params #<hash-table equal 2/65 0x1feb1a8a0d31> :id 44) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) nil (mapc #'... hooks) (remhash cancel-token lsp--cancelable-requests)) (hooks (kill-buffer-hook . t) (after-change-functions . t)) (cancel-callback) (buf . #<buffer layout.rs>) (id . 44) (method . "textDocument/inlayHint") (start-time 25549 31296 369579 0) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities (... ...) :root "/Users/robert/projects/rust/force-atla..." :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 1/65 0x1feb13719a47> :request-handlers #<hash-table equal 0/65 0x1feb13719c95> :response-handlers #<hash-table eql 2/65 0x1feb13719cb5> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1feb13719cd5> :action-handlers #<hash-table equal 3/65 0x1feb13719c75> :major-modes nil :activation-fn ... :priority 1 :server-id rust-analyzer :multi-root nil :initialization-options lsp-rust-analyzer--make-init-options :semantic-tokens-faces-overrides ... :custom-capabilities ... :library-folders-fn ... :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn ... :async-request-handlers #<hash-table equal 0/65 0x1feb1371ffbd> :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers (#<buffer layout.rs> #<killed buffer>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>)) (cancel-token) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ((buffer . #<buffer layout.rs>) lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (res) (remove-overlays (point-min) (point-max) 'lsp-rust-analyzer-inlay-hint t) (let (...) (while --dolist-tail-- ...))) (body :jsonrpc "2.0" :method "textDocument/inlayHint" :params #<hash-table equal 2/65 0x1feb1a8a0d31> :id 44) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (&rest args) (save-current-buffer (set-buffer buf) (apply callback args))) (#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>))
  (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 ...) (workspaces ...) (no-merge) (method . "textDocument/inlayHint") (callback closure ... ... ...) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (result) (let* (...) (if ... ... ...)) (if (and ... ...) (progn ...)))([#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>])
  funcall((closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities ... :root "/Users/robert/projects/rust/force-atla..." :client ... :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>) . [#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>])) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities (... ...) :root "/Users/robert/projects/rust/force-atla..." :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 1/65 0x1feb13719a47> :request-handlers #<hash-table equal 0/65 0x1feb13719c95> :response-handlers #<hash-table eql 2/65 0x1feb13719cb5> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1feb13719cd5> :action-handlers #<hash-table equal 3/65 0x1feb13719c75> :major-modes nil :activation-fn ... :priority 1 :server-id rust-analyzer :multi-root nil :initialization-options lsp-rust-analyzer--make-init-options :semantic-tokens-faces-overrides ... :custom-capabilities ... :library-folders-fn ... :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn ... :async-request-handlers #<hash-table equal 0/65 0x1feb1371ffbd> :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers (#<buffer layout.rs> #<killed buffer>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>)) (no-merge) (method . "textDocument/inlayHint") (callback closure ((cleanup-hooks closure ... nil ... ...) (hooks ... ...) (cancel-callback) (buf . #<buffer layout.rs>) (id . 44) (method . "textDocument/inlayHint") (start-time 25549 31296 369579 0) (target-workspaces ...) (cancel-token) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ... ... ... ...) (body :jsonrpc "2.0" :method "textDocument/inlayHint" :params #<hash-table equal 2/65 0x1feb1a8a0d31> :id 44) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (&rest args) (save-current-buffer (set-buffer buf) (apply callback args))) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (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 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>])
  (closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (result) (lsp--request-cleanup-hooks id) (funcall callback result))([#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>])
  funcall((closure ((callback closure (... ... ... ... ... ... cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (result) (let* ... ...) (if ... ...)) (callback closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (&rest args) (save-current-buffer ... ...)) (cleanup-hooks closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) nil (mapc ... hooks) (remhash cancel-token lsp--cancelable-requests)) (hooks (kill-buffer-hook . t) (after-change-functions . t)) (cancel-callback) (buf . #<buffer layout.rs>) (id . 44) (method . "textDocument/inlayHint") (start-time 25549 31296 369579 0) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities ... :root "/Users/robert/projects/rust/forc..." :client ... :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>)) (cancel-token) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure (... lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (res) (remove-overlays ... ... ... t) (let ... ...)) (body :jsonrpc "2.0" :method "textDocument/inlayHint" :params #<hash-table equal 2/65 0x1feb1a8a0d31> :id 44) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) [#<hash-table equal 5/5 0x1feb1a8ba2cb> #<hash-table equal 5/5 0x1feb1a8bd955> #<hash-table equal 5/5 0x1feb1a8be101> #<hash-table equal 5/5 0x1feb1a8be385> #<hash-table equal 5/5 0x1feb1a8be439> #<hash-table equal 5/5 0x1feb1a8be6cd> #<hash-table equal 5/5 0x1feb1a8bf477> #<hash-table equal 5/5 0x1feb1a8bf8b7> #<hash-table equal 5/5 0x1feb1a8bfb3f> #<hash-table equal 5/5 0x1feb1a8bfbf3> #<hash-table equal 5/5 0x1feb1a8bfe81> #<hash-table equal 5/5 0x1feb1a8bff3f> #<hash-table equal 5/5 0x1feb1a8c01d9> #<hash-table equal 5/5 0x1feb1a8c028d>])
  (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-result 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-result json-data))))
  (let* ((--dash-source-573-- (gethash id (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-573-- (setq --dash-source-573-- (cdr --dash-source-573--))))) (method (prog1 (car (cdr --dash-source-573--)) (setq --dash-source-573-- (nthcdr 2 --dash-source-573--)))) (before-send (car (cdr --dash-source-573--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id 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-result json-data)))))
  (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-573-- (gethash id (progn (or (progn ...) (signal ... ...)) (aref client 8)))) (callback (car-safe (prog1 --dash-source-573-- (setq --dash-source-573-- (cdr --dash-source-573--))))) (method (prog1 (car (cdr --dash-source-573--)) (setq --dash-source-573-- (nthcdr 2 --dash-source-573--)))) (before-send (car (cdr --dash-source-573--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id 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-result json-data))))))
  (cond ((eq val 'response) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-573-- (gethash id (progn ... ...))) (callback (car-safe (prog1 --dash-source-573-- ...))) (method (prog1 (car ...) (setq --dash-source-573-- ...))) (before-send (car (cdr --dash-source-573--)))) (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-575-- (cdr (gethash id ...))) (callback (car-safe (prog1 --dash-source-575-- ...))) (method (car-safe (prog1 --dash-source-575-- ...))) (before-send (car (cdr --dash-source-575--)))) (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-573-- (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-575-- (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-573-- ...) (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-575-- ...) (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 0x1feb1a8ba257> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities (#s(lsp--registered-capability :id "workspace/didChangeWatchedFiles" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x1feb136e6e15>) #s(lsp--registered-capability :id "workspace/didChangeWatchedFiles" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x1feb1641d501>)) :root "/Users/robert/projects/rust/forc..." :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test\? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 1/65 0x1feb13719a47> :request-handlers #<hash-table equal 0/65 0x1feb13719c95> :response-handlers #<hash-table eql 2/65 0x1feb13719cb5> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1feb13719cd5> :action-handlers #<hash-table equal 3/65 0x1feb13719c75> :major-modes nil :activation-fn (closure (... eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (_file-name _mode) (-contains\? languages ...)) :priority 1 :server-id rust-analyzer :multi-root nil :initialization-options lsp-rust-analyzer--make-init-options :semantic-tokens-faces-overrides (:discard-default-modifiers t :modifiers (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)) :custom-capabilities ((experimental ...)) :library-folders-fn (closure (lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (_workspace) lsp-rust-analyzer-library-directories) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn (closure (lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) nil (if lsp-rust-analyzer-server-display-inlay-hints ...)) :async-request-handlers #<hash-table equal 0/65 0x1feb1371ffbd> :download-server-fn (closure (lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (_client callback error-callback _update\?) (lsp-package-ensure ... callback error-callback)) :download-in-progress? nil :buffers nil ...) :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers (#<buffer layout.rs> #<killed buffer>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>))
  (closure ((messages #<hash-table equal 3/3 0x1feb1a8c0e6f>) (input . "Content-Length: 5681\15\n\15\n{\"jsonrpc\":\"...") (_proc . #<process rust-analyzer>) (chunk) (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities (... ...) :root "/Users/robert/projects/rust/force-at..." :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 1/65 0x1feb13719a47> :request-handlers #<hash-table equal 0/65 0x1feb13719c95> :response-handlers #<hash-table eql 2/65 0x1feb13719cb5> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1feb13719cd5> :action-handlers #<hash-table equal 3/65 0x1feb13719c75> :major-modes nil :activation-fn ... :priority 1 :server-id rust-analyzer :multi-root nil :initialization-options lsp-rust-analyzer--make-init-options :semantic-tokens-faces-overrides ... :custom-capabilities ... :library-folders-fn ... :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn ... :async-request-handlers #<hash-table equal 0/65 0x1feb1371ffbd> :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers (#<buffer layout.rs> #<killed buffer>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (msg) (lsp--parser-on-message msg workspace))(#<hash-table equal 3/3 0x1feb1a8ba257>)
  mapc((closure ((messages #<hash-table equal 3/3 0x1feb1a8c0e6f>) (input . "Content-Length: 5681\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":44,\"...") (_proc . #<process rust-analyzer>) (chunk) (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 25/25 0x1feb13edd1bd> :registered-server-capabilities (#s(lsp--registered-capability :id "workspace/didChangeWatchedFiles" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x1feb136e6e15>) #s(lsp--registered-capability :id "workspace/didChangeWatchedFiles" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x1feb1641d501>)) :root "/Users/robert/projects/rust/force-atlas-2-layouter" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test\? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 1/65 0x1feb13719a47> :request-handlers #<hash-table equal 0/65 0x1feb13719c95> :response-handlers #<hash-table eql 2/65 0x1feb13719cb5> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1feb13719cd5> :action-handlers #<hash-table equal 3/65 0x1feb13719c75> :major-modes nil :activation-fn (closure (... eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (_file-name _mode) (-contains\? languages ...)) :priority 1 :server-id rust-analyzer :multi-root nil :initialization-options lsp-rust-analyzer--make-init-options :semantic-tokens-faces-overrides (:discard-default-modifiers t :modifiers (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)) :custom-capabilities ((experimental ...)) :library-folders-fn (closure (lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (_workspace) lsp-rust-analyzer-library-directories) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn (closure (lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) nil (if lsp-rust-analyzer-server-display-inlay-hints ...)) :async-request-handlers #<hash-table equal 0/65 0x1feb1371ffbd> :download-server-fn (closure (lsp-rust-analyzer-status-mode-abbrev-table lsp-rust-analyzer-status-mode-syntax-table lsp-rust-analyzer-syntax-tree-mode-abbrev-table lsp-rust-analyzer-syntax-tree-mode-syntax-table t) (_client callback error-callback _update\?) (lsp-package-ensure ... callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers (#<buffer layout.rs> #<killed buffer>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (msg) (lsp--parser-on-message msg workspace)) (#<hash-table equal 3/3 0x1feb1a8ba257> #<hash-table equal 3/3 0x1feb1a8c0e6f>))
  (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 25/25 0x1feb13edd1bd> :registered-server-capabilities (... ...) :root "/Users/robert/projects/rust/force-at..." :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 1/65 0x1feb13719a47> :request-handlers #<hash-table equal 0/65 0x1feb13719c95> :response-handlers #<hash-table eql 2/65 0x1feb13719cb5> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1feb13719cd5> :action-handlers #<hash-table equal 3/65 0x1feb13719c75> :major-modes nil :activation-fn ... :priority 1 :server-id rust-analyzer :multi-root nil :initialization-options lsp-rust-analyzer--make-init-options :semantic-tokens-faces-overrides ... :custom-capabilities ... :library-folders-fn ... :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn ... :async-request-handlers #<hash-table equal 0/65 0x1feb1371ffbd> :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process rust-analyzer> :cmd-proc #<process rust-analyzer> :buffers (#<buffer layout.rs> #<killed buffer>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1feb13c4ec07> :watches #<hash-table equal 0/65 0x1feb13c4f587> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 7/65 0x1feb13c9c14d> :work-done-tokens #<hash-table equal 0/65 0x1feb13c5e923>)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode t) (_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 rust-analyzer> "Content-Length: 5681\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":44,\"...")

npajkovsky pushed a commit to npajkovsky/lsp-mode that referenced this issue Feb 3, 2023
rust-analyzer has changed the inlay hint label from string to array
of structs where struct has the member *value* contain inlay hints.

The algorithm just iterate over label array, and concats all *value* into
one string that's printed out.

"label": [
      {
        "value": ": "
      },
      {
        "value": "File",
        "location": {
          "uri": "file:///home/nikola/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs",
          "range": {
            "start": {
              "line": 97,
              "character": 11
            },
            "end": {
              "line": 97,
              "character": 15
            }
          }
        }
      },
      {
        "value": ""
      }

Close emacs-lsp#3896
Signed-off-by: Nikola Pajkovsky <nikola@enhance.com>
npajkovsky pushed a commit to npajkovsky/lsp-mode that referenced this issue Feb 3, 2023
rust-analyzer has changed the inlay hint label from string to array
of structs where struct has the member *value* contain inlay hints.

The algorithm just iterate over label array, and concats all *value* into
one string that's printed out.

"label": [
      {
        "value": ": "
      },
      {
        "value": "File",
        "location": {
          "uri": "file:///home/nikola/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs",
          "range": {
            "start": {
              "line": 97,
              "character": 11
            },
            "end": {
              "line": 97,
              "character": 15
            }
          }
        }
      },
      {
        "value": ""
      }

Close emacs-lsp#3896
Signed-off-by: Nikola Pajkovsky <nikola@enhance.com>
brotzeit pushed a commit that referenced this issue Feb 3, 2023
rust-analyzer has changed the inlay hint label from string to array
of structs where struct has the member *value* contain inlay hints.

The algorithm just iterate over label array, and concats all *value* into
one string that's printed out.

"label": [
      {
        "value": ": "
      },
      {
        "value": "File",
        "location": {
          "uri": "file:///home/nikola/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs",
          "range": {
            "start": {
              "line": 97,
              "character": 11
            },
            "end": {
              "line": 97,
              "character": 15
            }
          }
        }
      },
      {
        "value": ""
      }

Close #3896
Signed-off-by: Nikola Pajkovsky <nikola@enhance.com>
@rksm
Copy link
Sponsor Author

rksm commented Feb 4, 2023

Thank you 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants