This commit is contained in:
davidhcefx 2024-02-03 18:20:32 +00:00 committed by GitHub
commit ac8b6f6d3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 42 additions and 0 deletions

42
v.nanorc Normal file
View File

@ -0,0 +1,42 @@
# The syntax highlight for V
# Author : HARXI
# Version: 1.0.0
# License: MIT
syntax v "\.(v|c.v|.vsh|.vv)$"
# Operators
color brightred "(\+|-|\*|/|%|~|&|(\|)|^|!|<|>|:=|=|\?|\.)"
# Keywords
color bold,pink "\<(as|asm|assert|atomic|break|const|continue|defer|else|enum|false|fn|for|go|goto|if|import|in|interface|is|isreftype|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|spawn|static|struct|true|type|typeof|union|unsafe|volatile|__global|__offsetof)\>"
# Literals
color rosy "\<([0-9]+|0[oO][0-7]+|0[xX][[:xdigit:]]+)\>"
color rosy "\<[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?\>"
color rosy "\<[0-9]+[eE][+-]?[0-9]+\>"
color rosy "\<[0-9]+\>"
# Types
color bold,pink "\<(bool|string|int|i(8|16|32|64|128)|u(8|16|32|64|128)|rune|f(32|64)|isize|usize|voidptr|any)\>"
# Compile time
color brightblue "\$([a-zA-Z._0-9])+"
# Flags
color brightblue "\#([a-zA-Z._0-9])+"
# Upper case words
color rosy "[A-Z][A-Za-z0-9_]+"
# Compile time constants
color pink "\@([a-zA-Z._0-9])+"
# String and char
color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
color brightgreen "`([^`\]|\\.)*`"
# Comments
color brightblue start="/\*" end="\*/"
color brightblue "(^|[[:blank:]])//.*"