-
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
3 changed files
with
89 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,16 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
|
||
## [1.0.0] - 2023-11-21 | ||
|
||
### Added | ||
|
||
* Initial implementation | ||
|
||
|
||
[1.0.0]: https://github.com/alxndr/vim-syntax-tokipona/releases/tag/v1.0.0 |
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,16 @@ | ||
# `vim-syntax-tokipona` | ||
|
||
Define [vim] `syntax` and `highlight` settings for text written in [toki pona]. | ||
|
||
|
||
## Usage | ||
|
||
`:set filetype=tokipona` | ||
|
||
|
||
## Screenshot | ||
|
||
[![screenshot](https://i.imgur.com/TfkF8ztl.png){:style="max-width:320px"}](https://i.imgur.com/TfkF8zt.png) | ||
|
||
[toki pona]: https://tokipona.org | ||
[vim]: https://www.vim.org/ |
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,57 @@ | ||
" Vim syntax file | ||
" Language: Toki Pona (unofficial) <https://tokipona.org> | ||
" Maintainer: jan Lesate <alxndr+tp.vim@gmail.com> | ||
" Source: https://github.com/alxndr/vim-syntax-tokipona | ||
|
||
let b:current_syntax = "tokipona" | ||
|
||
" ... first define the most general things | ||
syntax match tpWord '[A-Za-z]\+' | ||
syntax match tpPhraseEndingPunctuation '[.:!?…]\+' | ||
syntax match tpNonLetters '[^A-Za-z]\+' | ||
|
||
" ... then define regions | ||
syntax region tpPrenex matchgroup=tpPrenex start=/^/ start=/[\.:!\?…]/ end=/\<la\>/ contains=ALLBUT,tpPrenex,tpPhraseEndingPunctuation keepend | ||
syntax keyword tpPrenexSuffix la contained | ||
|
||
" ... then match arbitrary headnouns + names | ||
syntax match tpNamesMatch '\<[a-z]\+\s\+\(\<[A-Z][A-Za-z]\+\>\s*\)\+' " broken?? | ||
|
||
" ... then define more specific terms | ||
syntax keyword tpInterrogatives anu seme | ||
syntax match tpInterrogativesMatch '\<\([a-z]\+\) ala \1\>' | ||
syntax keyword tpNounParticles en pi | ||
syntax keyword tpModifiers kin taso | ||
syntax keyword tpPrepositions kama ken kepeken lon sama tan tawa | ||
syntax keyword tpPronouns mi ni ona sina | ||
syntax keyword tpQuantifier ala ale ali | ||
syntax keyword tpVerbParticles e li | ||
syntax keyword tpVocalizations a o | ||
|
||
" highlight tpNonLetters gui=bold | ||
|
||
highlight tpPrenex gui=italic | ||
highlight tpPrenexSuffix gui=italic | ||
|
||
highlight default link tpNamesMatch Function | ||
highlight default link tpPronouns Statement | ||
highlight default link tpNounParticles Type | ||
|
||
highlight default link tpInterrogatives Special | ||
highlight default link tpInterrogativesMatch Special | ||
highlight default link tpQuantifier Type | ||
|
||
highlight default link tpPrepositions Type | ||
highlight default link tpNonLetters Comment | ||
|
||
highlight default link tpVerbParticles Constant | ||
highlight default link tpModifiers String | ||
|
||
highlight tpVocalizations gui=underline | ||
|
||
" Comment is gray italic | ||
" Constant is orange | ||
" Identifier is red | ||
" Type is yellowish | ||
" Statement is purply | ||
" Function is blue |