-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Syntax for vim (very minimalistic) and completions for zsh
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PREFIX?= /usr/local | ||
|
||
all: | ||
@echo 'run `${MAKE} install` to install additional files' | ||
|
||
install: | ||
install -m 644 completion-zsh.sh "${DESTDIR}${PREFIX}/share/zsh/site-functions/_omnilinter" | ||
install -m 644 syntax.vim "${DESTDIR}${PREFIX}/share/vim/vimfiles/syntax/omnilinter.vim" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#compdef omnilinter | ||
|
||
_arguments \ | ||
'*'{-c+,--config=}'[Path(s) to configuration file(s)]:file:_files' \ | ||
'(-t --tags)'{-t+,--tags=}'[Only process rules tagged with these values]:tag:' \ | ||
'--skip-tags=[Ignore rules tagged with these values]:tag:' \ | ||
'(-f --format)'{-f+,--format=}'[Output format]:format:(by-root full-paths by-rule by-path json)' \ | ||
'--color=[Coloring]:mode:(auto always never)' \ | ||
'--palette=[Palette to use for rule coloring]:palette:(none simple severity true-color)' \ | ||
'--error-exitcode=[If any matches are found, exit with given code]:exit code:' \ | ||
{-j+,--jobs=}'[Number of target directories to process simultaneously]:number:' \ | ||
'(* -)'{-h,--help}'[Print help]' \ | ||
'(* -)'{-V,--version}'[Print version]' \ | ||
'*:directory:_files -/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
" Vim syntax file | ||
" Language: omnilinter config file | ||
" Maintainer: Dmitry Marakasov <[email protected]> | ||
|
||
if exists("b:current_syntax") | ||
finish | ||
endif | ||
|
||
syn keyword omnilinterTodo contained TODO FIXME XXX | ||
syn match omnilinterIgnore contained "omnilinter: ignore" | ||
syn match omnilinterComment "#.*" contains=omnilinterIgnore,omnilinterTodo,@Spell | ||
syn match omnilinterTag "[^ \t,]\+" contained | ||
|
||
syn region omnilinterRuleTitle skipwhite keepend start=+\[+ skip=+\]\]+ end=+\]+ | ||
syn keyword omnilinterDirective tags files nofiles match nomatch size lines | ||
syn region omnilinterDirectiveTags matchgroup=omnilinterDirective start=+^\s*tags+ skip=+,+ end=+\s*$+ contains=omnilinterTag | ||
|
||
hi def link omnilinterComment Comment | ||
hi def link omnilinterRuleTitle Keyword | ||
hi def link omnilinterDirective Identifier | ||
hi def link omnilinterIgnore SpecialComment | ||
hi def link omnilinterTodo Todo | ||
hi def link omnilinterTag String | ||
|
||
let b:current_syntax = "omnilinter" |