Skip to content

Another take on projectionist config #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
b9cfc31
Folding tests (#453)
schnittchen Dec 6, 2018
34873ee
replace all indent tests with i helper (#455)
jbodah Dec 6, 2018
7e65a35
Fix syntax highlighting with "~S" sigil (#457)
feliperenan Dec 12, 2018
49ca9b9
Add .xrl to the suffixes list (#461)
jparise Dec 28, 2018
c259418
Fix issue-459 (#460)
veita Dec 28, 2018
da5bc2c
add failing spec for implicit rescues
Dec 28, 2018
3c5060d
Revert "add failing spec for implicit rescues"
Dec 28, 2018
ca6759f
try else indent (#462)
jbodah Dec 28, 2018
cf5cf15
remove pending flag from test
Dec 28, 2018
c1c3dca
remove pending guard syntax tests
Dec 28, 2018
168815d
fix if/else folding bug (#468)
jbodah Dec 31, 2018
0f4e2da
speed up fold tests
Dec 31, 2018
03d1486
speed up vim start
Dec 31, 2018
e2be90d
micro optimizations for tests
Dec 31, 2018
3abb0f4
Use 'set filetype' to set filetype once again (#467)
jparise Feb 12, 2019
b92fc03
Add vim 8 package manager instructions (#449)
lukebakken Feb 12, 2019
a4991c9
Syntax: Add doc delimiters (#470)
endersstocker Feb 12, 2019
9b466fd
Remove redundant 'formatoptions' setting (#472)
jparise Feb 13, 2019
653cc4d
Use 'setfiletype' to set local &filetype (#473)
jparise Feb 13, 2019
af0b49a
Revert "Use 'setfiletype' to set local &filetype (#473)" (#476)
jbodah Feb 14, 2019
f17537d
split up write/redraw in test suite to improve reliability
jbodah Feb 14, 2019
b6990d9
Syntax: Add private declarations (#471)
endersstocker Feb 14, 2019
d5d4400
Fix wrong highlight of paren after `defmodule` (#478)
dreamtigers Feb 27, 2019
9724749
Update README.md vim 8 install instructions (#480)
navargas Mar 4, 2019
d58efec
vim-dadbod integration for applications using Ecto (#481)
hauleth Mar 13, 2019
d51d5f7
add support for live view templates (#483)
cadebward Mar 18, 2019
fbab531
syntax: Allow escaping of doc heredocs (#489)
liskin Apr 17, 2019
7e00da6
Add Phoenix LiveEEx Template (.leex) file type support (2) (#490)
jbodah Apr 17, 2019
24a0072
add docker container file with isolated vim instance
Apr 25, 2019
8e4782f
Update README.md
jbodah Apr 25, 2019
9f9deef
ftdetect: Fix detection when reopening
liskin Apr 25, 2019
c5d6345
syntax: Fix uppercase Atom: in keyword lists
liskin Apr 30, 2019
98c0304
syntax: Highlight dots in aliases as aliases
liskin Apr 30, 2019
38e8bbf
add nvim to docker-compose
May 14, 2019
a219dc1
Set mix.lock as Elixir
dbernheisel Jun 27, 2019
2e3b3b2
Introduce initial doc
ujihisa Jul 20, 2019
46a6847
Do not change &formatprg globally
ujihisa Jul 20, 2019
1b7f422
Ensure right string matching case for elixirExUnit* patterns
kassio Aug 15, 2019
30e764f
Reading column number on credo errors
kelvinst Aug 21, 2019
c936563
syntax: Prevent syntax/html.vim from overriding our syn sync
liskin May 14, 2019
1c47961
syntax: Prevent syntax/javascript.vim from overriding our syn sync
liskin May 14, 2019
8bdf686
syntax: Fix elixir_use_markdown_for_docs
liskin May 14, 2019
edf94f7
Using mix compile, not mix as makeprg for mix compiler
kelvinst Aug 21, 2019
e9d495b
Improving the error format for mix compile
kelvinst Aug 21, 2019
eb06df6
Fix highlight for atoms containing @ character
Sep 2, 2019
2f276ab
Revert "Fix highlight for atoms containing @ character"
jbodah Sep 3, 2019
008b224
Fix doc sigil with paren
jbodah Sep 6, 2019
e8d59d1
don't change indent of doc blocks, strings, and comments
jbodah Sep 6, 2019
057ac39
Syntax: add __STACKTRACE__ (#514)
hauleth Nov 3, 2019
95a0e08
Add ctags to gitignore
pksunkara Feb 10, 2020
7b23001
Use /usr/bin/env to find bash
oleks Jan 23, 2020
a7f4225
Add raise as keyword
Sgiath Feb 19, 2020
85afa5e
Move test to one it
Sgiath Feb 19, 2020
088cfc4
add elixirFunctionCall
jbodah Mar 11, 2020
47d05df
Add tilde operators syntax matches
aoswalt Mar 27, 2020
942a17d
light brush up of README
jbodah Apr 17, 2020
f1f525e
add feature wishlist to README
jbodah Apr 17, 2020
084d184
tweak maintenance help wording
jbodah Apr 17, 2020
80f0dae
add configuration tips to README
jbodah Apr 18, 2020
d1d3688
README.md typo fix
szTheory Apr 25, 2020
53c530f
README.md update git clone URLs
szTheory Apr 25, 2020
6acef30
Add basic projectionist support
mluts Nov 2, 2018
f8890cf
Another take on projectionist config
kelvinst Aug 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
syntax: Highlight dots in aliases as aliases
It's confusing that "defmodule Foo.Bar" was highlighted differently than
"Foo.Bar.fun". Unify the two.
  • Loading branch information
liskin authored and jbodah committed May 2, 2019
commit 98c03047d15dfa62cedf56e27bffb03772d41753
18 changes: 15 additions & 3 deletions spec/syntax/alias_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

describe 'Alias syntax' do
it 'colorize only module alias' do
expect(<<~EOF).to include_elixir_syntax('elixirAlias', 'Enum')
Enum.empty?(...)
EOF
str = "Enum.empty?(...)"
expect(str).to include_elixir_syntax('elixirAlias', 'Enum')
expect(str).to include_elixir_syntax('elixirOperator', '\.')
expect(str).to include_elixir_syntax('elixirId', 'empty?')
end

it 'colorize the module alias even if it starts with `!`' do
Expand All @@ -33,4 +34,15 @@
expect(str).to include_elixir_syntax('elixirAlias', '3')
expect(str).to include_elixir_syntax('elixirAlias', 'Manager')
end

it 'colorize dots in module alias' do
str = "Foo.Bar.Baz.fun(...)"
expect(str).to include_elixir_syntax('elixirAlias', 'Foo')
expect(str).to include_elixir_syntax('elixirAlias', '\.\(Bar\)\@=')
expect(str).to include_elixir_syntax('elixirAlias', 'Bar')
expect(str).to include_elixir_syntax('elixirAlias', '\.\(Baz\)\@=')
expect(str).to include_elixir_syntax('elixirAlias', 'Baz')
expect(str).to include_elixir_syntax('elixirOperator', '\.\(fun\)\@=')
expect(str).to include_elixir_syntax('elixirId', 'fun')
end
end
7 changes: 4 additions & 3 deletions spec/syntax/defmodule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
end

it 'defines module name as elixirModuleDeclaration' do
expect(<<~EOF).to include_elixir_syntax('elixirModuleDeclaration', 'HelloPhoenix.HelloController')
defmodule HelloPhoenix.HelloController do
EOF
str = "defmodule HelloPhoenix.HelloController do"
expect(str).to include_elixir_syntax('elixirModuleDeclaration', 'HelloPhoenix')
expect(str).to include_elixir_syntax('elixirModuleDeclaration', '\.')
expect(str).to include_elixir_syntax('elixirModuleDeclaration', 'HelloController')
end

it 'does not define module name as elixirAlias' do
Expand Down
2 changes: 1 addition & 1 deletion syntax/elixir.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ syn match elixirOperator '\.\.\|\.'
syn match elixirOperator "\^\^\^\|\^"
syn match elixirOperator '\\\\\|::\|\*\|/\|\~\~\~\|@'

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

syn match elixirAtom '\(:\)\@<!:\%([a-zA-Z_]\w*\%([?!]\|=[>=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)'
syn match elixirAtom '\(:\)\@<!:\%(<=>\|&&\?\|%\(()\|\[\]\|{}\)\|++\?\|--\?\|||\?\|!\|//\|[%&`/|]\)'
Expand Down