Skip to content

Commit

Permalink
Auto merge of #15668 - connorskees:feat/close-backtick, r=Veykril
Browse files Browse the repository at this point in the history
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 rust-lang/rust-analyzer#11381
  • Loading branch information
bors committed Oct 5, 2023
2 parents 695c612 + 6ca48d9 commit 54866a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editors/code/language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/*", "close": " */" }
{ "open": "/*", "close": " */" },
{ "open": "`", "close": "`", "notIn": ["string"] }
],
"autoCloseBefore": ";:.,=}])> \n\t",
"surroundingPairs": [
Expand All @@ -27,7 +28,8 @@
["(", ")"],
["<", ">"],
["\"", "\""],
["'", "'"]
["'", "'"],
["`", "`"]
],
"indentationRules": {
"increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$",
Expand Down

0 comments on commit 54866a0

Please sign in to comment.