Auto merge of #15668 - connorskees:feat/close-backtick, r=Veykril

feat: add backtick to surrounding and auto-closing pairs

Makes backticks always complete as a pair and also surround the current selection, similar to double quotes. This is useful primarily in the context of markdown doc comments, but is applied globally for simplicity.

Closes https://github.com/rust-lang/rust-analyzer/issues/11381
This commit is contained in:
bors 2023-10-05 22:08:15 +00:00
commit 54866a0df7

View File

@ -18,7 +18,8 @@
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/*", "close": " */" }
{ "open": "/*", "close": " */" },
{ "open": "`", "close": "`", "notIn": ["string"] }
],
"autoCloseBefore": ";:.,=}])> \n\t",
"surroundingPairs": [
@ -27,7 +28,8 @@
["(", ")"],
["<", ">"],
["\"", "\""],
["'", "'"]
["'", "'"],
["`", "`"]
],
"indentationRules": {
"increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$",