dotfiles-pub/common/nano/syntax/glsl.nanorc

40 lines
1.6 KiB
Plaintext

syntax "glsl" "\.(frag|vert|fp|vp|glsl)$"
# Resets everything back to plain text coloring.
# Can be used at the start of each theme file.
color white "^.*$"
color cyan "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color white "[(]"
color blue "\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\>"
color blue "\<gl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\>"
color red "\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\>"
color red "\<(break|continue)\>"
color brightwhite "\<(true|false)\>"
color yellow "[-+/*=<>?:!~%&|^]"
color brightwhite "\<([0-9]+|0x[0-9a-fA-F]*)\>"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
comment "//"
color brightwhite,cyan "\<TODO\>:?"
color brightwhite,cyan "\<FIXME\>:?"
color ,red "[[:space:]]+$"
color brightyellow " + +| + +"
# rainbow indent
color ,brightblack "^[[:space:]]{32}"
color ,black "^[[:space:]]{30}"
color ,brightblack "^[[:space:]]{28}"
color ,black "^[[:space:]]{26}"
color ,brightblack "^[[:space:]]{24}"
color ,black "^[[:space:]]{22}"
color ,brightblack "^[[:space:]]{20}"
color ,black "^[[:space:]]{18}"
color ,brightblack "^[[:space:]]{16}"
color ,black "^[[:space:]]{14}"
color ,brightblack "^[[:space:]]{12}"
color ,black "^[[:space:]]{10}"
color ,brightblack "^[[:space:]]{8}"
color ,black "^[[:space:]]{6}"
color ,brightblack "^[[:space:]]{4}"
color ,black "^[[:space:]]{2}"