Skip to content

Commit 2f276ab

Browse files
committed
Revert "Fix highlight for atoms containing @ character"
This reverts commit eb06df6.
1 parent eb06df6 commit 2f276ab

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

spec/syntax/atom_spec.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,4 @@ def project do
8888
end
8989
EOF
9090
end
91-
92-
it 'detects atoms containing @ in it' do
93-
expect(<<~EOF).to include_elixir_syntax('elixirAtom', '@somewhere')
94-
:atom@somewhere
95-
EOF
96-
expect(<<~EOF).to include_elixir_syntax('elixirAtom', '@somewhere')
97-
[atom@somewhere: nil]
98-
EOF
99-
end
100-
101-
it 'detects atoms containing Unicode letters in it' do
102-
expect(<<~EOF).to include_elixir_syntax('elixirAtom', 'ó')
103-
:atóm
104-
EOF
105-
end
10691
end

syntax/elixir.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ syn match elixirOperator '\\\\\|::\|\*\|/\|\~\~\~\|@'
4141

4242
syn match elixirAlias '\([a-z]\)\@<![A-Z]\w*\%(\.[A-Z]\w*\)*'
4343

44-
syn match elixirAtom '\(:\)\@<!:\%([a-zA-Z_]\%(\w\|@\|\P\)*\%([?!]\|=[>=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)'
44+
syn match elixirAtom '\(:\)\@<!:\%([a-zA-Z_]\w*\%([?!]\|=[>=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)'
4545
syn match elixirAtom '\(:\)\@<!:\%(<=>\|&&\?\|%\(()\|\[\]\|{}\)\|++\?\|--\?\|||\?\|!\|//\|[%&`/|]\)'
46-
syn match elixirAtom "\%([a-zA-Z_]\%(\w\|@\|\P\)*[?!]\?\):\(:\)\@!"
46+
syn match elixirAtom "\%([a-zA-Z_]\w*[?!]\?\):\(:\)\@!"
4747

4848
syn keyword elixirBoolean true false nil
4949

0 commit comments

Comments
 (0)