-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1277 from alex-s168/vim-syntax
add vim + nvim syntax highlighting
- Loading branch information
Showing
5 changed files
with
44 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
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,5 @@ | ||
# Vim (+ NeoVim) Syntax Highlighting | ||
|
||
Copy the sub-directories of this folder to your Vim configuration home. | ||
|
||
For NeoVim: `cp -r syntax ~/.config/nvim && cp -r ftplugin ~/.config/nvim && cp -r ftdetect ~/.config/nvim` |
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,2 @@ | ||
au BufRead,BufNewFile *.lsts set filetype=lsts | ||
au BufRead,BufNewFile *.lm set filetype=lsts |
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,3 @@ | ||
setlocal tabstop=3 | ||
setlocal shiftwidth=3 | ||
setlocal expandtab |
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,30 @@ | ||
:syntax case match | ||
|
||
:syntax keyword lstsKeyword let interface for while if else match import type fragment macro λ as zero | ||
:syntax keyword lstsType Bool U8 U16 U32 U64 I8 I16 I32 I64 F32 F64 Nil | ||
:syntax keyword lstsTODO TODO contained | ||
:syntax match lstsOperator /==\|!=\|<=\|>=\|<\|>\|=\|=>\|\:\:\|\.\|+\|-\|\*\|\/\|&\||\|\'&/ | ||
:syntax match lstsIdentifier /\'\?\.\?\<[a-zA-Z_][a-zA-Z0-9_\-]*\>/ | ||
:syntax match lstsAdvIdentifier /\$"[^"\n]*"/ contains=lstsEscape | ||
:syntax match lstsComment /#.*$/ contains=lstsTODO | ||
:syntax match lstsNumber /\<\d\+\(\.\d\+\)\?\(_u64\|_u32\|_u16\|_u8\|_i64\|_i32\|_i16\|_i8\|_f32\|_f64\)\?\>/ | ||
:syntax match lstsBraces /[{}()\[\]]/ | ||
:syntax match lstsEscape /\\[nrt\\"']/ contained | ||
:syntax match lstsString /\(c\|r\)\?"[^"\n]*"/ contains=lstsEscape | ||
:syntax match lstsPath /\<\([a-zA-Z_][a-zA-Z0-9_\-]*\/\)*[a-zA-Z_][a-zA-Z0-9_\-]*\.\(lsts\|lm\|h\)\>/ | ||
:syntax match lstsPunctuation /[,;\:]/ | ||
|
||
:highlight link lstsKeyword Keyword | ||
:highlight link lstsType Type | ||
:highlight link lstsOperator Operator | ||
:highlight link lstsFunction Function | ||
:highlight link lstsComment Comment | ||
:highlight link lstsNumber Number | ||
:highlight link lstsBraces Delimiter | ||
:highlight link lstsString String | ||
:highlight link lstsPath String | ||
:highlight link lstsEscape SpecialChar | ||
:highlight link lstsTODO SpecialChar | ||
:highlight link lstsPunctuation Delimiter | ||
:highlight link lstsIdentifier Identifier | ||
:highlight link lstsAdvIdentifier Identifier |