-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Implement LSP window/showDocument request #6079
Conversation
c944245
to
bb05b70
Compare
Thanks for the quick feedback :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can avoid adding a new method by simply storing the offset_encoding
earlier and keeping it for the duration of the method, since that type is Copy
it won't carry the borrow of self.editor
Hm, that would work, but I would need to call |
Ah I didn't check if the language server itself was used later |
8a5aa67
to
ed98b14
Compare
aa56442
to
8f45f15
Compare
6148f41
to
478a5b3
Compare
Should be ready to merge now. It would also make sense to wait on Byron/open-rs#64. |
There’s open PR for opening files externally: #5820 |
Oh, the |
478a5b3
to
df11bdb
Compare
@matoous haha I already saw it, no worries. Let's just use yours then. |
Implements the LSP request for
window/showDocument
.This does not yet implement requests with the
external
parameter set totrue
, but it would probably best to do this in the same PR (as LSP servers would probably assume that to work). I believe there is no similar functionality in helix yet, and I wanted to check if my suggested approach would be welcome.I suggest adding a
External
variant to theAction
enum which is passed toEditor::open
. The actual implementation could either be done using theopen
crate or by reimplementing the functionality of this crate.