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

Support textEdits #6

Open
danr opened this issue Feb 19, 2018 · 0 comments
Open

Support textEdits #6

danr opened this issue Feb 19, 2018 · 0 comments

Comments

@danr
Copy link
Owner

danr commented Feb 19, 2018

< mawww> btw, kakoune-languageclient completion should use the position returned by the completion engine, not the one at which kakoune triggered the completion
< mawww> In my tests, if I type 'import java.blah.' I get various completion candidates named 'java.blah....' but if I select one I get 'java.blah.java.blah....'

< danr> mawww: uff. there was a long issue about insertText on the lsp tracker regarding what text to insert and what to do when there are multiple cursors: microsoft/language-server-protocol#264
< danr> what is the name of the language server you're using?

< mawww> eclipse.jdt.ls I think

< danr> but regarding what you propsed isn't a "position returned by the completion engine". If insertText is used, there is no such position at all, and if TextEdits are used then anything could happen :(

< danr> it seems like that server's insertText is 'java.blah.foo' instead of 'foo' in this case, so you get an extra copy of 'java.blah'. I have not seen that in any other server

< danr> I'll jot it down in an issue so I don't forget

< mawww> danr: in insertText you have a range, right
< mawww> this range gives you the position at which the completion should take place

< danr> no, insertText is just a string: https://microsoft.github.io/language-server-protocol/specification#textDocument_completion

< mawww> danr, dont you get the textEdit field ? its the recommended one to use

< danr> mawww: I haven't used the textEdits so far, my worry is that they might not have the same starting coordinate

< mawww> Yeah, that would be pretty hard to handle

< danr> then it would be difficult to make it fit into the kakoune completion mechanism

Related: #2

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

No branches or pull requests

1 participant