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

Applying completion with placeholders causes cursor to jump to end of file #292

Open
Boereck opened this issue Jan 7, 2020 · 5 comments

Comments

@Boereck
Copy link
Contributor

Boereck commented Jan 7, 2020

When testing the Corrosion master with the LSP4E master, after applying a completion with placeholders (with or without variables like $TM_SELECTED_TEXT) and filling in all placeholders, the cursor position jumps to the end of the file. It does not matter if the completion comes from the RLS or the snippets defined by Corrosion. This may be an issue of LSP4E or an issue how Corrosion uses LSP4E (maybe the completions provide incomplete, or conflicting information).

@Boereck
Copy link
Contributor Author

Boereck commented Jan 14, 2020

I realized that the jump is not always to the end of the file, but rather further down in the text viewer. Apparently the first occurrences were so far down in the source file, the cursor always just jumped to the end of the file.

@mickaelistria
Copy link
Contributor

@Boereck Can you please try latest release of Corrosion and share some minimal steps to reproduce the issue?

@Boereck
Copy link
Contributor Author

Boereck commented Dec 15, 2020

Hey @mickaelistria . I'll try later this evening.

@Boereck
Copy link
Contributor Author

Boereck commented Dec 15, 2020

This is still happening to me, bot latest release and on master. In some cases it will not even accept place holder replacements on finish and remove characters after the placeholder . Super strange.

@mickaelistria
Copy link
Contributor

Can you please provide some samples that allow to reproduce this issue + offsets of completion + expected vs actual result?
Also, did you have the.opportunity to try rust-analyzer in place of RLS in Corrosion (tweaking preferences should be enough)?

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

2 participants