diff options
author | Skyler Hawthorne | 2022-02-25 08:36:54 +0000 |
---|---|---|
committer | GitHub | 2022-02-25 08:36:54 +0000 |
commit | a494f47a5df543a3ab8d6530a5acbc2a5bd04d44 (patch) | |
tree | 084ef1b24c593d58d6616b37e073073d93009ff3 /languages.toml | |
parent | b935fac9576cf333e22b82e40da8c4d73c8e547d (diff) |
Configurable auto pairs (#1624)
* impl auto pairs config
Implements configuration for which pairs of tokens get auto completed.
In order to help with this, the logic for when *not* to auto complete
has been generalized from a specific hardcoded list of characters to
simply testing if the next/prev char is alphanumeric.
It is possible to configure a global list of pairs as well as at the
language level. The language config will take precedence over the
global config.
* rename AutoPair -> Pair
* clean up insert_char command
* remove Rc
* remove some explicit cloning with another impl
* fix lint
* review comments
* global auto-pairs = false takes precedence over language settings
* make clippy happy
* print out editor config on startup
* move auto pairs accessor into Document
* rearrange auto pair doc comment
* use pattern in Froms
Diffstat (limited to 'languages.toml')
-rw-r--r-- | languages.toml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/languages.toml b/languages.toml index 9876bcf1..33906e4b 100644 --- a/languages.toml +++ b/languages.toml @@ -9,6 +9,13 @@ comment-token = "//" language-server = { command = "rust-analyzer" } indent = { tab-width = 4, unit = " " } +[language.auto-pairs] +'(' = ')' +'{' = '}' +'[' = ']' +'"' = '"' +'`' = '`' + [language.debugger] name = "lldb-vscode" transport = "stdio" |