-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add config completion.addSemicolonToJumps #21296
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
base: master
Are you sure you want to change the base?
Conversation
|
I don't think we should have so specific config, rather I'd prefer a config like |
|
This is not disabling keyword completion, but removing semicolons from the results
For tedious configurations, improve them in #21101 :
|
Example
---
```rust
fn f() -> i32 {
if true {
$0
}
}
```
**addSemicolonToJumps: true (default)**
```rust
fn f() -> i32 {
if true {
return $0;
}
}
```
**addSemicolonToJumps: false**
```rust
fn f() -> i32 {
if true {
return $0
}
}
```
I understand, but this only applies it to some specific keyword. I'm saying that if we should do it, it needs to be no more granular than a decision about all keywords at once. |
Other keywords are not very sensitive to semicolons |
|
But they do have "smart" completions, e.g. |
|
But this PR does not conflict with the future |
1f18e8d to
e6cff7a
Compare
|
Sure it does not conflict, but I think we don't want so specific config. I suggested that config as an alternative. |
What is alternative? |
|
To provide a |
|
Merge both configurations? Or merge one of them? |
|
No, just not have |
|
Should I rename But how to express the remove semicolon? This is not equivalent to turning it into a non code snippet keyword |
|
What I'm saying is, that I don't want a configuration for not adding semicolon to some keywords. I can, on the other hand, accept a config that will make keyword completion "dumb", not inserting anything beyond the keyword text. |
|
Is it possible to implement a config: sets any expression keyword snippet as dumb or disabled? Example{
"rust-analyzer.completion.expressionKeywords": {
"break": "dumb",
"continue": "disable"
}
} |
|
I feel that that is too too much granularity. |
|
I agree with Chayim, the |
Close #21292
Example
addSemicolonToJumps: true (default)
addSemicolonToJumps: false