Add setting to disable inline completions in language scopes (#20508)
This adds a setting to disable inline completions in language scopes to,
for example, disable them in comments or strings.
This setting can be made per language.
Examples:
```json
{
"languages": {
"Go": {
"inline_completions_disabled_in": ["comment", "string"]
}
}
}
```
```json
{
"inline_completions_disabled_in": ["comment"]
}
```
Closes #9133
Release Notes:
- Added language setting to disable inline comments in certain scopes.
Example: `{"languages": {"Go": {"inline_completions_disabled_in":
["comment", "string"]}}}`
Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
@@ -359,6 +359,40 @@ There are two options to choose from:
|
||||
|
||||
List of `string` values
|
||||
|
||||
## Inline Completions Disabled in
|
||||
|
||||
- Description: A list of language scopes in which inline completions should be disabled.
|
||||
- Setting: `inline_completions_disabled_in`
|
||||
- Default: `[]`
|
||||
|
||||
**Options**
|
||||
|
||||
List of `string` values
|
||||
|
||||
1. Don't show inline completions in comments:
|
||||
|
||||
```json
|
||||
"disabled_in": ["comment"]
|
||||
```
|
||||
|
||||
2. Don't show inline completions in strings and comments:
|
||||
|
||||
```json
|
||||
"disabled_in": ["comment", "string"]
|
||||
```
|
||||
|
||||
3. Only in Go, don't show inline completions in strings and comments:
|
||||
|
||||
```json
|
||||
{
|
||||
"languages": {
|
||||
"Go": {
|
||||
"inline_completions_disabled_in": ["comment", "string"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Current Line Highlight
|
||||
|
||||
- Description: How to highlight the current line in the editor.
|
||||
|
||||
Reference in New Issue
Block a user