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:
parent
9e7afe870a
commit
ba743a1bd9
4 changed files with 77 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue