-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cannot start new line from the end of a comment #219
Comments
This may be because we don't specify a language configuration json file in the vscode extension's package.json. See https://github.com/rust-lang-nursery/rls-vscode/blob/master/language-configuration.json as an example of what rls uses |
We ignore language configuration stuff and try to do all the things ourselves. This goes against how vscode typically work, but I think ultimately is the better approach: language configuration does not know about syntax, so it can go only so far. Compare, for example, how ra_lsp's extend selection and VS Code's build one works. I believe this particular issue is caused by our on-enter handler here: https://github.com/rust-analyzer/rust-analyzer/blob/0952b928addce602bef9b671d7904033df39f632/crates/ra_analysis/src/lib.rs#L227-L231. In theory, it could be better than the built-in one, but in practice, I expect we have more bugs currently :) |
It looks like this was introduced by f8b36bb#diff-50177e66ffb4f631d05213c0adb0073d The I guess this is a search and replace issue, where @matklad was replacing |
Excellent catch! I wonder if we should have a test for this... Seems tricky to write, because it's the VS Code which should be behind the wheel here (currently, we have zero tests for typescript code...) |
221: Fix on enter r=matklad a=aochagavia Fixes #219 Co-authored-by: Adolfo Ochagavía <[email protected]>
To reproduce, start writing a comment like the one below and press enter.
// <|>
Expected behavior:
Actual behavior (enter is ignored)
// <|>
The text was updated successfully, but these errors were encountered: