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

bump: :completion vertico (consult only) #7862

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shroomist
Copy link
Contributor

@shroomist shroomist commented May 16, 2024

Issue found with LSP +lookup/definition.
relates to minad/consult#1015
the fix itself is in this commit minad/consult@22d759c

Fix: #7863

bumping just the consult dependency to the latest tag.

debug catch
Debugger entered--Lisp error: (wrong-number-of-arguments #<subr xref--group-name-for-display> 2)
  xref--group-name-for-display("/[redacted]/packages/functions/src/gateway/types.ts" "/[redacted]/")
  #f(compiled-function (xref) #<bytecode -0x684767c19857f5f>)(#s(xref-item :summary #("export const getGwsSch = z.object({" 13 22 (face xref-match)) :location #s(xref-file-location :file "/[redacted]ccxc-g..." :line 12 :column 13)))
  consult-xref--candidates()
  consult-xref(#f(compiled-function (&rest _) #<bytecode 0x6bdb2b8a7787d24>) ((window . #<window 3 on get.ts>) (display-action) (auto-jump)))
  lsp-show-xrefs((#s(xref-item :summary #("export const getGwsSch = z.object({" 13 22 (face xref-match)) :location #s(xref-file-location :file "/[redacted]ccxc-g..." :line 12 :column 13))) nil nil)
  (progn (lsp-show-xrefs (lsp--locations-to-xref-items loc) nil nil) 'deferred)
  (if loc (progn (lsp-show-xrefs (lsp--locations-to-xref-items loc) nil nil) 'deferred) nil)
  (let* ((loc (and t (lsp-request "textDocument/definition" (lsp--text-document-position-params))))) (if loc (progn (lsp-show-xrefs (lsp--locations-to-xref-items loc) nil nil) 'deferred) nil))
  +lsp-lookup-definition-handler()
  funcall-interactively(+lsp-lookup-definition-handler)
  call-interactively(+lsp-lookup-definition-handler)
  (if (commandp handler) (call-interactively handler) (funcall handler identifier))
  +lookup--run-handler(+lsp-lookup-definition-handler #("getGwsSch" 0 9 (identifier-at-point t fontified t)))
  (condition-case e (+lookup--run-handler handler identifier) ((debug error) (if doom-inhibit-log nil (doom--log "Lookup handler %S threw an error: %s" handler e)) 'fail))
  (let ((wconf (current-window-configuration)) (result (condition-case e (+lookup--run-handler handler identifier) ((debug error) (if doom-inhibit-log nil (doom--log "Lookup handler %S threw an error: %s" handler e)) 'fail)))) (cond ((eq result 'fail) (set-window-configuration wconf) nil) ((or (get handler '+lookup-async) (eq result 'deferred))) ((or result (null origin) (/= (point-marker) origin)) (prog1 (point-marker) (set-window-configuration wconf)))))
  (condition-case e (let ((wconf (current-window-configuration)) (result (condition-case e (+lookup--run-handler handler identifier) ((debug error) (if doom-inhibit-log nil (doom--log "Lookup handler %S threw an error: %s" handler e)) 'fail)))) (cond ((eq result 'fail) (set-window-configuration wconf) nil) ((or (get handler '+lookup-async) (eq result 'deferred))) ((or result (null origin) (/= (point-marker) origin)) (prog1 (point-marker) (set-window-configuration wconf))))) ((debug error user-error) (message "Lookup handler %S: %s" handler e) nil))
  +lookup--run-handlers(+lsp-lookup-definition-handler #("getGwsSch" 0 9 (identifier-at-point t fontified t)) #<marker at 273 in get.ts>)
  run-hook-wrapped(+lookup--run-handlers +lsp-lookup-definition-handler #("getGwsSch" 0 9 (identifier-at-point t fontified t)) #<marker at 273 in get.ts>)
  (if arg (let* ((handler (and t (intern-soft (completing-read "Select lookup handler: " (delete-dups ...) nil t))))) (if handler (+lookup--run-handlers handler identifier origin) (user-error "No lookup handler selected"))) (run-hook-wrapped handlers #'+lookup--run-handlers identifier origin))
  (let* ((origin (point-marker)) (handlers (plist-get (list :definition '+lookup-definition-functions :implementations '+lookup-implementations-functions :type-definition '+lookup-type-definition-functions :references '+lookup-references-functions :documentation '+lookup-documentation-functions :file '+lookup-file-functions) prop)) (result (if arg (let* ((handler (and t ...))) (if handler (+lookup--run-handlers handler identifier origin) (user-error "No lookup handler selected"))) (run-hook-wrapped handlers #'+lookup--run-handlers identifier origin)))) (unwind-protect (if (cond ((null result) (message "No lookup handler could find %S" identifier) nil) ((markerp result) (funcall (or display-fn #'switch-to-buffer) (marker-buffer result)) (goto-char result) result) (result)) (progn (save-current-buffer (set-buffer (marker-buffer origin)) (better-jumper-set-jump (marker-position origin))) result)) (set-marker origin nil)))
  +lookup--jump-to(:definition #("getGwsSch" 0 9 (identifier-at-point t fontified t)) nil nil)
  (cond ((null identifier) (user-error "Nothing under point")) ((+lookup--jump-to :definition identifier nil arg)) ((user-error "Couldn't find the definition of %S" (substring-no-properties identifier))))
  +lookup/definition(#("getGwsSch" 0 9 (identifier-at-point t fontified t)) nil)
  funcall-interactively(+lookup/definition #("getGwsSch" 0 9 (identifier-at-point t fontified t)) nil)
  command-execute(+lookup/definition)

@upbqdn
Copy link

upbqdn commented May 17, 2024

Merging this PR will also resolve #7863.

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

Successfully merging this pull request may close these issues.

Looking up definitions and implementations doesn't work
2 participants