Skip to content

Commit

Permalink
treat ~>> <<~ operators as unbalanced scopes
Browse files Browse the repository at this point in the history
resolve conflict with `<<>>` bracket
  • Loading branch information
lukaszsamson committed Jan 19, 2024
1 parent 7f476a2 commit 053caf4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,18 @@
"language": "elixir",
"scopeName": "source.elixir",
"path": "./syntaxes/elixir.json",
"unbalancedBracketScopes": ["keyword.operator.bitwise.elixir", "constant.language.symbol.elixir"],
"unbalancedBracketScopes": [
"keyword.operator.bitwise.elixir",
"keyword.operator.other.unbalanced.elixir",
"constant.language.symbol.elixir"
],
"embeddedLanguages": {
"comment.documentation.heredoc.elixir": "markdown"
}
},
{
"language": "eex",
"unbalancedBracketScopes": ["meta.embedded.line.elixir"],
"scopeName": "text.elixir",
"path": "./syntaxes/eex.json"
},
Expand Down Expand Up @@ -576,6 +581,8 @@
"scripts": {
"release-elixir-ls": "cd elixir-ls && mix elixir_ls.release2 -o ../elixir-ls-release",
"vscode:prepublish": "npm-run-all release-elixir-ls esbuild-release",
"mixcompile": "mix compile",
"mixcompile-esbuild": "npm-run-all mixcompile esbuild",
"clean": "rimraf ./out",
"compile": "tsc -b",
"watch": "tsc -b -w",
Expand Down
9 changes: 7 additions & 2 deletions syntaxes/elixir.json
Original file line number Diff line number Diff line change
Expand Up @@ -2415,8 +2415,13 @@
"name": "keyword.operator.bitwise.elixir"
},
{
"comment": "matches: | ++ -- ** \\ <- <> << >> :: .. ... |> => -> <|> <~> <~ <<~ ~> ~>>",
"match": "\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|<\\<\\~|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.\\.?|\\|>|=>|<\\|\\>|<~>|->|~>>|~>|<~|(?<!\\|)\\|(?!\\|)",
"comment": "matches: <<~ ~>>",
"match": "~>>|<\\<\\~",
"name": "keyword.operator.other.unbalanced.elixir"
},
{
"comment": "matches: | ++ -- ** \\ <- <> << >> :: .. ... |> => -> <|> <~> <~ ~>",
"match": "\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.\\.?|\\|>|=>|<\\|\\>|<~>|->|~>|<~|(?<!\\|)\\|(?!\\|)",
"name": "keyword.operator.other.elixir"
},
{
Expand Down

0 comments on commit 053caf4

Please sign in to comment.