@codingame/monaco-vscode-hlsl-default-extension 1.81.8-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,217 @@
1
+ {
2
+ "information_for_contributors": [
3
+ "This file has been converted from https://github.com/tgjones/shaders-tmLanguage/blob/master/grammars/hlsl.json",
4
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5
+ "Once accepted there, we are happy to receive an update request."
6
+ ],
7
+ "version": "https://github.com/tgjones/shaders-tmLanguage/commit/87c0dca3a39170dbd7ee7e277db4f915fb2de14a",
8
+ "name": "HLSL",
9
+ "scopeName": "source.hlsl",
10
+ "patterns": [
11
+ {
12
+ "name": "comment.line.block.hlsl",
13
+ "begin": "/\\*",
14
+ "end": "\\*/"
15
+ },
16
+ {
17
+ "name": "comment.line.double-slash.hlsl",
18
+ "begin": "//",
19
+ "end": "$"
20
+ },
21
+ {
22
+ "name": "constant.numeric.decimal.hlsl",
23
+ "match": "\\b[0-9]+\\.[0-9]*(F|f)?\\b"
24
+ },
25
+ {
26
+ "name": "constant.numeric.decimal.hlsl",
27
+ "match": "(\\.([0-9]+)(F|f)?)\\b"
28
+ },
29
+ {
30
+ "name": "constant.numeric.decimal.hlsl",
31
+ "match": "\\b([0-9]+(F|f)?)\\b"
32
+ },
33
+ {
34
+ "name": "constant.numeric.hex.hlsl",
35
+ "match": "\\b(0(x|X)[0-9a-fA-F]+)\\b"
36
+ },
37
+ {
38
+ "name": "constant.language.hlsl",
39
+ "match": "\\b(false|true)\\b"
40
+ },
41
+ {
42
+ "name": "keyword.preprocessor.hlsl",
43
+ "match": "^\\s*#\\s*(define|elif|else|endif|ifdef|ifndef|if|undef|include|line|error|pragma)"
44
+ },
45
+ {
46
+ "name": "keyword.control.hlsl",
47
+ "match": "\\b(break|case|continue|default|discard|do|else|for|if|return|switch|while)\\b"
48
+ },
49
+ {
50
+ "name": "keyword.control.fx.hlsl",
51
+ "match": "\\b(compile)\\b"
52
+ },
53
+ {
54
+ "name": "keyword.typealias.hlsl",
55
+ "match": "\\b(typedef)\\b"
56
+ },
57
+ {
58
+ "name": "storage.type.basic.hlsl",
59
+ "match": "\\b(bool([1-4](x[1-4])?)?|double([1-4](x[1-4])?)?|dword|float([1-4](x[1-4])?)?|half([1-4](x[1-4])?)?|int([1-4](x[1-4])?)?|matrix|min10float([1-4](x[1-4])?)?|min12int([1-4](x[1-4])?)?|min16float([1-4](x[1-4])?)?|min16int([1-4](x[1-4])?)?|min16uint([1-4](x[1-4])?)?|unsigned|uint([1-4](x[1-4])?)?|vector|void)\\b"
60
+ },
61
+ {
62
+ "name": "support.function.hlsl",
63
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(?=[\\s]*\\()"
64
+ },
65
+ {
66
+ "name": "support.variable.semantic.hlsl",
67
+ "match": "(?<=\\:\\s|\\:)(?i:BINORMAL[0-9]*|BLENDINDICES[0-9]*|BLENDWEIGHT[0-9]*|COLOR[0-9]*|NORMAL[0-9]*|POSITIONT|POSITION|PSIZE[0-9]*|TANGENT[0-9]*|TEXCOORD[0-9]*|FOG|TESSFACTOR[0-9]*|VFACE|VPOS|DEPTH[0-9]*)\\b"
68
+ },
69
+ {
70
+ "name": "support.variable.semantic.sm4.hlsl",
71
+ "match": "(?<=\\:\\s|\\:)(?i:SV_ClipDistance[0-9]*|SV_CullDistance[0-9]*|SV_Coverage|SV_Depth|SV_DepthGreaterEqual[0-9]*|SV_DepthLessEqual[0-9]*|SV_InstanceID|SV_IsFrontFace|SV_Position|SV_RenderTargetArrayIndex|SV_SampleIndex|SV_StencilRef|SV_Target[0-7]?|SV_VertexID|SV_ViewportArrayIndex)\\b"
72
+ },
73
+ {
74
+ "name": "support.variable.semantic.sm5.hlsl",
75
+ "match": "(?<=\\:\\s|\\:)(?i:SV_DispatchThreadID|SV_DomainLocation|SV_GroupID|SV_GroupIndex|SV_GroupThreadID|SV_GSInstanceID|SV_InsideTessFactor|SV_OutputControlPointID|SV_TessFactor)\\b"
76
+ },
77
+ {
78
+ "name": "support.variable.semantic.sm5_1.hlsl",
79
+ "match": "(?<=\\:\\s|\\:)(?i:SV_InnerCoverage|SV_StencilRef)\\b"
80
+ },
81
+ {
82
+ "name": "storage.modifier.hlsl",
83
+ "match": "\\b(column_major|const|export|extern|globallycoherent|groupshared|inline|inout|in|out|precise|row_major|shared|static|uniform|volatile)\\b"
84
+ },
85
+ {
86
+ "name": "storage.modifier.float.hlsl",
87
+ "match": "\\b(snorm|unorm)\\b"
88
+ },
89
+ {
90
+ "name": "storage.modifier.postfix.hlsl",
91
+ "match": "\\b(packoffset|register)\\b"
92
+ },
93
+ {
94
+ "name": "storage.modifier.interpolation.hlsl",
95
+ "match": "\\b(centroid|linear|nointerpolation|noperspective|sample)\\b"
96
+ },
97
+ {
98
+ "name": "storage.modifier.geometryshader.hlsl",
99
+ "match": "\\b(lineadj|line|point|triangle|triangleadj)\\b"
100
+ },
101
+ {
102
+ "name": "support.type.other.hlsl",
103
+ "match": "\\b(string)\\b"
104
+ },
105
+ {
106
+ "name": "support.type.object.hlsl",
107
+ "match": "\\b(AppendStructuredBuffer|Buffer|ByteAddressBuffer|ConstantBuffer|ConsumeStructuredBuffer|InputPatch|OutputPatch)\\b"
108
+ },
109
+ {
110
+ "name": "support.type.object.rasterizerordered.hlsl",
111
+ "match": "\\b(RasterizerOrderedBuffer|RasterizerOrderedByteAddressBuffer|RasterizerOrderedStructuredBuffer|RasterizerOrderedTexture1D|RasterizerOrderedTexture1DArray|RasterizerOrderedTexture2D|RasterizerOrderedTexture2DArray|RasterizerOrderedTexture3D)\\b"
112
+ },
113
+ {
114
+ "name": "support.type.object.rw.hlsl",
115
+ "match": "\\b(RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture1D|RWTexture1DArray|RWTexture2D|RWTexture2DArray|RWTexture3D)\\b"
116
+ },
117
+ {
118
+ "name": "support.type.object.geometryshader.hlsl",
119
+ "match": "\\b(LineStream|PointStream|TriangleStream)\\b"
120
+ },
121
+ {
122
+ "name": "support.type.sampler.legacy.hlsl",
123
+ "match": "\\b(sampler|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler_state)\\b"
124
+ },
125
+ {
126
+ "name": "support.type.sampler.hlsl",
127
+ "match": "\\b(SamplerState|SamplerComparisonState)\\b"
128
+ },
129
+ {
130
+ "name": "support.type.texture.legacy.hlsl",
131
+ "match": "\\b(texture2D|textureCUBE)\\b"
132
+ },
133
+ {
134
+ "name": "support.type.texture.hlsl",
135
+ "match": "\\b(Texture1D|Texture1DArray|Texture2D|Texture2DArray|Texture2DMS|Texture2DMSArray|Texture3D|TextureCube|TextureCubeArray)\\b"
136
+ },
137
+ {
138
+ "name": "storage.type.structured.hlsl",
139
+ "match": "\\b(cbuffer|class|interface|namespace|struct|tbuffer)\\b"
140
+ },
141
+ {
142
+ "name": "support.constant.property-value.fx.hlsl",
143
+ "match": "\\b(FALSE|TRUE|NULL)\\b"
144
+ },
145
+ {
146
+ "name": "support.type.fx.hlsl",
147
+ "match": "\\b(BlendState|DepthStencilState|RasterizerState)\\b"
148
+ },
149
+ {
150
+ "name": "storage.type.fx.technique.hlsl",
151
+ "match": "\\b(technique|Technique|technique10|technique11|pass)\\b"
152
+ },
153
+ {
154
+ "name": "meta.object-literal.key.fx.blendstate.hlsl",
155
+ "match": "\\b(AlphaToCoverageEnable|BlendEnable|SrcBlend|DestBlend|BlendOp|SrcBlendAlpha|DestBlendAlpha|BlendOpAlpha|RenderTargetWriteMask)\\b"
156
+ },
157
+ {
158
+ "name": "meta.object-literal.key.fx.depthstencilstate.hlsl",
159
+ "match": "\\b(DepthEnable|DepthWriteMask|DepthFunc|StencilEnable|StencilReadMask|StencilWriteMask|FrontFaceStencilFail|FrontFaceStencilZFail|FrontFaceStencilPass|FrontFaceStencilFunc|BackFaceStencilFail|BackFaceStencilZFail|BackFaceStencilPass|BackFaceStencilFunc)\\b"
160
+ },
161
+ {
162
+ "name": "meta.object-literal.key.fx.rasterizerstate.hlsl",
163
+ "match": "\\b(FillMode|CullMode|FrontCounterClockwise|DepthBias|DepthBiasClamp|SlopeScaleDepthBias|ZClipEnable|ScissorEnable|MultiSampleEnable|AntiAliasedLineEnable)\\b"
164
+ },
165
+ {
166
+ "name": "meta.object-literal.key.fx.samplerstate.hlsl",
167
+ "match": "\\b(Filter|AddressU|AddressV|AddressW|MipLODBias|MaxAnisotropy|ComparisonFunc|BorderColor|MinLOD|MaxLOD)\\b"
168
+ },
169
+ {
170
+ "name": "support.constant.property-value.fx.blend.hlsl",
171
+ "match": "\\b(?i:ZERO|ONE|SRC_COLOR|INV_SRC_COLOR|SRC_ALPHA|INV_SRC_ALPHA|DEST_ALPHA|INV_DEST_ALPHA|DEST_COLOR|INV_DEST_COLOR|SRC_ALPHA_SAT|BLEND_FACTOR|INV_BLEND_FACTOR|SRC1_COLOR|INV_SRC1_COLOR|SRC1_ALPHA|INV_SRC1_ALPHA)\\b"
172
+ },
173
+ {
174
+ "name": "support.constant.property-value.fx.blendop.hlsl",
175
+ "match": "\\b(?i:ADD|SUBTRACT|REV_SUBTRACT|MIN|MAX)\\b"
176
+ },
177
+ {
178
+ "name": "support.constant.property-value.fx.depthwritemask.hlsl",
179
+ "match": "\\b(?i:ALL)\\b"
180
+ },
181
+ {
182
+ "name": "support.constant.property-value.fx.comparisonfunc.hlsl",
183
+ "match": "\\b(?i:NEVER|LESS|EQUAL|LESS_EQUAL|GREATER|NOT_EQUAL|GREATER_EQUAL|ALWAYS)\\b"
184
+ },
185
+ {
186
+ "name": "support.constant.property-value.fx.stencilop.hlsl",
187
+ "match": "\\b(?i:KEEP|REPLACE|INCR_SAT|DECR_SAT|INVERT|INCR|DECR)\\b"
188
+ },
189
+ {
190
+ "name": "support.constant.property-value.fx.fillmode.hlsl",
191
+ "match": "\\b(?i:WIREFRAME|SOLID)\\b"
192
+ },
193
+ {
194
+ "name": "support.constant.property-value.fx.cullmode.hlsl",
195
+ "match": "\\b(?i:NONE|FRONT|BACK)\\b"
196
+ },
197
+ {
198
+ "name": "support.constant.property-value.fx.filter.hlsl",
199
+ "match": "\\b(?i:MIN_MAG_MIP_POINT|MIN_MAG_POINT_MIP_LINEAR|MIN_POINT_MAG_LINEAR_MIP_POINT|MIN_POINT_MAG_MIP_LINEAR|MIN_LINEAR_MAG_MIP_POINT|MIN_LINEAR_MAG_POINT_MIP_LINEAR|MIN_MAG_LINEAR_MIP_POINT|MIN_MAG_MIP_LINEAR|ANISOTROPIC|COMPARISON_MIN_MAG_MIP_POINT|COMPARISON_MIN_MAG_POINT_MIP_LINEAR|COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT|COMPARISON_MIN_POINT_MAG_MIP_LINEAR|COMPARISON_MIN_LINEAR_MAG_MIP_POINT|COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR|COMPARISON_MIN_MAG_LINEAR_MIP_POINT|COMPARISON_MIN_MAG_MIP_LINEAR|COMPARISON_ANISOTROPIC|TEXT_1BIT)\\b"
200
+ },
201
+ {
202
+ "name": "support.constant.property-value.fx.textureaddressmode.hlsl",
203
+ "match": "\\b(?i:WRAP|MIRROR|CLAMP|BORDER|MIRROR_ONCE)\\b"
204
+ },
205
+ {
206
+ "name": "string.quoted.double.hlsl",
207
+ "begin": "\"",
208
+ "end": "\"",
209
+ "patterns": [
210
+ {
211
+ "name": "constant.character.escape.hlsl",
212
+ "match": "\\\\."
213
+ }
214
+ ]
215
+ }
216
+ ]
217
+ }
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import { registerExtension } from 'vscode/extensions';
2
+
3
+ var manifest = {name:"hlsl",displayName:"HLSL Language Basics",description:"Provides syntax highlighting and bracket matching in HLSL files.",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"*"},scripts:{"update-grammar":"node ../node_modules/vscode-grammar-updater/bin tgjones/shaders-tmLanguage grammars/hlsl.json ./syntaxes/hlsl.tmLanguage.json"},contributes:{languages:[{id:"hlsl",extensions:[".hlsl",".hlsli",".fx",".fxh",".vsh",".psh",".cginc",".compute"],aliases:["HLSL","hlsl"],configuration:"./language-configuration.json"}],grammars:[{language:"hlsl",path:"./syntaxes/hlsl.tmLanguage.json",scopeName:"source.hlsl"}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"},main:undefined};
4
+
5
+ const { registerFileUrl } = registerExtension(manifest);
6
+ registerFileUrl('./syntaxes/hlsl.tmLanguage.json', new URL('./hlsl.tmLanguage.json', import.meta.url).toString(), 'application/json');
7
+ registerFileUrl('./language-configuration.json', new URL('./language-configuration.json', import.meta.url).toString(), 'application/json');
@@ -0,0 +1,23 @@
1
+ {
2
+ "comments": {
3
+ "lineComment": "//",
4
+ "blockComment": [ "/*", "*/" ]
5
+ },
6
+ "brackets": [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"]
10
+ ],
11
+ "autoClosingPairs": [
12
+ ["{", "}"],
13
+ ["[", "]"],
14
+ ["(", ")"],
15
+ ["\"", "\""]
16
+ ],
17
+ "surroundingPairs": [
18
+ ["{", "}"],
19
+ ["[", "]"],
20
+ ["(", ")"],
21
+ ["\"", "\""]
22
+ ]
23
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-hlsl-default-extension",
3
+ "version": "1.81.8-next.1",
4
+ "keywords": [],
5
+ "author": {
6
+ "name": "CodinGame",
7
+ "url": "http://www.codingame.com"
8
+ },
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/CodinGame/monaco-vscode-api"
13
+ },
14
+ "type": "module",
15
+ "private": false,
16
+ "description": "Default VSCode extension designed to be used with @codingame/monaco-vscode-api",
17
+ "main": "index.js",
18
+ "module": "index.js",
19
+ "dependencies": {
20
+ "vscode": "npm:@codingame/monaco-vscode-api@1.81.8-next.1"
21
+ }
22
+ }