rust/editors/code
bors[bot] 57ed622ec4
Merge #5089 #5161 #5184 #5185 #5186
5089: Disable auto-complete on comments r=matklad a=BGluth

Resolves #4907 by disabling any auto-completion on comments.

As flodiebold [pointed out](https://github.com/rust-analyzer/rust-analyzer/issues/4907#issuecomment-648439979), in the future we may want to support some form of auto-completion within doc comments, but for now it was suggested to just disable auto-completion on them entirely.

The implementation involves adding a new field `is_comment` to `CompletionContext` and checking if the immediate token we auto-completed on is a comment. I couldn't see a case where we need to check any of the ancestors, but let me know if this is not sufficient. I also wasn't sure if it was necessary to add a new field to this struct, but I decided it's probably the best option if we want to potentially do auto-completion on doc comments in the future.

Finally, the three tests I added should I think ideally not filter results by `CompletionKind::Keyword`, but if I want to get unfiltered results, I need access to a non-public function [get_all_completion_items](9a4d02faf9/crates/ra_ide/src/completion/test_utils.rs (L32-L39)) which I don't know if I should make public just for this.



5161: SSR: Add initial support for placeholder constraints r=matklad a=davidlattimore



5184: Always install required nightly extension if current one is not nightly r=matklad a=Veetaha

This is weird, but having switched back to stable by uninstalling the extension appears that vscode doesn't destroy the `PersistentState` and thus changing to `nightly` channel doesn't work because the last check for nightly extension was less than 1 hour ago. The simple solution is to skip this check if we know that the current extension version is not nightly.

5185: Force showing extension activation error pop-up notification r=matklad a=Veetaha

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5091

5186: fix: correct pd/ppd/tfn/tmod completion doc r=matklad a=fannheyward

a33eefa3b2/crates/ra_ide/src/completion/complete_snippet.rs (L23-L24)

Co-authored-by: BGluth <gluthb@gmail.com>
Co-authored-by: David Lattimore <dml@google.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
Co-authored-by: Heyward Fann <fannheyward@gmail.com>
2020-07-02 09:12:46 +00:00
..
src Merge #5089 #5161 #5184 #5185 #5186 2020-07-02 09:12:46 +00:00
tests Change Runnable.bin -> Runnable.kind 2020-05-31 05:21:45 +03:00
.eslintrc.js vscode: remove type assertion 2020-02-24 21:23:56 +02:00
.gitignore add rollup bundler for vscode extension 2019-09-23 23:25:16 +02:00
.vscodeignore vscode client side tests 2020-05-20 22:31:39 +03:00
icon.png Extension icon 2020-01-15 16:07:39 +01:00
package-lock.json Be more strict with @types/node 2020-07-01 08:01:17 +03:00
package.json Add reload workspace command 2020-07-01 14:57:59 +02:00
ra_syntax_tree.tmGrammar.json Fix .rast tmGrammar to account for numbers in identifiers 2020-04-22 02:00:58 +03:00
README.md Minimal viable meta 2020-03-02 14:27:26 +01:00
rollup.config.js Bump @rollup/plugin-commonjs 2020-06-27 22:37:03 +03:00
rust.tmGrammar.json Fix a typo 2020-06-30 17:42:54 +02:00
tsconfig.json vscode client side tests 2020-05-20 22:31:39 +03:00

rust-analyzer

Provides support for rust-analyzer: novel LSP server for the Rust programming language.

See https://rust-analyzer.github.io/ for more information.