rust/editors/code/src
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
..
ast_inspector.ts Flatten commands.ts 2020-05-25 12:14:44 +02:00
client.ts Remove hover contents marking as trusted. 2020-06-05 15:25:01 +03:00
commands.ts Add reload workspace command 2020-07-01 14:57:59 +02:00
config.ts Add custom cargo runners 2020-06-24 10:53:49 +03:00
ctx.ts Remove unnecessary async from vscode language client creation 2020-04-25 20:52:50 +03:00
debug.ts Fix rust-analyzer.debug.openDebugPane option 2020-06-18 10:15:42 +03:00
inlay_hints.ts Cleanup lsp extensions on the client side 2020-05-25 14:56:26 +02:00
lsp_ext.ts Add reload workspace command 2020-07-01 14:57:59 +02:00
main.ts Merge #5089 #5161 #5184 #5185 #5186 2020-07-02 09:12:46 +00:00
net.ts Append 10 random hex chars to temp artifact files 2020-06-25 01:00:30 +03:00
persistent_state.ts Rewrite auto-update 2020-03-19 09:04:59 +01:00
run.ts Add light-weight snapshot testing library with editor integration 2020-06-27 19:22:31 +02:00
snippets.ts Less rust-analyzer specific onEnter 2020-05-25 14:28:47 +02:00
tasks.ts Fix ts lints 2020-06-24 12:30:41 +03:00
toolchain.ts Change Runnable.bin -> Runnable.kind 2020-05-31 05:21:45 +03:00
util.ts Never disable error logging on the frontend 2020-06-22 21:30:32 +03:00