emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

lsp-ui-doc throws error when trying to display documentation at point #730

Closed DrMungo closed 1 year ago

DrMungo commented 1 year ago

Hello there, I'm currently having problems with lsp-ui-doc in a C++ project, using clangd as backend. It throws an error everytime it tries to display the documentation at point.

Below you'll find my emacs version, lsp package versions, and a stack trace. Please let me know if I can provide you with anymore information.

My setup: emacs 28.1.91 lsp-mode 20220811.1618 lsp-ui 20220723.1213

Stacktrace:

Debugger entered--Lisp error: (wrong-number-of-arguments ((t) nil "Send an escape code without waiting for `term-curs..." (term-cursor--eval cursor-type blink-cursor-mode)) 2)
  term-cursor--immediate(#<frame  0x56188bc720c0> #<window 10 on  *lsp-ui-doc-79691982*>)
  run-hook-with-args(term-cursor--immediate #<frame  0x56188bc720c0> #<window 10 on  *lsp-ui-doc-79691982*>)
  (let* ((after-make-frame-functions nil) (before-make-frame-hook nil) (name-buffer (lsp-ui-doc--make-buffer-name)) (buffer (get-buffer name-buffer)) (params (append lsp-ui-doc-frame-parameters (list '(name . "") (cons 'default-minibuffer-frame (selected-frame)) (cons 'minibuffer (minibuffer-window)) '(left-fringe . 0) '(right-fringe . 0) '(cursor-type) '(lsp-ui-doc--no-focus . t) (cons 'background-color (face-background 'lsp-ui-doc-background nil t))))) (window (display-buffer-in-child-frame buffer (list (cons 'child-frame-parameters params)))) (frame (window-frame window))) (save-current-buffer (set-buffer buffer) (lsp-ui-doc-frame-mode 1)) (set-frame-parameter nil 'lsp-ui-doc-buffer buffer) (set-window-dedicated-p window t) (set-face-background 'internal-border lsp-ui-doc-border frame) (if (facep 'child-frame-border) (progn (set-face-background 'child-frame-border lsp-ui-doc-border frame))) (set-face-background 'fringe nil frame) (run-hook-with-args 'lsp-ui-doc-frame-hook frame window) (if lsp-ui-doc-use-webkit (progn (define-key (current-global-map) [xwidget-event] #'(lambda nil (interactive) (let (...) (if ... ...)))) (lsp-ui-doc--webkit-run-xwidget))) frame)
  lsp-ui-doc--make-frame()
  (set-frame-parameter nil 'lsp-ui-doc-frame (lsp-ui-doc--make-frame))
  (if (lsp-ui-doc--get-frame) nil (set-frame-parameter nil 'lsp-ui-doc-frame (lsp-ui-doc--make-frame)))
  (if (lsp-ui-doc--inline-p) (lsp-ui-doc--inline) (if (lsp-ui-doc--get-frame) nil (set-frame-parameter nil 'lsp-ui-doc-frame (lsp-ui-doc--make-frame))) (if lsp-ui-doc-use-webkit nil (lsp-ui-doc--resize-buffer) (lsp-ui-doc--move-frame (lsp-ui-doc--get-frame))))
  (if (or (null string) (string-empty-p string)) (lsp-ui-doc--hide-frame) (lsp-ui-doc--highlight-hover) (lsp-ui-doc--render-buffer string symbol) (if (lsp-ui-doc--inline-p) (lsp-ui-doc--inline) (if (lsp-ui-doc--get-frame) nil (set-frame-parameter nil 'lsp-ui-doc-frame (lsp-ui-doc--make-frame))) (if lsp-ui-doc-use-webkit nil (lsp-ui-doc--resize-buffer) (lsp-ui-doc--move-frame (lsp-ui-doc--get-frame)))) (setq lsp-ui-doc--from-mouse lsp-ui-doc--from-mouse-current))
  lsp-ui-doc--display("load_related" #("### instance-method load_related\n\n---\n→ const auto..." 0 4 (markdown-heading (1 35 nil nil nil nil nil nil 1 5 5 35 35 35 #<killed buffer>) markdown-heading-3-atx (1 35 nil nil nil nil nil nil 1 5 5 35 35 35 #<killed buffer>) face markdown-header-delimiter-face display "") 4 20 (markdown-heading (1 35 nil nil nil nil nil nil 1 5 5 35 35 35 #<killed buffer>) markdown-heading-3-atx (1 35 nil nil nil nil nil nil 1 5 5 35 35 35 #<killed buffer>) face markdown-header-face-3) 20 32 (markdown-heading (1 35 nil nil nil nil nil nil 1 5 5 35 35 35 #<killed buffer>) markdown-heading-3-atx (1 35 nil nil nil nil nil nil 1 5 5 35 35 35 #<killed buffer>) face (markdown-inline-code-face markdown-header-face-3)) 32 33 (font-lock-multiline t) 34 37 (markdown-hr (37 40 37 40 #<killed buffer>) face markdown-hr-face font-lock-multiline t) 37 38 (font-lock-multiline t) 40 52 (face (markdown-inline-code-face)) 52 53 (font-lock-multiline t) 65 66 (markdown-list-item ((70 85 0 2 "- " nil (70 72 70 70 70 71 71 72))) face markdown-list-face display "●") 66 67 (markdown-list-item ((70 85 0 2 "- " nil (70 72 70 70 70 71 71 72)))) 67 78 (markdown-list-item ((70 85 0 2 "- " nil (70 72 70 70 70 71 71 72))) face (markdown-inline-code-face)) 78 79 (font-lock-multiline t) 80 83 (markdown-hr (87 90 87 90 #<killed buffer>) face markdown-hr-face font-lock-multiline t) 83 84 (font-lock-multiline t) 84 87 (markdown-gfm-code (98 223) face (font-lock-comment-delimiter-face markdown-code-face) font-lock-fontified t fontified t font-lock-multiline t) 87 132 (markdown-gfm-code (98 223) face (font-lock-comment-face markdown-code-face) font-lock-fontified t fontified t font-lock-multiline t) ...))
  (progn (lsp-ui-util-safe-kill-timer lsp-ui-doc--unfocus-frame-timer) (if hide (progn (add-hook 'post-command-hook 'lsp-ui-doc--hide-frame))) (setq lsp-ui-doc--bounds bounds) (lsp-ui-doc--display (thing-at-point 'symbol t) (let ((result (let ((result ...)) (if result (progn ...))))) (if result (progn (replace-regexp-in-string " " " " result))))))
  (if (and hover (>= (point) (car bounds)) (<= (point) (cdr bounds)) (eq buffer (current-buffer))) (progn (lsp-ui-util-safe-kill-timer lsp-ui-doc--unfocus-frame-timer) (if hide (progn (add-hook 'post-command-hook 'lsp-ui-doc--hide-frame))) (setq lsp-ui-doc--bounds bounds) (lsp-ui-doc--display (thing-at-point 'symbol t) (let ((result (let (...) (if result ...)))) (if result (progn (replace-regexp-in-string " " " " result)))))) (lsp-ui-doc--hide-frame))
  (let ((bounds (or (lsp-ui-doc--extract-bounds hover) bounds))) (if (and hover (>= (point) (car bounds)) (<= (point) (cdr bounds)) (eq buffer (current-buffer))) (progn (lsp-ui-util-safe-kill-timer lsp-ui-doc--unfocus-frame-timer) (if hide (progn (add-hook 'post-command-hook 'lsp-ui-doc--hide-frame))) (setq lsp-ui-doc--bounds bounds) (lsp-ui-doc--display (thing-at-point 'symbol t) (let ((result (let ... ...))) (if result (progn (replace-regexp-in-string " " " " result)))))) (lsp-ui-doc--hide-frame)))
  (let* ((hover input0) (contents (if (ht\? hover) (progn (gethash "contents" hover)))) (bounds input1) (buffer input2) (hide input3)) (let ((bounds (or (lsp-ui-doc--extract-bounds hover) bounds))) (if (and hover (>= (point) (car bounds)) (<= (point) (cdr bounds)) (eq buffer (current-buffer))) (progn (lsp-ui-util-safe-kill-timer lsp-ui-doc--unfocus-frame-timer) (if hide (progn (add-hook 'post-command-hook 'lsp-ui-doc--hide-frame))) (setq lsp-ui-doc--bounds bounds) (lsp-ui-doc--display (thing-at-point 'symbol t) (let ((result ...)) (if result (progn ...))))) (lsp-ui-doc--hide-frame))))
  lsp-ui-doc--callback(#<hash-table equal 2/2 0x1586206dab21> (2439 . 2451) #<buffer basic_result.hpp> nil)
  (progn (lsp-ui-doc--callback hover bounds (current-buffer) hide))
  (if (equal buf (current-buffer)) (progn (lsp-ui-doc--callback hover bounds (current-buffer) hide)))
  (closure ((hide) (buf . #<buffer basic_result.hpp>) (bounds 2439 . 2451) t) (hover) (if (equal buf (current-buffer)) (progn (lsp-ui-doc--callback hover bounds (current-buffer) hide))))(#<hash-table equal 2/2 0x1586206dab21>)
  apply((closure ((hide) (buf . #<buffer basic_result.hpp>) (bounds 2439 . 2451) t) (hover) (if (equal buf (current-buffer)) (progn (lsp-ui-doc--callback hover bounds (current-buffer) hide)))) #<hash-table equal 2/2 0x1586206dab21>)
  (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 t) nil (mapc ... hooks) (remhash cancel-token lsp--cancelable-requests)) (buf . #<buffer basic_result.hpp>) (hooks (kill-buffer-hook . t) (after-change-functions . t)) (id . 24) (method . "textDocument/hover") (start-time 25335 50205 81777 360000) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client ... :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) (cancel-token . :lsp-ui-doc-hover) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure (... ... ... t) (hover) (if ... ...)) (body :jsonrpc "2.0" :method "textDocument/hover" :params (:textDocument ... :position ...) :id 24) 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 t) (&rest args) (save-current-buffer (set-buffer buf) (apply callback args)))(#<hash-table equal 2/2 0x1586206dab21>)
  funcall((closure ((cleanup-hooks closure ((buf . #<buffer basic_result.hpp>) (hooks (kill-buffer-hook . t) (after-change-functions . t)) (id . 24) (method . "textDocument/hover") (start-time 25335 50205 81777 360000) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client ... :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) (cancel-token . :lsp-ui-doc-hover) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure (... ... ... t) (hover) (if ... ...)) (body :jsonrpc "2.0" :method "textDocument/hover" :params (:textDocument ... :position ...) :id 24) 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 t) nil (mapc #'(lambda ... ...) hooks) (remhash cancel-token lsp--cancelable-requests)) (buf . #<buffer basic_result.hpp>) (hooks (kill-buffer-hook . t) (after-change-functions . t)) (id . 24) (method . "textDocument/hover") (start-time 25335 50205 81777 360000) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect ... :test\? ...) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1586225e51e9> :request-handlers #<hash-table equal 0/65 0x1586225e528d> :response-handlers #<hash-table eql 0/65 0x158622d6d517> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x158622e9b831> :action-handlers #<hash-table equal 0/65 0x158622e9b8d5> :major-modes nil :activation-fn (closure ... ... ...) :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn (closure ... ... lsp-clients-clangd-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 nil :async-request-handlers #<hash-table equal 0/65 0x158622eb94ff> :download-server-fn (closure ... ... ...) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers (#<buffer basic_result.hpp>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) (cancel-token . :lsp-ui-doc-hover) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ((hide) (buf . #<buffer basic_result.hpp>) (bounds 2439 . 2451) t) (hover) (if (equal buf (current-buffer)) (progn (lsp-ui-doc--callback hover bounds ... hide)))) (body :jsonrpc "2.0" :method "textDocument/hover" :params (:textDocument (:uri "file:///home/max/projects/cpp-orm/src/basic_...") :position (:line 97 :character 14)) :id 24) 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 t) (&rest args) (save-current-buffer (set-buffer buf) (apply callback args))) #<hash-table equal 2/2 0x1586206dab21>)
  (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 2/2 0x1586206dab21>)) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client ... :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) (no-merge) (method . "textDocument/hover") (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 t) (&rest args) (save-current-buffer ... ...)) 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 t) (result) (let* ((x ...)) (if (eq result :error) (setq errors ...) (setq results ...))) (if (and (not ...) (eq ... ...)) (progn (funcall callback ...))))(#<hash-table equal 2/2 0x1586206dab21>)
  funcall((closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client ... :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>) . #<hash-table equal 2/2 0x1586206dab21>)) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1586225e51e9> :request-handlers #<hash-table equal 0/65 0x1586225e528d> :response-handlers #<hash-table eql 0/65 0x158622d6d517> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x158622e9b831> :action-handlers #<hash-table equal 0/65 0x158622e9b8d5> :major-modes nil :activation-fn ... :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :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 nil :async-request-handlers #<hash-table equal 0/65 0x158622eb94ff> :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers (#<buffer basic_result.hpp>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) (no-merge) (method . "textDocument/hover") (callback closure ((cleanup-hooks closure ... nil ... ...) (buf . #<buffer basic_result.hpp>) (hooks ... ...) (id . 24) (method . "textDocument/hover") (start-time 25335 50205 81777 360000) (target-workspaces ...) (cancel-token . :lsp-ui-doc-hover) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ... ... ...) (body :jsonrpc "2.0" :method "textDocument/hover" :params ... :id 24) 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 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 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 2/2 0x1586206dab21>)
  (closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (result) (lsp--request-cleanup-hooks id) (funcall callback result))(#<hash-table equal 2/2 0x1586206dab21>)
  funcall((closure ((callback closure ((errors) (results ...) (workspaces ...) (no-merge) (method . "textDocument/hover") (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 t) (result) (let* (...) (if ... ... ...)) (if (and ... ...) (progn ...))) (callback closure ((cleanup-hooks closure ... nil ... ...) (buf . #<buffer basic_result.hpp>) (hooks ... ...) (id . 24) (method . "textDocument/hover") (start-time 25335 50205 81777 360000) (target-workspaces ...) (cancel-token . :lsp-ui-doc-hover) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ... ... ...) (body :jsonrpc "2.0" :method "textDocument/hover" :params ... :id 24) 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 t) (&rest args) (save-current-buffer (set-buffer buf) (apply callback args))) (cleanup-hooks closure ((buf . #<buffer basic_result.hpp>) (hooks ... ...) (id . 24) (method . "textDocument/hover") (start-time 25335 50205 81777 360000) (target-workspaces ...) (cancel-token . :lsp-ui-doc-hover) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ... ... ...) (body :jsonrpc "2.0" :method "textDocument/hover" :params ... :id 24) 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 t) nil (mapc #'... hooks) (remhash cancel-token lsp--cancelable-requests)) (buf . #<buffer basic_result.hpp>) (hooks (kill-buffer-hook . t) (after-change-functions . t)) (id . 24) (method . "textDocument/hover") (start-time 25335 50205 81777 360000) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1586225e51e9> :request-handlers #<hash-table equal 0/65 0x1586225e528d> :response-handlers #<hash-table eql 0/65 0x158622d6d517> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x158622e9b831> :action-handlers #<hash-table equal 0/65 0x158622e9b8d5> :major-modes nil :activation-fn ... :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :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 nil :async-request-handlers #<hash-table equal 0/65 0x158622eb94ff> :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers (#<buffer basic_result.hpp>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) (cancel-token . :lsp-ui-doc-hover) (no-merge) (cancel-callback) (error-callback) (mode . tick) (callback closure ((hide) (buf . #<buffer basic_result.hpp>) (bounds 2439 . 2451) t) (hover) (if (equal buf ...) (progn ...))) (body :jsonrpc "2.0" :method "textDocument/hover" :params (:textDocument (:uri "file:///home/max/projects/cpp-orm/src/...") :position (:line 97 :character 14)) :id 24) 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 t) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) #<hash-table equal 2/2 0x1586206dab21>)
  (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-465-- (gethash id (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-465-- (setq --dash-source-465-- (cdr --dash-source-465--))))) (method (prog1 (car (cdr --dash-source-465--)) (setq --dash-source-465-- (nthcdr 2 --dash-source-465--)))) (before-send (car (cdr --dash-source-465--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id data 'incoming-resp (/ (nth 2 (time-since before-send)) 1000)) 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-465-- (gethash id (progn (or (progn ...) (signal ... ...)) (aref client 8)))) (callback (car-safe (prog1 --dash-source-465-- (setq --dash-source-465-- (cdr --dash-source-465--))))) (method (prog1 (car (cdr --dash-source-465--)) (setq --dash-source-465-- (nthcdr 2 --dash-source-465--)))) (before-send (car (cdr --dash-source-465--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id data 'incoming-resp (/ (nth 2 ...) 1000)) 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-465-- (gethash id (progn ... ...))) (callback (car-safe (prog1 --dash-source-465-- ...))) (method (prog1 (car ...) (setq --dash-source-465-- ...))) (before-send (car (cdr --dash-source-465--)))) (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-467-- (cdr (gethash id ...))) (callback (car-safe (prog1 --dash-source-467-- ...))) (method (car-safe (prog1 --dash-source-467-- ...))) (before-send (car (cdr --dash-source-467--)))) (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-465-- (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-467-- (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-465-- ...) (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-467-- ...) (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 0x1586206daacb> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command . lsp-clients--clangd-command) view-inhibit-help-message 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 t) (filter sentinel name environment-fn) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc)))) :test\? (closure ((test-command) (command . lsp-clients--clangd-command) view-inhibit-help-message 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 t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1586225e51e9> :request-handlers #<hash-table equal 0/65 0x1586225e528d> :response-handlers #<hash-table eql 0/65 0x158622d6d517> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x158622e9b831> :action-handlers #<hash-table equal 0/65 0x158622e9b8d5> :major-modes nil :activation-fn (closure ((languages "c" "cpp" "objective-c") 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 t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn (closure (t) (_workspace) lsp-clients-clangd-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 nil :async-request-handlers #<hash-table equal 0/65 0x158622eb94ff> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'clangd callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers (#<buffer basic_result.hpp>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>))
  (closure ((messages #<hash-table equal 3/3 0x1586206daacb>) (input . "Content-Length: 402\15\n\15\n{\"id\":24,\"jsonrpc\":\"...") (_proc . #<process clangd>) (chunk) (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect ... :test\? ...) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1586225e51e9> :request-handlers #<hash-table equal 0/65 0x1586225e528d> :response-handlers #<hash-table eql 0/65 0x158622d6d517> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x158622e9b831> :action-handlers #<hash-table equal 0/65 0x158622e9b8d5> :major-modes nil :activation-fn (closure ... ... ...) :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn (closure ... ... lsp-clients-clangd-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 nil :async-request-handlers #<hash-table equal 0/65 0x158622eb94ff> :download-server-fn (closure ... ... ...) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers (#<buffer basic_result.hpp>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) view-inhibit-help-message 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 t) (msg) (lsp--parser-on-message msg workspace))(#<hash-table equal 3/3 0x1586206daacb>)
  mapc((closure ((messages #<hash-table equal 3/3 0x1586206daacb>) (input . "Content-Length: 402\15\n\15\n{\"id\":24,\"jsonrpc\":\"2.0\",\"r...") (_proc . #<process clangd>) (chunk) (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :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 0/65 0x1586225e51e9> :request-handlers #<hash-table equal 0/65 0x1586225e528d> :response-handlers #<hash-table eql 0/65 0x158622d6d517> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x158622e9b831> :action-handlers #<hash-table equal 0/65 0x158622e9b8d5> :major-modes nil :activation-fn (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 t) (_file-name _mode) (-contains\? languages ...)) :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn (closure (t) (_workspace) lsp-clients-clangd-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 nil :async-request-handlers #<hash-table equal 0/65 0x158622eb94ff> :download-server-fn (closure (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 clangd> :cmd-proc #<process clangd> :buffers (#<buffer basic_result.hpp>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) view-inhibit-help-message 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 t) (msg) (lsp--parser-on-message msg workspace)) (#<hash-table equal 3/3 0x1586206daacb>))
  (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 28/28 0x158623b7fef3> :registered-server-capabilities nil :root "/home/max/projects/cpp-orm" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect ... :test\? ...) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1586225e51e9> :request-handlers #<hash-table equal 0/65 0x1586225e528d> :response-handlers #<hash-table eql 0/65 0x158622d6d517> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x158622e9b831> :action-handlers #<hash-table equal 0/65 0x158622e9b8d5> :major-modes nil :activation-fn (closure ... ... ...) :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn (closure ... ... lsp-clients-clangd-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 nil :async-request-handlers #<hash-table equal 0/65 0x158622eb94ff> :download-server-fn (closure ... ... ...) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process clangd> :cmd-proc #<process clangd> :buffers (#<buffer basic_result.hpp>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1586212f6bd9> :watches #<hash-table equal 0/65 0x1586212f6b95> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 1/65 0x1586212f6afd> :work-done-tokens #<hash-table equal 0/65 0x1586212f6ab9>)) view-inhibit-help-message 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 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* (...) (if body-sep-pos ... ...)) (let* (... ... ... ...) (setq body ...) (setq body-received ...) (if ... ...)))) (mapc #'(lambda (msg) (lsp--parser-on-message msg workspace)) (nreverse messages))))(#<process clangd> "Content-Length: 402\15\n\15\n{\"id\":24,\"jsonrpc\":\"2.0\",\"r...")
eeshugerman commented 1 year ago

Do you have lsp-ui-doc-use-childframeset? I'm seeing the same thing, have switched back to the default for now.

DrMungo commented 1 year ago

Yes I had that enabled. After switching it off everything works again. Many thanks for the suggestion!

eeshugerman commented 1 year ago

👍 sure thing. You're using Spacemacs, yes? Seems to be a Spacemacs issue -- see above.

Update: aaand it's fixed