annotate runtime/syntax/gdshader.vim @ 29996:e37754a13778

Update runtime files Commit: https://github.com/vim/vim/commit/9b03d3e75b4274493bbe76772d7b92238791964c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 20:26:34 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Tue, 30 Aug 2022 21:30:04 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29996
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file for Godot shading language
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: gdshader
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Maxim Kim <habamax@gmail.com>
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Filenames: *.gdshader
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 if exists("b:current_syntax")
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 finish
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 endif
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 syn keyword gdshaderConditional if else switch case default
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 syn keyword gdshaderRepeat for while do
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 syn keyword gdshaderStatement return discard
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 syn keyword gdshaderBoolean true false
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 syn keyword gdshaderKeyword shader_type render_mode
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn keyword gdshaderKeyword in out inout
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 syn keyword gdshaderKeyword lowp mediump highp
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 syn keyword gdshaderKeyword uniform varying const
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn keyword gdshaderKeyword flat smooth
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 syn keyword gdshaderType float vec2 vec3 vec4
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 syn keyword gdshaderType uint uvec2 uvec3 uvec4
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn keyword gdshaderType int ivec2 ivec3 ivec4
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 syn keyword gdshaderType void bool
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 syn keyword gdshaderType bvec2 bvec3 bvec4
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn keyword gdshaderType mat2 mat3 mat4
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 syn keyword gdshaderType sampler2D isampler2D usampler2D samplerCube
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syn match gdshaderMember "\v<(\.)@<=[a-z_]+\w*>"
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 syn match gdshaderBuiltin "\v<[A-Z_]+[A-Z0-9_]*>"
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn match gdshaderFunction "\v<\w*>(\()@="
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 syn match gdshaderNumber "\v<\d+(\.)@!>"
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn match gdshaderFloat "\v<\d*\.\d+(\.)@!>"
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 syn match gdshaderFloat "\v<\d*\.=\d+(e-=\d+)@="
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 syn match gdshaderExponent "\v(\d*\.=\d+)@<=e-=\d+>"
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn match gdshaderComment "\v//.*$" contains=@Spell
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn region gdshaderComment start="/\*" end="\*/" contains=@Spell
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 syn keyword gdshaderTodo TODO FIXME XXX NOTE BUG HACK OPTIMIZE containedin=gdshaderComment
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 hi def link gdshaderConditional Conditional
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 hi def link gdshaderRepeat Repeat
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 hi def link gdshaderStatement Statement
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 hi def link gdshaderBoolean Boolean
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 hi def link gdshaderKeyword Keyword
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 hi def link gdshaderMember Identifier
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 hi def link gdshaderBuiltin Identifier
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 hi def link gdshaderFunction Function
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 hi def link gdshaderType Type
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 hi def link gdshaderNumber Number
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 hi def link gdshaderFloat Float
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 hi def link gdshaderExponent Special
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 hi def link gdshaderComment Comment
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 hi def link gdshaderTodo Todo
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
e37754a13778 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 let b:current_syntax = "gdshader"