Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

lsp--cur-workspace not propegated when using lsp-find-definition-mouse #4532

Open
3 tasks done
ScatteredRay opened this issue Aug 27, 2024 · 0 comments
Open
3 tasks done
Labels

Comments

@ScatteredRay
Copy link

Thank you for the bug report

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

Bug description

I'm unable to continue to to follow references in a file with lsp-find-definition-mouse, which otherwise works with lsp-ui-peek when using lsp-ui-peek-find-references.

It appears that in this pr this snippet was added:

          (unless lsp--cur-workspace
            (setq lsp--cur-workspace current-workspace))
          (unless lsp-mode
            (lsp-mode t))

Would there be any large issues with doing something similar in lsp-find-definition

This seems to also be referenced here but the behavior does not appear to be the default with clangd.

Steps to reproduce

  • Open a C++ file with lsp enabled.
  • C-click a symbol in a shared header
  • Notice that further C-click is unable to find symbols.

Expected behavior

C-click in nested headers should continue to be able to find headers.

Which Language Server did you use?

lsp-clangd

OS

Linux

Error callstack

No response

Anything else?

No response

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

No branches or pull requests

1 participant