generated from ellisonleao/nvim-plugin-template
-
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.
- Loading branch information
Showing
5 changed files
with
99 additions
and
2 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 @@ | ||
autocmd BufNewFile,BufRead *.oz setf oz |
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,12 @@ | ||
" Written by Michael Ekstrand | ||
" Not overly creative. But, for what it's worth, this file is hereby placed | ||
" explicitly into the public domain. If this is not possible in your | ||
" juristiction, then the author hereby grants to everyone everywhere the | ||
" irrevocable right to copy, modify, distribute, and use this file. | ||
|
||
setlocal ts=3 | ||
setlocal sts=3 | ||
setlocal sw=3 | ||
setlocal et | ||
setlocal fo=croq2 | ||
setlocal cinwords=import,export,define,in |
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 |
---|---|---|
@@ -1 +1 @@ | ||
vim.api.nvim_create_user_command("MyFirstFunction", require("plugin_name").hello, {}) | ||
vim.api.nvim_create_user_command("MyFirstFunction", require("oz").hello, {}) |
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,84 @@ | ||
" Vim syntax file | ||
" Language: Oz/Mozart (www.mozart-oz.org) | ||
" Maintainer: Michael Neumann <mneumann@fantasy-coders.de> | ||
" Contributer: Stijn Seghers <stijnseghers at gmail.com> | ||
" Last Change: 2014 Apr 17 | ||
|
||
if exists("b:current_syntax") | ||
finish | ||
endif | ||
|
||
syn region ozComment start="%" end="$" contains=ozTodo | ||
syn region ozComment start="/\*" end="\*/" contains=ozTodo | ||
syn keyword ozTodo contained TODO FIXME XXX | ||
|
||
syn keyword ozKeyword at attr | ||
syn keyword ozKeyword case catch choice class cond | ||
syn keyword ozKeyword declare define dis do | ||
syn keyword ozKeyword else elsecase elseif end export | ||
syn keyword ozKeyword fail feat finally for from fun functor | ||
syn keyword ozKeyword if import in | ||
syn keyword ozKeyword local lock | ||
syn keyword ozKeyword meth mod | ||
syn keyword ozKeyword of | ||
syn keyword ozKeyword prepare proc prop | ||
syn keyword ozKeyword raise require | ||
syn keyword ozKeyword self skip | ||
syn keyword ozKeyword then thread try | ||
syn keyword ozKeyword unit | ||
|
||
syn keyword ozBoolean true false | ||
|
||
"syn keyword ozOperator andthen div not or orelse | ||
syn keyword ozKeyword andthen div not or orelse | ||
|
||
syn keyword ozQualifier lazy | ||
|
||
syn match ozOperator "|" | ||
syn match ozOperator "#" | ||
syn match ozOperator ":" | ||
syn match ozOperator "\.\.\." | ||
syn match ozOperator "=" | ||
syn match ozOperator "\." | ||
syn match ozOperator "\^" | ||
syn match ozOperator "\[\]" | ||
syn match ozOperator "\$" | ||
syn match ozOperator "!" | ||
syn match ozOperator "_" | ||
syn match ozOperator "\~" | ||
syn match ozOperator "+" | ||
syn match ozOperator "-" | ||
syn match ozOperator "\*" | ||
syn match ozOperator "/[^\*]" " if followed by a * it is a comment | ||
syn match ozOperator "@" | ||
syn match ozOperator "<-" | ||
syn match ozOperator "," | ||
syn match ozOperator "!!" | ||
syn match ozOperator "\(<=\|==\|\\=\|<\|=<\|>\|>=\)" | ||
syn match ozOperator "\(=:\|\\=:\|<:\|=<:\|>:\|>=:\|::\|:::\)" | ||
|
||
syn match ozVariable "[A-Z][A-Za-z0-9_]*" | ||
syn match ozVariable "`[^`]*`" | ||
|
||
syn match ozAtom "[a-z][A-Za-z0-9_]*" | ||
|
||
syn region ozString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ | ||
syn region ozString start=+L\='+ skip=+\\\\\|\\'+ end=+'+ | ||
|
||
syn match ozNumber "[0-9][0-9]*\(\.[0-9][0-9]*\)\?" | ||
|
||
syn sync fromstart | ||
|
||
|
||
hi link ozKeyword Keyword | ||
hi link ozOperator Operator | ||
hi link ozBoolean Boolean | ||
hi link ozVariable Identifier | ||
hi link ozAtom Type | ||
hi link ozString String | ||
hi link ozNumber Number | ||
hi link ozTodo Todo | ||
hi link ozComment Comment | ||
hi link ozQualifier Type | ||
|
||
let b:current_syntax = "oz" |