GithubHelp home page GithubHelp logo

lsp-ivy's Introduction

Ivy lsp integration

https://melpa.org/packages/lsp-ivy-badge.svg https://stable.melpa.org/packages/lsp-ivy-badge.svg

This package provides an interactive ivy interface to the workspace symbol functionality offered by lsp-mode. For an alternative implementation based on helm, see https://github.com/emacs-lsp/helm-lsp

Screenshot

demo.png

Commands

  • lsp-ivy-workspace-symbol - workspace symbols for the current workspace
  • lsp-ivy-global-workspace-symbol - workspace symbols from all of the active workspaces.

lsp-ivy's People

Contributors

abo-abo avatar ericdallo avatar jcs090218 avatar kha avatar kiennq avatar nbfalcon avatar orausch avatar raxod502 avatar sebastiansturm avatar tarsius avatar yyoncho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsp-ivy's Issues

Error on running lsp-ivy-workspace-symbol

Debugger entered--Lisp error: (wrong-type-argument stringp #<hash-table equal 5/65 0x1ba8015>)
  substring-no-properties(#<hash-table equal 5/65 0x1ba8015>)
  prescient-remember(#<hash-table equal 5/65 0x1ba8015>)
  #f(compiled-function (x) #<bytecode 0x3bfcb15>)(#<hash-table equal 5/65 0x1ba8015>)
  ivy-call()
  #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x3b7b50d>)("Workspace symbol: " #f(compiled-function (user-input) #<bytecode 0x15a5d55>) :dynamic-collection t :require-match t :initial-input nil :action lsp-ivy--workspace-symbol-action :caller lsp-ivy-workspace-symbol :sort t)
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x3b7b50d>) ("Workspace symbol: " #f(compiled-function (user-input) #<bytecode 0x15a5d55>) :dynamic-collection t :require-match t :initial-input nil :action lsp-ivy--workspace-symbol-action :caller lsp-ivy-workspace-symbol :sort t))
  ivy-read("Workspace symbol: " #f(compiled-function (user-input) #<bytecode 0x15a5d55>) :dynamic-collection t :require-match t :initial-input nil :action lsp-ivy--workspace-symbol-action :caller lsp-ivy-workspace-symbol)
  lsp-ivy--workspace-symbol((#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 19/65 0x1c86249> :registered-server-capabilities (#s(lsp--registered-capability :id "5ff1518e-3402-4f27-abf9-90de61677b13" :method "textDocument/rangeFormatting" :options #<hash-table equal 1/65 0x30b69a9>) #s(lsp--registered-capability :id "720bd6aa-3950-46dc-871b-5bc460108783" :method "textDocument/formatting" :options #<hash-table equal 1/65 0x143f965>) #s(lsp--registered-capability :id "9dec01f6-535e-460d-aeba-23ff29969670" :method "workspace/didChangeWorkspaceFolders" :options #<hash-table equal 0/65 0x347cd55>)) :root "/home/karthik/deliveryhero/pd-archimedes" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn) #<bytecode 0x1763de9>) :test\? #f(compiled-function () #<bytecode 0x1763dd1>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 2/65 0x2cb3189> :request-handlers #<hash-table equal 0/65 0x2ccbf2d> :response-handlers #<hash-table eql 0/65 0x2ccfac1> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x2cdfeb5> :action-handlers #<hash-table equal 0/65 0x2d20285> :major-modes (php-mode) :activation-fn nil :priority -1 :server-id iph :multi-root t :initialization-options #f(compiled-function () #<bytecode 0x1763e71>) :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x2d30585> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc #<process iph> :cmd-proc #<process iph> :buffers (#<buffer AppCache.php> #<buffer CheckoutServiceInterface.php> #<buffer CartSkeleton.php> #<buffer OrderController.php> #<buffer OrderMetaData.php> #<buffer CheckoutCart.php> #<buffer ApiResponseListener.php> #<buffer ApiTotalAmountMismatchException.php> #<buffer ApiOrderProviderInterface.php> #<buffer CheckoutService.php> #<buffer ApiOrderProvider.php> #<buffer .#ApiOrderProvider.php>) :semantic-highlighting-faces nil :semantic-highlighting-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x106efa1> :watches #<hash-table equal 0/65 0x10529dd> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 2/65 0x105297d> :work-done-tokens #<hash-table equal 0/65 0x128e6d5>)) "Workspace symbol: " nil)
  lsp-ivy-workspace-symbol(nil)
  funcall-interactively(lsp-ivy-workspace-symbol nil)
  call-interactively(lsp-ivy-workspace-symbol nil nil)
  #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x1d1b0b>)(lsp-ivy-workspace-symbol nil nil nil)
  ad-Advice-command-execute(#f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x1d1b0b>) lsp-ivy-workspace-symbol)
  apply(ad-Advice-command-execute #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x1d1b0b>) lsp-ivy-workspace-symbol)
  command-execute(lsp-ivy-workspace-symbol)

I'm not sure if this is the right place for this, happy to report this elsewhere.

Correct results are only visible for a short time, if you type to quickly

I noticed a strange behaviour with lsp-ivy-workspace-symbol and lsp-ivy-global-workspace-symbol when I enter the search string too rapidly:

lsp-ivy

As you can see the correct result is shown for a short time before jumping to a more general result.

I had a look into the source of lsp-ivy--workspace-symbol and noticed that the current-request-id which is used to cancel any former lsp-request is always nil. Therefore I assume that the following happens:

  • user types "S", request is sent out (request 1)
  • user continues typing "tage", request is sent out (request 2)
  • request 2 arrives shows the correct results for "Stage"
  • request 1 arrives overwriting the former results, which is not what the users wants to see

I hope you understand what I mean ๐Ÿ˜…

I found that the :id value is only present after the request was sent out using lsp-send-request-async there I came up with the following solution, which has worked for me so far:

(defun lsp-ivy--workspace-symbol (workspaces prompt initial-input)
  "Search against WORKSPACES with PROMPT and INITIAL-INPUT."
  (let ((current-request-id nil))
    (ivy-read
     prompt
     (lambda (user-input)
       (with-lsp-workspaces workspaces
         (let ((request (lsp-make-request
                         "workspace/symbol"
                         (list :query user-input))))
           (when current-request-id
             (lsp--cancel-request current-request-id))
           ;; extract the request-id from the body after is has been sent
           (setq current-request-id
		 (plist-get
		  (lsp-send-request-async
		   request
		   (lambda (result)
		     (ivy-update-candidates (-remove 'lsp-ivy--filter-func result)))
		   :mode 'detached) :id))))
       0)
     :dynamic-collection t
     :require-match t
     :initial-input initial-input
     :action #'lsp-ivy--workspace-symbol-action
     :caller 'lsp-ivy-workspace-symbol)))

So far I could only test this with lsp-java, but I guess it should work for other language-servers as well. Maybe there is a better solution as I am not really familiar with the whole lsp-mode source code, but I am open for feedback and suggestions ๐Ÿ˜Š

lsp-ivy-workspace-symbol not correctly working with Omnisharp

I am working on an Unity (csharp) project and when trying lsp-ivy-workspace-symbol I get 100 symbols (max symbols per listing) but doesn't matter what I type, nothing gets filtered. If I add a prefix to lsp-ivy-workspace-symbol it works as intended. This bug happended recently. It was working perfectly before.

lsp-ivy-workspace-symbol weird matching behavior

I'm experiencing a weird behavior with the listing of symbols when using lsp-ivy-workspace-symbol. The bug in an omnisharp workspace, but I don't think that makes a difference. It is hard to describe, but here are shots of the problem:

Working correctly:
lsp-ivy-workspace-symbol_bug_showing

Bugged:
lsp-ivy-workspace-symbol_bug_not_showing

I believe in both scenarios the matches should be the same, since I just removed the "o" from the search.

lsp-ivy-workspace-symbol error: "Error processing message (wrong-number-of-arguments (1 . 1) 3)."

Entirely possible this is not lsp-mode's fault, but as I've no real understanding which of the packages is responsible for the recent break in functionality I'll start here. Feel free to point me towards the correct package.

Describe the bug
Invoking lsp-ivy-workspace-symbol resuls in: Error processing message (wrong-number-of-arguments (1 . 1) 3). and debug output.

To Reproduce

  1. edit lsp-start-plain.el line 44 to contain: (pkg-list '(ivy yasnippet lsp-mode lsp-ivy company)))
  2. add (setq lsp-print-io t) into lsp-start-plain.el
  3. start emacs -q -l lsp-start-plain.el
  4. create main.c with: int main() { return 0; }
  5. invoke M-x and then lsp-ivy-workspace-symbol

Expected behavior
Emacs should not display an error message or debug output when the prompt in the mininbuffer comes up.

Which Language Server did you use
lsp-clangd

OS
linux

Error callstack
Backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments (((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or (car parts) "")) (filter-regexps? (mapcar #'regexp-quote (cdr parts)))) (if query (progn (if (string-equal prev-query query) (funcall update-candidates unfiltered-candidates filter-regexps?) (let (...) (lsp-request-async "workspace/symbol" ... ... :mode ... :cancel-token :workspace-symbol))))) (setq prev-query query)) (or filtered-candidates 0)) 3)
(closure ((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (all-candidates filter-regexps?) (setq filtered-candidates (let ... ... ...)) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_tes..." :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or ... "")) (filter-regexps? (mapcar ... ...))) (if query (progn (if ... ... ...))) (setq prev-query query)) (or filtered-candidates 0))("" nil metadata)
completion-metadata("" (closure ((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or (car parts) "")) (filter-regexps? (mapcar #'regexp-quote (cdr parts)))) (if query (progn (if (string-equal prev-query query) (funcall update-candidates unfiltered-candidates filter-regexps?) (let (...) (lsp-request-async "workspace/symbol" ... ... :mode ... :cancel-token :workspace-symbol))))) (setq prev-query query)) (or filtered-candidates 0)) nil)
(let ((ivy--minibuffer-metadata (completion-metadata "" minibuffer-completion-table minibuffer-completion-predicate))) (ivy--insert-minibuffer (ivy--format (setq ivy--all-candidates cands))))
ivy-update-candidates(nil)
(closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let ((list all-candidates) (i 0) it it-index) (ignore it it-index) (while list (setq it (car-safe ...) it-index i i (1+ i)) (let (...) (if mapped ...)))) (nreverse result))) (ivy-update-candidates filtered-candidates))(nil nil)
funcall((closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let ((list all-candidates) (i 0) it it-index) (ignore it it-index) (while list (setq it (car-safe ...) it-index i i (1+ i)) (let (...) (if mapped ...)))) (nreverse result))) (ivy-update-candidates filtered-candidates)) nil nil)
(closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (all-candidates filter-regexps?) (setq filtered-candidates (let ... ... ...)) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_tes..." :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?))(nil)
funcall((closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) nil)
(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 #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_..." :client ... :host-root nil :proc # :cmd-proc # :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) (no-merge) (method . "workspace/symbol") (callback closure (... ... ... ... ... ... ... ... ... ... ... ... t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) 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 company-backends t) (result) (let* ((v ...)) (if (eq result :error) (setq errors ...) (setq results ...))) (if (and (not ...) (eq ... ...)) (progn (funcall callback ...))))([])
funcall((closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client ... :host-root nil :proc # :cmd-proc # :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>) . [])) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) (no-merge) (method . "workspace/symbol") (callback closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ... ... ... ...) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) 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 company-backends t) (result) (let* ((v (cons lsp--cur-workspace result))) (if (eq result :error) (setq errors (cons v errors)) (setq results (cons v results)))) (if (and (not (eq ... ...)) (eq (+ ... ...) (length workspaces))) (progn (funcall callback (if no-merge results ...))))) [])
(closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (result) (lsp--request-cleanup-hooks id) (funcall callback result))([])
funcall((closure ((callback closure ((errors) (results ...) (workspaces ...) (no-merge) (method . "workspace/symbol") (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 company-backends t) (result) (let* (...) (if ... ... ...)) (if (and ... ...) (progn ...))) (callback closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ... ... ... ...) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) (cleanup-hooks closure ((buf . #) (hooks) (id . 10) (method . "workspace/symbol") (start-time 24569 27682 119319 598000) (target-workspaces ...) (cancel-token . :workspace-symbol) (no-merge) (cancel-callback) (error-callback) (mode . detached) (callback closure ... ... ... ...) (body :jsonrpc "2.0" :method "workspace/symbol" :params #<hash-table equal 1/65 0x1571e3c65ce5> :id 10) 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 company-backends t) nil (mapc #'... hooks) (remhash cancel-token lsp--cancelable-requests)) (buf . #) (hooks) (id . 10) (method . "workspace/symbol") (start-time 24569 27682 119319 598000) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) (cancel-token . :workspace-symbol) (no-merge) (cancel-callback) (error-callback) (mode . detached) (callback closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ... ... ... ...) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) (body :jsonrpc "2.0" :method "workspace/symbol" :params #<hash-table equal 1/65 0x1571e3c65ce5> :id 10) 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 company-backends t) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) [])
(progn (funcall callback (lsp:json-response-result json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))
(if callback (progn (funcall callback (lsp:json-response-result json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time))))
(let* ((--dash-source-601-- (gethash id (progn (or (and (memq ... cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list ... client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- (cdr --dash-source-601--))))) (method (prog1 (car (cdr --dash-source-601--)) (setq --dash-source-601-- (nthcdr 2 --dash-source-601--)))) (start-time (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- (cdr --dash-source-601--))))) (before-send (car --dash-source-601--))) (if lsp-print-io (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 (funcall callback (lsp:json-response-result json-data)) (remhash id (progn (or (and (memq ... cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list ... client))) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))
(cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-601-- (gethash id (progn (or ... ...) (aref client 8)))) (callback (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- ...)))) (method (prog1 (car (cdr --dash-source-601--)) (setq --dash-source-601-- (nthcdr 2 --dash-source-601--)))) (start-time (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- ...)))) (before-send (car --dash-source-601--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data 'incoming-resp (/ ... 1000)) workspace))) (if callback (progn (funcall callback (lsp:json-response-result json-data)) (remhash id (progn (or ... ...) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-603-- (cdr (gethash id (progn ... ...)))) (callback (car-safe (prog1 --dash-source-603-- (setq --dash-source-603-- ...)))) (method (car-safe (prog1 --dash-source-603-- (setq --dash-source-603-- ...)))) (start-time (car-safe (prog1 --dash-source-603-- (setq --dash-source-603-- ...)))) (before-send (car --dash-source-603--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data 'incoming-resp (/ ... 1000)) workspace))) (if callback (progn (funcall callback (lsp:json-response-error-error json-data)) (remhash id (progn (or ... ...) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil))
(let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-601-- (gethash id (progn ... ...))) (callback (car-safe (prog1 --dash-source-601-- ...))) (method (prog1 (car ...) (setq --dash-source-601-- ...))) (start-time (car-safe (prog1 --dash-source-601-- ...))) (before-send (car --dash-source-601--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data ... ...) workspace))) (if callback (progn (funcall callback (lsp:json-response-result json-data)) (remhash id (progn ... ...)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-603-- (cdr (gethash id ...))) (callback (car-safe (prog1 --dash-source-603-- ...))) (method (car-safe (prog1 --dash-source-603-- ...))) (start-time (car-safe (prog1 --dash-source-603-- ...))) (before-send (car --dash-source-603--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data ... ...) workspace))) (if callback (progn (funcall callback (lsp:json-response-error-error json-data)) (remhash id (progn ... ...)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil)))
(let* ((client (progn (or (and (memq (type-of workspace) cl-struct-lsp--workspace-tags) t) (signal 'wrong-type-argument (list 'lsp--workspace workspace))) (aref workspace 5))) (received-time (current-time)) (server-id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 15))) (after-parsed-time (current-time)) (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) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-601-- (gethash id ...)) (callback (car-safe ...)) (method (prog1 ... ...)) (start-time (car-safe ...)) (before-send (car --dash-source-601--))) (if lsp-print-io (progn (lsp--log-entry-new ... workspace))) (if callback (progn (funcall callback ...) (remhash id ...) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time ...))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-603-- (cdr ...)) (callback (car-safe ...)) (method (car-safe ...)) (start-time (car-safe ...)) (before-send (car --dash-source-603--))) (if lsp-print-io (progn (lsp--log-entry-new ... workspace))) (if callback (progn (funcall callback ...) (remhash id ...) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time ...))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil))))
(let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (and (memq ... cl-struct-lsp--workspace-tags) t) (signal 'wrong-type-argument (list ... workspace))) (aref workspace 5))) (received-time (current-time)) (server-id (progn (or (and (memq ... cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list ... client))) (aref client 15))) (after-parsed-time (current-time)) (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) (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-601-- ...) (callback ...) (method ...) (start-time ...) (before-send ...)) (if lsp-print-io (progn ...)) (if callback (progn ... ... ...)))) ((eq val 'response-error) (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-603-- ...) (callback ...) (method ...) (start-time ...) (before-send ...)) (if lsp-print-io (progn ...)) (if callback (progn ... ... ...)))) ((eq val 'notification) (let ((before-notification ...)) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil)))))
(condition-case err (let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (and ... t) (signal ... ...)) (aref workspace 5))) (received-time (current-time)) (server-id (progn (or (and ... t) (signal ... ...)) (aref client 15))) (after-parsed-time (current-time)) (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) (progn (or id ...) nil) (let* (... ... ... ... ...) (if lsp-print-io ...) (if callback ...))) ((eq val 'response-error) (progn (or id ...) nil) (let* (... ... ... ... ...) (if lsp-print-io ...) (if callback ...))) ((eq val 'notification) (let (...) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification ...))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil))))) ((debug error) (message "Error processing message %S." err) nil))
lsp--parser-on-message(#<hash-table equal 3/3 0x1571e3c4d405> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command . lsp-clients--clangd-command) company-mode 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 company-backends 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) company-mode 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 company-backends t) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>))
(let ((lsp-parsed-message (decode-coding-string (apply #'concat (nreverse (prog1 body (progn ... ... ... ...)))) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists 'plist 'hash-table) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." (concat leftovers input) err))) workspace))
(progn (let ((lsp-parsed-message (decode-coding-string (apply #'concat (nreverse (prog1 body ...))) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists 'plist 'hash-table) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." (concat leftovers input) err))) workspace)))
(if (>= chunk-length left-to-receive) (progn (let ((lsp-parsed-message (decode-coding-string (apply #'concat (nreverse ...)) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists 'plist 'hash-table) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." (concat leftovers input) err))) workspace))))
(let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 (substring chunk 0 left-to-receive) (setq chunk (substring chunk left-to-receive))) (prog1 chunk (setq 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 (let ((lsp-parsed-message (decode-coding-string (apply ... ...) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists ... ...) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." ... err))) workspace)))))
(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 (mapcar #'lsp--parse-header (split-string ... "\15\n")))) (setq body-received 0) (setq leftovers nil) (setq chunk (substring chunk (+ body-sep-pos 4)))) (progn (setq leftovers chunk) (setq chunk "")))) (let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 (substring chunk 0 left-to-receive) (setq chunk (substring chunk left-to-receive))) (prog1 chunk (setq 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 (let ((lsp-parsed-message (decode-coding-string ... ...))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type ... :null-object nil :false-object nil) (error ...)) workspace))))))
(while (not (equal 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 (mapcar ... ...))) (setq body-received 0) (setq leftovers nil) (setq chunk (substring chunk (+ body-sep-pos 4)))) (progn (setq leftovers chunk) (setq chunk "")))) (let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 (substring chunk 0 left-to-receive) (setq chunk ...)) (prog1 chunk (setq 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 (let ((lsp-parsed-message ...)) (lsp--parser-on-message (condition-case err ... ...) workspace)))))))
(closure ((chunk . "") (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) company-mode 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 company-backends t) (_proc input) (setq chunk (concat leftovers (encode-coding-string input 'utf-8 'nocopy))) (while (not (equal chunk "")) (if (not body-length) (let* ((body-sep-pos ...)) (if body-sep-pos (progn ... ... ... ...) (progn ... ...))) (let* ((chunk-length ...) (left-to-receive ...) (this-body ...) (body-bytes ...)) (setq body (cons this-body body)) (setq body-received (+ body-received body-bytes)) (if (>= chunk-length left-to-receive) (progn ...))))))(# "Content-Length: 37\15\n\15\n{"id":10,"jsonrpc":"2.0","re...")
read-from-minibuffer("Workspace symbol: " nil (keymap keymap (36 . ivy-magic-read-file-env) (3 keymap (19 . ivy-rotate-sort) (1 . ivy-toggle-ignore) (15 . ivy-occur)) (33554464 . ivy-restrict-to-matches) (15 . hydra-ivy/body) (22 . ivy-scroll-up-command) (prior . ivy-scroll-down-command) (next . ivy-scroll-up-command) (7 . minibuffer-keyboard-quit) (right . ivy-forward-char) (32 . self-insert-command) (18 . ivy-reverse-i-search) (remap keymap (describe-mode . ivy-help) (kill-ring-save . ivy-kill-ring-save) (kill-whole-line . ivy-kill-whole-line) (kill-line . ivy-kill-line) (scroll-down-command . ivy-scroll-down-command) (scroll-up-command . ivy-scroll-up-command) (end-of-buffer . ivy-end-of-buffer) (beginning-of-buffer . ivy-beginning-of-buffer) (kill-word . ivy-kill-word) (forward-char . ivy-forward-char) (delete-char . ivy-delete-char) (backward-kill-word . ivy-backward-kill-word) (backward-delete-char-untabify . ivy-backward-delete-char) (delete-backward-char . ivy-backward-delete-char) (previous-line . ivy-previous-line) (next-line . ivy-next-line)) (9 . ivy-partial-or-done) (10 . ivy-alt-done) (27 keymap (1 . ivy-read-action) (15 . ivy-dispatching-call) (111 . ivy-dispatching-done) (25 . ivy-insert-current-full) (105 . ivy-insert-current) (106 . ivy-yank-word) (114 . ivy-toggle-regexp-quote) (97 . ivy-toggle-marks) (16 . ivy-previous-line-and-call) (14 . ivy-next-line-and-call) (118 . ivy-scroll-down-command) (112 . ivy-previous-history-element) (110 . ivy-next-history-element) (10 . ivy-immediate-done) (13 . ivy-call)) (mouse-3 . ivy-mouse-dispatching-done) (mouse-1 . ivy-mouse-done) (down-mouse-1 . ignore) (13 . ivy-done)) nil ivy-history)
(condition-case err (read-from-minibuffer prompt (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '(error "Selecting deleted buffer")) nil (signal (car err) (cdr err)))))
(if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (let* ((v ivy-last)) (aset v 23 (car ivy--all-candidates)))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '(error "Selecting deleted buffer")) nil (signal (car err) (cdr err))))))
(let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (let* ((v ivy-last)) (aset v 23 (car ivy--all-candidates)))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '(error "Selecting deleted buffer")) nil (signal (car err) (cdr err)))))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))
(progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (let* ((v ivy-last)) (aset v 23 (car ivy--all-candidates)))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or (and ... t) (signal ... ...)) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '...) nil (signal (car err) (cdr err)))))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist)))))
(unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and ... t) (signal ... ...)) (let* (...) (aset v 23 ...))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or ... ...) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err ...) nil (signal ... ...))))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))) (remove-hook 'minibuffer-setup-hook setup-hook))
(let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or ... ...) (let* ... ...)) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn ... ...) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if ... nil ...)))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))) (remove-hook 'minibuffer-setup-hook setup-hook)))
(unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history ...)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if ... nil ...))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null ...)) (progn (progn ... ...) (setq ivy-exit ...)) (condition-case err (read-from-minibuffer prompt ... ... nil hist) (error ...))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or (plist-get extra-props :session) (if (or (minibufferp) (null ...) (eq ... ...)) nil caller)))) (if session (progn (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (let* ((v ivy-last)) (aset v 27 (plist-put extra-props :ivy-data ...)))) (ivy--alist-set 'ivy--sessions session ivy-last)))) (ivy--cleanup))
(let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last (not (window-minibuffer-p))) (progn (ivy-alist-setting ivy-display-functions-alist caller))))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn 'auto) #'(lambda nil (let (...) (save-current-buffer ...))) update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist ...) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height ...) (resize-mini-windows ...)) (if (and ivy-auto-select-single-candidate ivy--all-candidates ...) (progn ... ...) (condition-case err ... ...)) (if (eq ivy-exit ...) (progn ...)))) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or (plist-get extra-props :session) (if (or ... ... ...) nil caller)))) (if session (progn (progn (or (and ... t) (signal ... ...)) (let* (...) (aset v 27 ...))) (ivy--alist-set 'ivy--sessions session ivy-last)))) (ivy--cleanup)) (ivy-call))
(progn (let ((init-fn (ivy-alist-setting ivy-init-fns-alist caller))) (if init-fn (progn (funcall init-fn)))) (if (equal overriding-local-map '(keymap)) (progn (keyboard-quit))) (setq caller (or caller this-command)) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last (not (window-minibuffer-p))) (progn (ivy-alist-setting ivy-display-functions-alist caller))))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn 'auto) #'(lambda nil (let ... ...)) update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook ... setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* (... ... ... ... ...) (if ... ... ...) (if ... ...))) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or (plist-get extra-props :session) (if ... nil caller)))) (if session (progn (progn (or ... ...) (let* ... ...)) (ivy--alist-set 'ivy--sessions session ivy-last)))) (ivy--cleanup)) (ivy-call)))
(progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:predicate :require-match :initial-input :history :preselect :def :keymap :update-fn :sort :action :multi-action :unwind :re-builder :matcher :dynamic-collection :extra-props :caller :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:predicate :requir..." (car --cl-keys--)))))) (progn (let ((init-fn (ivy-alist-setting ivy-init-fns-alist caller))) (if init-fn (progn (funcall init-fn)))) (if (equal overriding-local-map '(keymap)) (progn (keyboard-quit))) (setq caller (or caller this-command)) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last (not ...)) (progn (ivy-alist-setting ivy-display-functions-alist caller))))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn 'auto) #'(lambda nil ...) update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil ... ...)) (unwind-protect (progn (add-hook ... setup-hook) (let* ... ... ...)) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or ... ...))) (if session (progn (progn ... ...) (ivy--alist-set ... session ivy-last)))) (ivy--cleanup)) (ivy-call))))
(let* ((predicate (car (cdr (plist-member --cl-rest-- ':predicate)))) (require-match (car (cdr (plist-member --cl-rest-- ':require-match)))) (initial-input (car (cdr (plist-member --cl-rest-- ':initial-input)))) (history (car (cdr (plist-member --cl-rest-- ':history)))) (preselect (car (cdr (plist-member --cl-rest-- ':preselect)))) (def (car (cdr (plist-member --cl-rest-- ':def)))) (keymap (car (cdr (plist-member --cl-rest-- ':keymap)))) (update-fn (car (cdr (plist-member --cl-rest-- ':update-fn)))) (sort (car (cdr (plist-member --cl-rest-- ':sort)))) (action (car (cdr (plist-member --cl-rest-- ':action)))) (multi-action (car (cdr (plist-member --cl-rest-- ':multi-action)))) (unwind (car (cdr (plist-member --cl-rest-- ':unwind)))) (re-builder (car (cdr (plist-member --cl-rest-- ':re-builder)))) (matcher (car (cdr (plist-member --cl-rest-- ':matcher)))) (dynamic-collection (car (cdr (plist-member --cl-rest-- ':dynamic-collection)))) (extra-props (car (cdr (plist-member --cl-rest-- ':extra-props)))) (caller (car (cdr (plist-member --cl-rest-- ':caller))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:predicate :requir..." (car --cl-keys--)))))) (progn (let ((init-fn (ivy-alist-setting ivy-init-fns-alist caller))) (if init-fn (progn (funcall init-fn)))) (if (equal overriding-local-map '(keymap)) (progn (keyboard-quit))) (setq caller (or caller this-command)) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last ...) (progn ...)))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn ...) #'... update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun ...) setup-hook) (setq setup-hook #'...) (unwind-protect (progn ... ...) (remove-hook ... setup-hook))) (let ((session ...)) (if session (progn ... ...))) (ivy--cleanup)) (ivy-call)))))
ivy-read("Workspace symbol: " (closure ((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :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 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or (car parts) "")) (filter-regexps? (mapcar #'regexp-quote (cdr parts)))) (if query (progn (if (string-equal prev-query query) (funcall update-candidates unfiltered-candidates filter-regexps?) (let (...) (lsp-request-async "workspace/symbol" ... ... :mode ... :cancel-token :workspace-symbol))))) (setq prev-query query)) (or filtered-candidates 0)) :dynamic-collection t :require-match t :initial-input nil :action lsp-ivy--workspace-symbol-action :caller lsp-ivy-workspace-symbol)
(let* ((prev-query nil) (unfiltered-candidates 'nil) (filtered-candidates nil) (workspace-root (lsp-workspace-root)) (update-candidates #'(lambda (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let ... ... ...) (nreverse result))) (ivy-update-candidates filtered-candidates)))) (ivy-read prompt #'(lambda (user-input) (let* ((parts (split-string user-input)) (query (or ... "")) (filter-regexps? (mapcar ... ...))) (if query (progn (if ... ... ...))) (setq prev-query query)) (or filtered-candidates 0)) :dynamic-collection t :require-match t :initial-input initial-input :action #'lsp-ivy--workspace-symbol-action :caller 'lsp-ivy-workspace-symbol))
lsp-ivy--workspace-symbol((#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command . lsp-clients--clangd-command) company-mode 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 company-backends t) (filter sentinel name environment-fn) (let (... ... ...) (let* ... ... ... ... ...))) :test? (closure ((test-command) (command . lsp-clients--clangd-command) company-mode 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 company-backends t) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :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 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) "Workspace symbol: " nil)
lsp-ivy-workspace-symbol(nil)
funcall-interactively(lsp-ivy-workspace-symbol nil)
call-interactively(lsp-ivy-workspace-symbol record nil)
command-execute(lsp-ivy-workspace-symbol record)
execute-extended-command(nil "lsp-ivy-workspace-symbol" "lsp-ivy-wo")
funcall-interactively(execute-extended-command nil "lsp-ivy-workspace-symbol" "lsp-ivy-wo")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)

lsp-log:

Command "clangd" is present on the path.
Command "clangd" is present on the path.
Found the following clients for /home/ville/.local/tmp/emacs_bug_test/main.c: (server-id clangd, priority -1)
The following clients were selected based on priority: (server-id clangd, priority -1)

Custom faces instead of hard-coded values

It would be just awesome to be able to customize the faces of symbol-kinds (separate face per group or per kind?).
Inheriting font-lock-* faces as default will make it compatible with the most themes out there at least.

Implement C-SPC preview in lsp-rust-analyzer--select-related-test

Use the power of ivy preview (as i got used to it in doom emacs) to overload an interactive runner function with preview functionality.

This PR adds an lsp-rust-analyzer extension to find related tests, which offloads the heavy lifting and user interaction to the helper method mentioned in the issue heaing.

https://github.com/emacs-lsp/lsp-mode/pull/2776/files#diff-c8c9a652e719bd23b565da5b6f417aa8c0d55a256e176e0772bfe850a680c37eR975-R982

This is the lambda that extracts the label from each runnable and discards everything else, including file and location
https://github.com/emacs-lsp/lsp-mode/pull/2776/files#diff-c8c9a652e719bd23b565da5b6f417aa8c0d55a256e176e0772bfe850a680c37eR982

Instead of discarding it, we could use the location to jump to the start of the related test function definition before running it as a preview. I believe the C-SPC is bound to ivy-call-and-recenter in doom-emacs.

Implementation

I am hand wavy about the implementation, but I imagine one could implement some sort of advice to override lsp-rust-analyzer--select-related-test with an ivy-specific extension that binds C-SPC (or a non-doom binding) to a preview function.

Migrate to new ivy API for asynchronous completion

This is in response to emacs-lsp/lsp-mode#1010.

After telling lsp-mode to use sample-project as the project root, workspace symbol search should immediately be available within both source files (try searching for some_, for example). Tested with clangd 10 (built from trunk, ~Oct 2019), latest lsp-mode and Emacs (both also built from their respective repositories)

Ability to navigate to a symbol by typing the symbol name.

I've been using lsp-treemacs-symbols to navigate to symbols in the current namespace. It works pretty well for visualizing symbols defined in the namespace, but it is not as convenient to navigate to a particular symbol because it requires clicking on the symbol with the mouse. It would be great if there was a way to navigate/jump to a symbol in the current namespace by typing its name in the minibuffer, very similar to how consult-lsp-symbols works except that consult-lsp-symbols searches for symbols globally.

args-out-of-range in function lsp-ivy--format-symbol-match

because the args kind may be 255, and it is args-out-of-range of lsp-ivy-symbol-kind-to-face.
Mybe it should check the args kind like this:

(lsp-defun lsp-ivy--format-symbol-match
((&SymbolInformation :name :kind :container-name? :location (&Location :uri))
project-root)
"Convert the match returned by lsp-mode into a candidate string."
(let* ((type (if (>= kind (length lsp-ivy-symbol-kind-to-face))
nil
(elt lsp-ivy-symbol-kind-to-face kind)))
(typestr (if lsp-ivy-show-symbol-kind
(propertize (format "[%s] " (car type)) 'face (cdr type))
""))

     (pathstr (if lsp-ivy-show-symbol-filename
                  (propertize (format " ยท %s" (file-relative-name (lsp--uri-to-path uri) project-root))
                              'face font-lock-comment-face) "")))
(concat typestr (if (or (null container-name?) (string-empty-p container-name?))
                    (format "%s" name)
                  (format "%s.%s" container-name? name)) pathstr)))

Invalid face reference error when calling `lsp-ivy-workspace-symbol`

Whenever I try to call lsp-ivy-workspace-symbol, I do get ivy window with results showing up, but will also randomly spit out this message in minibuffer.

Invalid face reference: font-lock-reference-face [6 times]
Error processing message (args-out-of-range [("    ") ("File" . font-lock-builtin-face) ("Modu" . font-lock-keyword-face) ("Nmsp" . font-lock-keyword-face) ("Pack" . font-lock-keyword-face) ("Clss" . font-lock-type-face) ("Meth" . font-lock-function-name-face) ("Prop" . font-lock-reference-face) ("Fld " . font-lock-reference-face) ("Cons" . font-lock-function-name-face) ("Enum" . font-lock-type-face) ("Intf" . font-lock-type-face) ("Func" . font-lock-function-name-face) ("Var " . font-lock-variable-name-face) ("Cnst" . font-lock-constant-face) ("Str " . font-lock-string-face) ("Num " . font-lock-builtin-face) ("Bool " . font-lock-builtin-face) ("Arr " . font-lock-builtin-face) ("Obj " . font-lock-builtin-face) ("Key " . font-lock-reference-face) ("Null" . font-lock-builtin-face) ("EmMm" . font-lock-constant-face) ("Srct" . font-lock-type-face) ("Evnt" . font-lock-builtin-face) ("Op  " . font-lock-function-name-face) ("TPar" . font-lock-type-face)] 254).

System Info:

(pkg-info-version-info "lsp-ivy")
"20200418.1500"

emacs-version
"26.3"

system-configuration-options
"--with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules"

system-configuration
"x86_64-apple-darwin18.2.0"

system-configuration-options
"NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS"

`(wrong-type-argument sequencep 0)` in a C++ project

Steps to reproduce the problem:

  • lsp-mode from MELPA.
  • ivy from MELPA.
  • lsp-ivy from master.

Server: ccls

When I invoke lsp-ivy-global-workspace-symbol, the following error appears:

Debugger entered--Lisp error: (wrong-type-argument sequencep 0)
  length(0)
  (max 1 (length ivy--all-candidates))
  (log (max 1 (length ivy--all-candidates)) 10)
  (floor (log (max 1 (length ivy--all-candidates)) 10))
  (1+ (floor (log (max 1 (length ivy--all-candidates)) 10)))
  (let* ((w (1+ (floor (log (max 1 (length ivy--all-candidates)) 10)))) (s (replace-match (format "%%-%dd" w) t t ivy-count-format 1))) (string-match "%d" s) (concat (replace-match (format "%%%dd" w) t t s) prompt))
  (cond ((null ivy-count-format) (error "`ivy-count-format' can't be nil.  Set it to \"\" instead")) ((string-match "%d.*\\(%d\\)" ivy-count-format) (let* ((w (1+ (floor (log ... 10)))) (s (replace-match (format "%%-%dd" w) t t ivy-count-format 1))) (string-match "%d" s) (concat (replace-match (format "%%%dd" w) t t s) prompt))) ((string-match-p "%.*d" ivy-count-format) (concat ivy-count-format prompt)) (ivy--directory prompt) (t prompt))
  ivy-add-prompt-count("Global workspace symbols: ")

lsp-ui-workspace-symbol works correctly in that repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.