mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
a98a6996c2
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7 Excluding: Amiga icons (*.info, icons/) doc/hangulin.txt tutor/ spell/ lang/ (only used for menu translations) macros/maze/, macros/hanoi/, macros/life/, macros/urm/ These were used to test vi compatibility. termcap "Demonstration of a termcap file (for the Amiga and Archimedes)" Helped-by: Rich Wareham <rjw57@cam.ac.uk> Helped-by: John <john.schmidt.h@gmail.com> Helped-by: Yann <yann@yann-salaun.com> Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com> Helped-by: drasill <github@tof2k.com> Helped-by: Tae Sandoval Murgan <taecilla@gmail.com> Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>
104 lines
3.4 KiB
VimL
104 lines
3.4 KiB
VimL
" Vim syntax file
|
|
" Language: Clean
|
|
" Author: Pieter van Engelen <pietere@sci.kun.nl>
|
|
" Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl>
|
|
" Last Change: 2013 Oct 15 by Jurriën Stutterheim
|
|
|
|
" For version 5.x: Clear all syntax items
|
|
" For version 6.x: Quit when a syntax file was already loaded
|
|
if version < 600
|
|
syntax clear
|
|
elseif exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
let s:cpo_save = &cpo
|
|
set cpo&vim
|
|
|
|
" Some Clean-keywords
|
|
syn keyword cleanConditional if case
|
|
syn keyword cleanLabel let! with where in of
|
|
syn keyword cleanSpecial Start
|
|
syn keyword cleanKeyword infixl infixr infix
|
|
syn keyword cleanBasicType Int Real Char Bool String
|
|
syn keyword cleanSpecialType World ProcId Void Files File
|
|
syn keyword cleanModuleSystem module implementation definition system
|
|
syn keyword cleanTypeClass class instance export
|
|
|
|
" Import highlighting
|
|
syn region cleanIncludeRegion start="^\s*\(from\|import\|\s\+\(as\|qualified\)\)" end="\n" contains=cleanIncludeKeyword keepend
|
|
syn keyword cleanIncludeKeyword contained from import as qualified
|
|
|
|
" To do some Denotation Highlighting
|
|
syn keyword cleanBoolDenot True False
|
|
syn region cleanStringDenot start=+"+ skip=+\(\(\\\\\)\+\|\\"\)+ end=+"+ display
|
|
syn match cleanCharDenot "'\(\\\\\|\\'\|[^'\\]\)\+'" display
|
|
syn match cleanIntegerDenot "[\~+-]\?\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" display
|
|
syn match cleanRealDenot "[\~+-]\?\d\+\.\d\+\(E[\~+-]\?\d\+\)\?" display
|
|
|
|
" To highlight the use of lists, tuples and arrays
|
|
syn region cleanList start="\[" end="\]" contains=ALL
|
|
syn region cleanRecord start="{" end="}" contains=ALL
|
|
syn region cleanArray start="{:" end=":}" contains=ALL
|
|
syn match cleanTuple "([^=]*,[^=]*)" contains=ALL
|
|
|
|
" To do some Comment Highlighting
|
|
syn region cleanComment start="/\*" end="\*/" contains=cleanComment,cleanTodo fold
|
|
syn region cleanComment start="//.*" end="$" display contains=cleanTodo
|
|
syn keyword cleanTodo TODO FIXME XXX contained
|
|
|
|
" Now for some useful type definition recognition
|
|
syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword
|
|
|
|
|
|
" Define the default highlighting.
|
|
" For version 5.7 and earlier: only when not done already
|
|
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
if version >= 508 || !exists("did_clean_syntax_init")
|
|
if version < 508
|
|
let did_clean_syntax_init = 1
|
|
command -nargs=+ HiLink hi link <args>
|
|
else
|
|
command -nargs=+ HiLink hi def link <args>
|
|
endif
|
|
|
|
" Comments
|
|
HiLink cleanComment Comment
|
|
" Constants and denotations
|
|
HiLink cleanStringDenot String
|
|
HiLink cleanCharDenot Character
|
|
HiLink cleanIntegerDenot Number
|
|
HiLink cleanBoolDenot Boolean
|
|
HiLink cleanRealDenot Float
|
|
" Identifiers
|
|
" Statements
|
|
HiLink cleanTypeClass Keyword
|
|
HiLink cleanConditional Conditional
|
|
HiLink cleanLabel Label
|
|
HiLink cleanKeyword Keyword
|
|
" Generic Preprocessing
|
|
HiLink cleanIncludeKeyword Include
|
|
HiLink cleanModuleSystem PreProc
|
|
" Type
|
|
HiLink cleanBasicType Type
|
|
HiLink cleanSpecialType Type
|
|
HiLink cleanFuncTypeDef Typedef
|
|
" Special
|
|
HiLink cleanSpecial Special
|
|
HiLink cleanList Special
|
|
HiLink cleanArray Special
|
|
HiLink cleanRecord Special
|
|
HiLink cleanTuple Special
|
|
" Error
|
|
" Todo
|
|
HiLink cleanTodo Todo
|
|
|
|
delcommand HiLink
|
|
endif
|
|
|
|
let b:current_syntax = "clean"
|
|
|
|
let &cpo = s:cpo_save
|
|
unlet s:cpo_save
|
|
" vim: ts=4
|