Skip to content

Commit

Permalink
Merge branch 'scope-plus-as-option' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-gp committed Nov 6, 2022
2 parents be3d7ce + 97a7286 commit ab04bda
Show file tree
Hide file tree
Showing 38 changed files with 141 additions and 142 deletions.
6 changes: 5 additions & 1 deletion syntaxes/cmd-help.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ contexts:
scope: keyword.control.end-of-options.cmd-help
set: then-pop
- match: \+(?=[\s<[:alpha:]])
scope: keyword.control.plus-option.cmd-help
scope: *OPTION_DEF_SCOPES
set: plus-option-post
- match: -:(?={{option_break}})
scope: *OPTION_DEF_SCOPES
Expand Down Expand Up @@ -331,6 +331,10 @@ contexts:
- match: '{{allcaps_argument_name}}(:{{allcaps_argument_name}})*'
scope: *OPTION_ARGUMENT_SCOPES
set: then-pop
# e.g.: "+s, --no-sort" (from fzf)
- match: '[a-z]+'
scope: *OPTION_DEF_SCOPES
set: option-def-post
- include: else-pop

### other definitions ########################################################
Expand Down
4 changes: 2 additions & 2 deletions tests/highlighted/emacs-26.3.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/highlighted/fzf-0.33.0.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/highlighted/vim-8.1.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions tests/syntax/syntax_test_emacs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ Action options:
FILE visit FILE
#^^^ variable.parameter.other-value.cmd-help
+LINE go to line LINE in next FILE
# <- keyword.control.plus-option.cmd-help
# <- - entity.name.function.option.cmd-help
# <- entity.name.function.option.cmd-help
#^^^^ variable.parameter.option-argument.cmd-help
#todo #8: re-scope + as option
+LINE:COLUMN go to line LINE, column COLUMN, in next FILE
#^^^^^^^^^^^ variable.parameter.option-argument.cmd-help
--directory, -L DIR prepend DIR to load-path (with :DIR, append DIR)
Expand Down
7 changes: 3 additions & 4 deletions tests/syntax/syntax_test_fzf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ usage: fzf [options]
-e, --exact Enable Exact-match
-i Case-insensitive match (default: smart-case match)
+i Case-sensitive match
# ^^ - entity.name.function.option.cmd-help
#todo #8: scope +options
# ^^ entity.name.function.option.cmd-help
--scheme=SCHEME Scoring scheme [default|path|history]
--literal Do not normalize latin script letters before matching
-n, --nth=N[,..] Comma-separated list of field index expressions
Expand All @@ -19,9 +18,9 @@ usage: fzf [options]
field index expressions
-d, --delimiter=STR Field delimiter regex (default: AWK-style)
+s, --no-sort Do not sort the result
# ^^ - entity.name.function.option.cmd-help
# ^^ entity.name.function.option.cmd-help
# ^^ - entity.name.function.option.cmd-help
# ^^^^^^^^^ - entity.name.function.option.cmd-help
# ^^^^^^^^^ entity.name.function.option.cmd-help
--tac Reverse the order of the input
--disabled Do not perform search
--tiebreak=CRI[,..] Comma-separated list of sort criteria to apply
Expand Down
6 changes: 2 additions & 4 deletions tests/syntax/syntax_test_vim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ Arguments:
-o[N] Open N windows (default: one for each file)
-O[N] Like -o but split vertically
+ Start at end of file
# ^ keyword.control.plus-option.cmd-help
# ^ - entity.name.function.option.cmd-help
#todo #8: re-scope + as option
# ^ entity.name.function.option.cmd-help
+<lnum> Start at line <lnum>
# ^ keyword.control.plus-option.cmd-help
# ^ entity.name.function.option.cmd-help
# ^^^^^^ variable.parameter.option-argument.cmd-help
--cmd <command> Execute <command> before loading any vimrc file
-c <command> Execute <command> after loading the first file
Expand Down
8 changes: 4 additions & 4 deletions tests/theme/1337-italics.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/1337.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/Coldark-Cold.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/Coldark-Dark.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/DarkNeon.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/Dracula-italics.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/Dracula.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/GitHub.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/theme/Monokai Extended Bright-italics.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ab04bda

Please sign in to comment.