@hncode/hncode 0.7.8 → 0.8.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.
- package/package.json +1 -1
- package/src/agent.js +1405 -1400
- package/src/animate.js +371 -0
- package/src/clipboard.js +54 -5
- package/src/colors.js +15 -8
- package/src/composer.js +182 -0
- package/src/diff.js +186 -0
- package/src/format.js +275 -0
- package/src/highlight.js +670 -4
- package/src/markdown.js +567 -0
- package/src/panels.js +256 -0
- package/src/rows-plan-bg.js +83 -0
- package/src/rows-status.js +104 -0
- package/src/rows-tool-result.js +208 -0
- package/src/text.js +149 -0
- package/src/tool-line.js +193 -0
- package/src/tools/bash.js +19 -12
- package/src/tools/shell.js +28 -2
- package/src/tui.js +260 -2757
- package/src/web-public/app.css +7 -5
- package/src/web-public/app.js +7 -4
- package/src/web.js +2 -0
package/src/highlight.js
CHANGED
|
@@ -155,6 +155,21 @@ const PERL_KEYWORDS = [
|
|
|
155
155
|
'join', 'push', 'pop', 'shift', 'unshift', 'keys', 'values', 'exists', 'delete', 'defined', 'ref', 'bless',
|
|
156
156
|
];
|
|
157
157
|
|
|
158
|
+
const BATCH_KEYWORDS = [
|
|
159
|
+
'call', 'cd', 'chdir', 'cls', 'copy', 'del', 'dir', 'echo', 'endlocal', 'erase', 'exit', 'for', 'goto', 'if',
|
|
160
|
+
'md', 'mkdir', 'move', 'path', 'pause', 'popd', 'prompt', 'pushd', 'rd', 'ren', 'rename', 'rmdir', 'set',
|
|
161
|
+
'setlocal', 'shift', 'start', 'time', 'title', 'type', 'ver', 'verify', 'vol', 'else', 'exist', 'defined',
|
|
162
|
+
'errorlevel', 'not', 'do', 'in', 'equ', 'neq', 'lss', 'leq', 'gtr', 'geq', 'choice', 'find', 'findstr',
|
|
163
|
+
'sort', 'more', 'xcopy', 'robocopy', 'attrib', 'sc', 'net', 'reg', 'wmic', 'powershell', 'where', 'assoc',
|
|
164
|
+
'ftype', 'mklink', 'taskkill', 'tasklist', 'schtasks', 'certutil', 'icacls', 'takeown', 'runas',
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
const CMD_KEYWORDS = [
|
|
168
|
+
'echo', 'set', 'if', 'goto', 'call', 'for', 'do', 'exit', 'cd', 'chdir', 'md', 'mkdir', 'rd', 'rmdir',
|
|
169
|
+
'del', 'erase', 'copy', 'move', 'ren', 'rename', 'type', 'cls', 'pause', 'start', 'shift', 'setlocal',
|
|
170
|
+
'endlocal', 'defined', 'exist', 'errorlevel', 'not', 'equ', 'neq', 'lss', 'leq', 'gtr', 'geq',
|
|
171
|
+
];
|
|
172
|
+
|
|
158
173
|
const R_KEYWORDS = [
|
|
159
174
|
'if', 'else', 'repeat', 'while', 'function', 'for', 'in', 'next', 'break', 'TRUE', 'FALSE', 'NULL', 'Inf',
|
|
160
175
|
'NaN', 'NA', 'library', 'require',
|
|
@@ -167,6 +182,78 @@ const JULIA_KEYWORDS = [
|
|
|
167
182
|
];
|
|
168
183
|
const JULIA_LITERALS = ['true', 'false', 'nothing', 'missing'];
|
|
169
184
|
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
// FAMILY KEYWORD SETS
|
|
187
|
+
// ---------------------------------------------------------------------------
|
|
188
|
+
// A listing is readable because of five things every language has — strings, comments, numbers, keywords, calls.
|
|
189
|
+
// Those are what the scanner finds, and what differs between languages is mainly the WORD LIST. Sharing one list
|
|
190
|
+
// across a family is what keeps this file a highlighter rather than two hundred parsers.
|
|
191
|
+
|
|
192
|
+
const LISP_LIKE = ['defun', 'defmacro', 'defvar', 'defparameter', 'lambda', 'let', 'let*', 'if', 'cond', 'when',
|
|
193
|
+
'unless', 'progn', 'setq', 'setf', 'loop', 'do', 'dolist', 'dotimes', 'car', 'cdr', 'cons', 'list', 'quote',
|
|
194
|
+
'function', 'return', 'nil', 't', 'and', 'or', 'not'];
|
|
195
|
+
|
|
196
|
+
const ML_LIKE = ['let', 'letrec', 'in', 'fun', 'function', 'match', 'with', 'type', 'module', 'struct', 'sig',
|
|
197
|
+
'open', 'include', 'if', 'then', 'else', 'begin', 'end', 'and', 'rec', 'mutable', 'val', 'exception', 'raise',
|
|
198
|
+
'try', 'with', 'as', 'of', 'when', 'new', 'inherit', 'object', 'method', 'class', 'interface', 'namespace'];
|
|
199
|
+
|
|
200
|
+
const BASIC_LIKE = ['dim', 'as', 'sub', 'end', 'function', 'if', 'then', 'else', 'elseif', 'for', 'to', 'step',
|
|
201
|
+
'next', 'while', 'wend', 'do', 'loop', 'until', 'select', 'case', 'each', 'in', 'exit', 'return', 'call', 'set',
|
|
202
|
+
'let', 'const', 'on', 'error', 'goto', 'print', 'input'];
|
|
203
|
+
|
|
204
|
+
const PASCAL_LIKE = ['program', 'unit', 'uses', 'interface', 'implementation', 'begin', 'end', 'var', 'const',
|
|
205
|
+
'type', 'procedure', 'function', 'if', 'then', 'else', 'while', 'do', 'for', 'to', 'downto', 'repeat', 'until',
|
|
206
|
+
'case', 'of', 'record', 'class', 'object', 'array', 'string', 'integer', 'boolean', 'real', 'nil', 'with'];
|
|
207
|
+
|
|
208
|
+
const PROLOG_LIKE = ['is', 'not', 'fail', 'true', 'repeat', 'once', 'assert', 'asserta', 'assertz', 'retract',
|
|
209
|
+
'consult', 'findall', 'bagof', 'setof', 'cut', 'module', 'use_module', 'dynamic', 'discontiguous'];
|
|
210
|
+
|
|
211
|
+
const HDL_LIKE = ['module', 'endmodule', 'input', 'output', 'inout', 'wire', 'reg', 'always', 'initial',
|
|
212
|
+
'begin', 'end', 'if', 'else', 'case', 'endcase', 'for', 'while', 'assign', 'parameter', 'localparam',
|
|
213
|
+
'posedge', 'negedge', 'generate', 'endgenerate', 'function', 'endfunction', 'task', 'endtask'];
|
|
214
|
+
|
|
215
|
+
const SHADER_LIKE = ['void', 'float', 'int', 'uint', 'bool', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4',
|
|
216
|
+
'sampler2D', 'samplerCube', 'uniform', 'varying', 'attribute', 'in', 'out', 'inout', 'const', 'struct', 'if',
|
|
217
|
+
'else', 'for', 'while', 'do', 'return', 'break', 'continue', 'discard', 'precision', 'highp', 'mediump',
|
|
218
|
+
'lowp', 'layout', 'location', 'main'];
|
|
219
|
+
|
|
220
|
+
const ASSEMBLY_LIKE = ['mov', 'add', 'sub', 'mul', 'div', 'push', 'pop', 'call', 'ret', 'jmp', 'je', 'jne', 'jz',
|
|
221
|
+
'jnz', 'cmp', 'test', 'lea', 'and', 'or', 'xor', 'not', 'shl', 'shr', 'inc', 'dec', 'nop', 'int', 'syscall',
|
|
222
|
+
'section', 'global', 'extern', 'db', 'dw', 'dd', 'dq'];
|
|
223
|
+
|
|
224
|
+
const HARDWARE_DESC = ['module', 'input', 'output', 'wire', 'reg', 'always', 'assign', 'case', 'endcase',
|
|
225
|
+
'begin', 'end', 'if', 'else', 'posedge', 'negedge', 'initial', 'parameter'];
|
|
226
|
+
|
|
227
|
+
const MARKUP_LIKE = ['html', 'head', 'body', 'div', 'span', 'a', 'p', 'ul', 'ol', 'li', 'table', 'tr', 'td',
|
|
228
|
+
'th', 'form', 'input', 'button', 'script', 'style', 'link', 'meta', 'title', 'section', 'header', 'footer'];
|
|
229
|
+
|
|
230
|
+
const CONFIG_LIKE = ['true', 'false', 'yes', 'no', 'on', 'off', 'null', 'none', 'default'];
|
|
231
|
+
|
|
232
|
+
const TEMPLATE_LIKE = ['if', 'else', 'elseif', 'endif', 'for', 'endfor', 'foreach', 'endforeach', 'while',
|
|
233
|
+
'endwhile', 'block', 'endblock', 'include', 'extends', 'import', 'from', 'macro', 'endmacro', 'set', 'let',
|
|
234
|
+
'filter', 'endfilter', 'with', 'endwith', 'raw', 'endraw', 'embed', 'endembed', 'use', 'apply'];
|
|
235
|
+
|
|
236
|
+
const DB_LIKE = ['select', 'from', 'where', 'insert', 'into', 'values', 'update', 'set', 'delete', 'create',
|
|
237
|
+
'table', 'index', 'view', 'drop', 'alter', 'join', 'inner', 'left', 'right', 'outer', 'on', 'as', 'and', 'or',
|
|
238
|
+
'not', 'null', 'is', 'in', 'exists', 'between', 'like', 'distinct', 'union', 'all', 'case', 'when', 'then',
|
|
239
|
+
'else', 'end', 'primary', 'key', 'foreign', 'references', 'default', 'cascade', 'begin', 'commit', 'rollback'];
|
|
240
|
+
|
|
241
|
+
const STATS_LIKE = ['if', 'else', 'for', 'while', 'repeat', 'function', 'return', 'in', 'next', 'break', 'library',
|
|
242
|
+
'require', 'import', 'true', 'false', 'null'];
|
|
243
|
+
|
|
244
|
+
const OO_SCRIPT = ['class', 'interface', 'extends', 'implements', 'public', 'private', 'protected', 'static',
|
|
245
|
+
'final', 'abstract', 'new', 'return', 'if', 'else', 'for', 'foreach', 'while', 'do', 'switch', 'case', 'break',
|
|
246
|
+
'continue', 'try', 'catch', 'finally', 'throw', 'throws', 'import', 'package', 'function', 'var', 'let',
|
|
247
|
+
'const', 'this', 'super', 'null', 'true', 'false'];
|
|
248
|
+
|
|
249
|
+
const SCRIPTING_GENERIC = ['function', 'return', 'if', 'else', 'elseif', 'endif', 'for', 'foreach', 'while',
|
|
250
|
+
'do', 'switch', 'case', 'break', 'continue', 'try', 'catch', 'finally', 'throw', 'new', 'class', 'extends',
|
|
251
|
+
'var', 'let', 'const', 'local', 'global', 'in', 'of', 'and', 'or', 'not', 'null', 'true', 'false', 'end'];
|
|
252
|
+
|
|
253
|
+
const SYSTEMS_GENERIC = ['const', 'var', 'let', 'fn', 'function', 'proc', 'func', 'if', 'else', 'while', 'for',
|
|
254
|
+
'return', 'break', 'continue', 'struct', 'type', 'enum', 'union', 'import', 'use', 'module', 'export', 'public',
|
|
255
|
+
'private', 'static', 'inline', 'extern', 'true', 'false', 'null', 'nil'];
|
|
256
|
+
|
|
170
257
|
/**
|
|
171
258
|
* Extensions to a language entry.
|
|
172
259
|
*
|
|
@@ -231,6 +318,265 @@ const LANGS = {
|
|
|
231
318
|
terraform: { line: '#', block: ['/*', '*/'], quotes: '"', words: ['resource', 'data', 'variable', 'output', 'module', 'provider', 'locals', 'terraform', 'for_each', 'count', 'depends_on', 'lifecycle', 'dynamic', 'provisioner', 'true', 'false', 'null'], literals: [] },
|
|
232
319
|
diff: { line: '', block: null, quotes: '', words: [], literals: [] },
|
|
233
320
|
/** No highlighting: a language we do not know, or plain prose. */
|
|
321
|
+
// `.bat` / `.cmd`. Comments are `rem` and `::`, and both are LINE comments with no block form. `upper` is not set:
|
|
322
|
+
// cmd.exe is case-insensitive but real scripts are written in lower case, and upper-casing the word list would
|
|
323
|
+
// match only the shouting variants.
|
|
324
|
+
batch: { line: 'rem', lineWord: true, block: null, quotes: '"', words: BATCH_KEYWORDS, literals: ['errorlevel', 'exist'] },
|
|
325
|
+
cmd: { line: 'rem', lineWord: true, block: null, quotes: '"', words: CMD_KEYWORDS, literals: ['errorlevel', 'exist'] },
|
|
326
|
+
racket: { line: '#', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
327
|
+
'emacs-lisp': { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
328
|
+
commonlisp: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
329
|
+
fennel: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
330
|
+
janet: { line: '#', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
331
|
+
crystal: { line: '#', block: null, quotes: '"', words: RUBY_KEYWORDS, literals: [] },
|
|
332
|
+
nim: { line: '#', block: null, quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
333
|
+
reasonml: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
334
|
+
rescript: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
335
|
+
elm: { line: '--', block: ['{-', '-}'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
336
|
+
purescript: { line: '--', block: ['{-', '-}'], quotes: '"', words: HASKELL_KEYWORDS, literals: [] },
|
|
337
|
+
idris: { line: '--', block: ['{-', '-}'], quotes: '"', words: HASKELL_KEYWORDS, literals: [] },
|
|
338
|
+
agda: { line: '--', block: ['{-', '-}'], quotes: '"', words: HASKELL_KEYWORDS, literals: [] },
|
|
339
|
+
lean: { line: '--', block: ['{-', '-}'], quotes: '"', words: HASKELL_KEYWORDS, literals: [] },
|
|
340
|
+
coq: { line: '%', block: null, quotes: '"', words: ML_LIKE, literals: [] },
|
|
341
|
+
isabelle: { line: '%', block: null, quotes: '"', words: ML_LIKE, literals: [] },
|
|
342
|
+
standardml: { line: '%', block: null, quotes: '"', words: ML_LIKE, literals: [] },
|
|
343
|
+
livescript: { line: '#', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
344
|
+
clojurescript: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
345
|
+
guile: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
346
|
+
chicken: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
347
|
+
objectivec: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
348
|
+
cuda: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
349
|
+
opencl: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
350
|
+
metal: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
351
|
+
hlsl: { line: '//', block: ['/*', '*/'], quotes: '"', words: SHADER_LIKE, literals: [] },
|
|
352
|
+
glsl: { line: '//', block: ['/*', '*/'], quotes: '"', words: SHADER_LIKE, literals: [] },
|
|
353
|
+
wgsl: { line: '//', block: ['/*', '*/'], quotes: '"', words: SHADER_LIKE, literals: [] },
|
|
354
|
+
assembly: { line: ';', block: null, quotes: '"', words: ASSEMBLY_LIKE, literals: [] },
|
|
355
|
+
llvm: { line: ';', block: null, quotes: '"', words: ASSEMBLY_LIKE, literals: [] },
|
|
356
|
+
webassembly: { line: ';', block: null, quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
357
|
+
ada: { line: '--', block: ['{-', '-}'], quotes: '"', words: PASCAL_LIKE, literals: [] },
|
|
358
|
+
pascal: { line: ';', block: null, quotes: '"', words: PASCAL_LIKE, literals: [] },
|
|
359
|
+
delphi: { line: ';', block: null, quotes: '"', words: PASCAL_LIKE, literals: [] },
|
|
360
|
+
freebasic: { line: ';', block: null, quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
361
|
+
vbnet: { line: ';', block: null, quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
362
|
+
vba: { line: ';', block: null, quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
363
|
+
fortran: { line: '!', block: null, quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
364
|
+
cobol: { line: ';', block: null, quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
365
|
+
modula2: { line: '%', block: null, quotes: '"', words: PASCAL_LIKE, literals: [] },
|
|
366
|
+
oberon: { line: '%', block: null, quotes: '"', words: PASCAL_LIKE, literals: [] },
|
|
367
|
+
dlang: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
368
|
+
vala: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
369
|
+
haxe: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
370
|
+
pony: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
371
|
+
odin: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
372
|
+
vlang: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
373
|
+
jai: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
374
|
+
chapel: { line: '#', block: null, quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
375
|
+
dafny: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
376
|
+
fstar: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
377
|
+
koka: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
378
|
+
ats: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
379
|
+
groovy: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
380
|
+
gradle: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
381
|
+
beanshell: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
382
|
+
ceylon: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
383
|
+
fantom: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
384
|
+
xtend: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
385
|
+
aspectj: { line: '//', block: ['/*', '*/'], quotes: '"', words: JAVA_LIKE, literals: [] },
|
|
386
|
+
processing: { line: '//', block: ['/*', '*/'], quotes: '"', words: JAVA_LIKE, literals: [] },
|
|
387
|
+
arduino: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
388
|
+
fsharpscript: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
389
|
+
csharpscript: { line: '//', block: ['/*', '*/'], quotes: '"', words: CS_KEYWORDS, literals: [] },
|
|
390
|
+
nushell: { line: '#', block: null, quotes: '"', words: SHELL_KEYWORDS, literals: [] },
|
|
391
|
+
elvish: { line: '#', block: null, quotes: '"', words: SHELL_KEYWORDS, literals: [] },
|
|
392
|
+
xonsh: { line: '#', block: null, quotes: '"', words: PY_KEYWORDS, literals: [] },
|
|
393
|
+
oil: { line: '#', block: null, quotes: '"', words: SHELL_KEYWORDS, literals: [] },
|
|
394
|
+
tcl: { line: '#', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
395
|
+
expect: { line: '#', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
396
|
+
awk: { line: '#', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
397
|
+
sed: { line: '#', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
398
|
+
raku: { line: '#', block: null, quotes: '"', words: PERL_KEYWORDS, literals: [] },
|
|
399
|
+
prolog: { line: '%', block: null, quotes: '"', words: PROLOG_LIKE, literals: [] },
|
|
400
|
+
mercury: { line: '%', block: null, quotes: '"', words: PROLOG_LIKE, literals: [] },
|
|
401
|
+
datalog: { line: '%', block: null, quotes: '"', words: PROLOG_LIKE, literals: [] },
|
|
402
|
+
gleam: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
403
|
+
moon: { line: '--', block: ['{-', '-}'], quotes: '"', words: LUA_KEYWORDS, literals: [] },
|
|
404
|
+
teal: { line: '--', block: ['{-', '-}'], quotes: '"', words: LUA_KEYWORDS, literals: [] },
|
|
405
|
+
squirrel: { line: '//', block: ['/*', '*/'], quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
406
|
+
sourcepawn: { line: '//', block: ['/*', '*/'], quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
407
|
+
papyrus: { line: ';', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
408
|
+
gdscript: { line: '#', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
409
|
+
autohotkey: { line: ';', block: null, quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
410
|
+
autoit: { line: ';', block: null, quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
411
|
+
wren: { line: '//', block: ['/*', '*/'], quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
412
|
+
rebol: { line: ';', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
413
|
+
ring: { line: ';', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
414
|
+
svelte: { line: '//', block: ['<!--', '-->'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
415
|
+
astro: { line: '//', block: ['<!--', '-->'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
416
|
+
twig: { line: '//', block: ['{#', '#}'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
417
|
+
liquid: { line: '//', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
418
|
+
handlebars: { line: '//', block: ['{{!', '}}'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
419
|
+
mustache: { line: '//', block: ['{{!', '}}'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
420
|
+
ejs: { line: '//', block: ['<%#', '%>'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
421
|
+
pug: { line: '//', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
422
|
+
haml: { line: '-#', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
423
|
+
slim: { line: '/', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
424
|
+
jinja: { line: '{#', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
425
|
+
erb: { line: '<%#', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
426
|
+
razor: { line: '@*', block: ['@*', '*@'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
427
|
+
blade: { line: '{{--', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
428
|
+
smarty: { line: '{*', block: ['{*', '*}'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
429
|
+
velocity: { line: '##', block: ['#*', '*#'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
430
|
+
freemarker: { line: '<#--', block: ['<#--', '-->'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
431
|
+
xaml: { line: '//', block: ['<!--', '-->'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
432
|
+
xslt: { line: '//', block: ['<!--', '-->'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
433
|
+
htmx: { line: '//', block: ['<!--', '-->'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
434
|
+
coldfusion: { line: '//', block: ['<!---', '--->'], quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
435
|
+
markdownextra: { line: '#', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
436
|
+
asciidoc: { line: '#', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
437
|
+
restructuredtext: { line: '#', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
438
|
+
textile: { line: '#', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
439
|
+
org: { line: '#', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
440
|
+
latex: { line: '%', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
441
|
+
bibtex: { line: '%', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
442
|
+
troff: { line: '%', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
443
|
+
typst: { line: '//', block: ['/*', '*/'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
444
|
+
json5: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
445
|
+
jsonl: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
446
|
+
hjson: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
447
|
+
properties: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
448
|
+
dotenv: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
449
|
+
gitconfig: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
450
|
+
apacheconf: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
451
|
+
systemdunit: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
452
|
+
kconfig: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
453
|
+
cmake: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
454
|
+
meson: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
455
|
+
ninja: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
456
|
+
bazel: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
457
|
+
starlark: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
458
|
+
gn: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
459
|
+
reg: { line: ';', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
460
|
+
desktopentry: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
461
|
+
plist: { line: '//', block: ['<!--', '-->'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
462
|
+
csv: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
463
|
+
pem: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
464
|
+
logfile: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
465
|
+
psql: { line: '--', block: ['{-', '-}'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
466
|
+
mysql: { line: '#', block: null, quotes: '"', words: DB_LIKE, literals: [] },
|
|
467
|
+
sqlite: { line: '--', block: ['{-', '-}'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
468
|
+
plpgsql: { line: '--', block: ['{-', '-}'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
469
|
+
tsql: { line: '--', block: ['{-', '-}'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
470
|
+
plsql: { line: '--', block: ['{-', '-}'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
471
|
+
hive: { line: '--', block: ['{-', '-}'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
472
|
+
bigquery: { line: '#', block: null, quotes: '"', words: DB_LIKE, literals: [] },
|
|
473
|
+
cypher: { line: '//', block: ['/*', '*/'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
474
|
+
prisma: { line: '//', block: ['/*', '*/'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
475
|
+
cassandra: { line: '--', block: ['{-', '-}'], quotes: '"', words: DB_LIKE, literals: [] },
|
|
476
|
+
dockercompose: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
477
|
+
helm: { line: '#', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
478
|
+
kustomize: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
479
|
+
ansible: { line: '#', block: null, quotes: '"', words: TEMPLATE_LIKE, literals: [] },
|
|
480
|
+
terragrunt: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
481
|
+
packer: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
482
|
+
pulumi: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
483
|
+
nix: { line: '#', block: null, quotes: '"', words: ML_LIKE, literals: [] },
|
|
484
|
+
guix: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
485
|
+
bicep: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
486
|
+
puppet: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
487
|
+
salt: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
488
|
+
prometheus: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
489
|
+
openapi: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
490
|
+
postman: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
491
|
+
insomnia: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
492
|
+
har: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
493
|
+
iptables: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
494
|
+
nftables: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
495
|
+
crontab: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
496
|
+
fstab: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
497
|
+
hosts: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
498
|
+
sshconfig: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
499
|
+
protobuftext: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
500
|
+
flatbuffers: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
501
|
+
capnp: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
502
|
+
thrift: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
503
|
+
avro: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
504
|
+
asn1: { line: '--', block: ['{-', '-}'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
505
|
+
wsdl: { line: '//', block: ['<!--', '-->'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
506
|
+
idl: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
507
|
+
smithy: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
508
|
+
jsonnet: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
509
|
+
cue: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
510
|
+
dhall: { line: '--', block: ['{-', '-}'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
511
|
+
nickel: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
512
|
+
ron: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
513
|
+
kdl: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
514
|
+
algol: { line: ';', block: null, quotes: '"', words: PASCAL_LIKE, literals: [] },
|
|
515
|
+
simula: { line: '!', block: null, quotes: '"', words: PASCAL_LIKE, literals: [] },
|
|
516
|
+
smalltalk: { line: '#', block: null, quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
517
|
+
squeak: { line: '#', block: null, quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
518
|
+
self: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
519
|
+
logo: { line: ';', block: null, quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
520
|
+
scratch: { line: '//', block: ['/*', '*/'], quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
521
|
+
snap: { line: '//', block: ['/*', '*/'], quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
522
|
+
applescript: { line: '--', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
523
|
+
actionscript: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
524
|
+
lingo: { line: '--', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
525
|
+
lasso: { line: '#', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
526
|
+
amped: { line: ';', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
527
|
+
raptor: { line: ';', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
528
|
+
harbour: { line: '//', block: ['/*', '*/'], quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
529
|
+
xbase: { line: '//', block: ['/*', '*/'], quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
530
|
+
clipper: { line: '//', block: ['/*', '*/'], quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
531
|
+
foxpro: { line: '//', block: ['/*', '*/'], quotes: '"', words: BASIC_LIKE, literals: [] },
|
|
532
|
+
luaplus: { line: '--', block: null, quotes: '"', words: LUA_KEYWORDS, literals: [] },
|
|
533
|
+
terra: { line: '//', block: ['/*', '*/'], quotes: '"', words: LUA_KEYWORDS, literals: [] },
|
|
534
|
+
nelua: { line: '#', block: null, quotes: '"', words: LUA_KEYWORDS, literals: [] },
|
|
535
|
+
moonscript: { line: '--', block: null, quotes: '"', words: LUA_KEYWORDS, literals: [] },
|
|
536
|
+
carp: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
537
|
+
shen: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
538
|
+
'pico-lisp': { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
539
|
+
newlisp: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
540
|
+
picolisp: { line: ';', block: null, quotes: '"', words: LISP_LIKE, literals: [] },
|
|
541
|
+
txl: { line: '%', block: null, quotes: '"', words: ML_LIKE, literals: [] },
|
|
542
|
+
' curry': { line: '//', block: ['/*', '*/'], quotes: '"', words: HASKELL_KEYWORDS, literals: [] },
|
|
543
|
+
unison: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
544
|
+
ballerina: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
545
|
+
grain: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
546
|
+
flix: { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
547
|
+
roc: { line: '#', block: null, quotes: '"', words: ML_LIKE, literals: [] },
|
|
548
|
+
'unison-lang': { line: '//', block: ['/*', '*/'], quotes: '"', words: ML_LIKE, literals: [] },
|
|
549
|
+
sway: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
550
|
+
carbon: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
551
|
+
vale: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
552
|
+
mojo: { line: '#', block: null, quotes: '"', words: PY_KEYWORDS, literals: [] },
|
|
553
|
+
mint: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
554
|
+
krystal: { line: '#', block: null, quotes: '"', words: RUBY_KEYWORDS, literals: [] },
|
|
555
|
+
myst: { line: '//', block: ['/*', '*/'], quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
556
|
+
bosque: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
557
|
+
bex: { line: '//', block: ['/*', '*/'], quotes: '"', words: SYSTEMS_GENERIC, literals: [] },
|
|
558
|
+
lean4: { line: '--', block: null, quotes: '"', words: HASKELL_KEYWORDS, literals: [] },
|
|
559
|
+
redscript: { line: ';', block: null, quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
560
|
+
angelscript: { line: '//', block: ['/*', '*/'], quotes: '"', words: SCRIPTING_GENERIC, literals: [] },
|
|
561
|
+
unrealscript: { line: '//', block: ['/*', '*/'], quotes: '"', words: OO_SCRIPT, literals: [] },
|
|
562
|
+
'hlsl-fx': { line: '//', block: ['/*', '*/'], quotes: '"', words: SHADER_LIKE, literals: [] },
|
|
563
|
+
'pixel-bender': { line: '//', block: ['/*', '*/'], quotes: '"', words: SHADER_LIKE, literals: [] },
|
|
564
|
+
'cuda-hip': { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
565
|
+
sycl: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
566
|
+
ispc: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
567
|
+
halide: { line: '//', block: ['/*', '*/'], quotes: '"', words: C_LIKE, literals: [] },
|
|
568
|
+
slang: { line: '//', block: ['/*', '*/'], quotes: '"', words: SHADER_LIKE, literals: [] },
|
|
569
|
+
naga: { line: '//', block: ['/*', '*/'], quotes: '"', words: SHADER_LIKE, literals: [] },
|
|
570
|
+
jsonata: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
571
|
+
jq: { line: '#', block: null, quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
572
|
+
xpath: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
573
|
+
xsd: { line: '//', block: ['<!--', '-->'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
574
|
+
dtd: { line: '//', block: ['<!--', '-->'], quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
575
|
+
sdl: { line: '//', block: ['/*', '*/'], quotes: '"', words: CONFIG_LIKE, literals: [] },
|
|
576
|
+
plantuml: { line: '//', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
577
|
+
mermaid: { line: '%%', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
578
|
+
graphviz: { line: '//', block: null, quotes: '"', words: MARKUP_LIKE, literals: [] },
|
|
579
|
+
dbml: { line: '//', block: null, quotes: '"', words: DB_LIKE, literals: [] },
|
|
234
580
|
text: { line: '', block: null, quotes: '', words: [], literals: [] },
|
|
235
581
|
};
|
|
236
582
|
|
|
@@ -247,7 +593,8 @@ const BY_EXT = {
|
|
|
247
593
|
ex: 'elixir', exs: 'elixir', erl: 'erlang', hrl: 'erlang',
|
|
248
594
|
hs: 'haskell', lhs: 'haskell', ml: 'ocaml', mli: 'ocaml', clj: 'clojure', cljs: 'clojure',
|
|
249
595
|
el: 'lisp', lisp: 'lisp', scm: 'scheme', ss: 'scheme',
|
|
250
|
-
sh: 'shell', bash: 'shell', zsh: 'shell', fish: 'shell', ps1: 'powershell', psm1: 'powershell',
|
|
596
|
+
sh: 'shell', bash: 'shell', zsh: 'shell', fish: 'shell', ps1: 'powershell', psm1: 'powershell', psd1: 'powershell',
|
|
597
|
+
bat: 'batch', cmd: 'batch', btm: 'batch',
|
|
251
598
|
sql: 'sql', json: 'json', jsonc: 'json', yml: 'yaml', yaml: 'yaml', toml: 'toml', ini: 'ini', cfg: 'ini', conf: 'nginx',
|
|
252
599
|
css: 'css', scss: 'scss', sass: 'scss', less: 'scss',
|
|
253
600
|
html: 'html', htm: 'html', xml: 'xml', svg: 'xml', vue: 'html',
|
|
@@ -255,6 +602,315 @@ const BY_EXT = {
|
|
|
255
602
|
r: 'r', jl: 'julia', m: 'matlab',
|
|
256
603
|
v: 'verilog', sv: 'verilog', vhd: 'vhdl', vhdl: 'vhdl',
|
|
257
604
|
proto: 'protobuf', graphql: 'graphql', gql: 'graphql', tf: 'terraform',
|
|
605
|
+
rkt: 'racket',
|
|
606
|
+
el: 'emacs-lisp',
|
|
607
|
+
lsp: 'commonlisp',
|
|
608
|
+
fnl: 'fennel',
|
|
609
|
+
janet: 'janet',
|
|
610
|
+
cr: 'crystal',
|
|
611
|
+
nim: 'nim',
|
|
612
|
+
nims: 'nim',
|
|
613
|
+
re: 'reasonml',
|
|
614
|
+
rei: 'reasonml',
|
|
615
|
+
res: 'rescript',
|
|
616
|
+
resi: 'rescript',
|
|
617
|
+
elm: 'elm',
|
|
618
|
+
purs: 'purescript',
|
|
619
|
+
idr: 'idris',
|
|
620
|
+
agda: 'agda',
|
|
621
|
+
lean: 'lean',
|
|
622
|
+
v: 'coq',
|
|
623
|
+
thy: 'isabelle',
|
|
624
|
+
sml: 'standardml',
|
|
625
|
+
ls: 'livescript',
|
|
626
|
+
cljc: 'clojurescript',
|
|
627
|
+
scm4: 'guile',
|
|
628
|
+
scm5: 'chicken',
|
|
629
|
+
mm: 'objectivec',
|
|
630
|
+
cu: 'cuda',
|
|
631
|
+
cuh: 'cuda',
|
|
632
|
+
cl: 'opencl',
|
|
633
|
+
metal: 'metal',
|
|
634
|
+
hlsl: 'hlsl',
|
|
635
|
+
glsl: 'glsl',
|
|
636
|
+
vert: 'glsl',
|
|
637
|
+
frag: 'glsl',
|
|
638
|
+
geom: 'glsl',
|
|
639
|
+
tesc: 'glsl',
|
|
640
|
+
tese: 'glsl',
|
|
641
|
+
wgsl: 'wgsl',
|
|
642
|
+
asm: 'assembly',
|
|
643
|
+
nasm: 'assembly',
|
|
644
|
+
ll: 'llvm',
|
|
645
|
+
wat: 'webassembly',
|
|
646
|
+
wast: 'webassembly',
|
|
647
|
+
adb: 'ada',
|
|
648
|
+
ads: 'ada',
|
|
649
|
+
pas: 'pascal',
|
|
650
|
+
pp: 'pascal',
|
|
651
|
+
dpr: 'delphi',
|
|
652
|
+
bas: 'freebasic',
|
|
653
|
+
bi: 'freebasic',
|
|
654
|
+
vb: 'vbnet',
|
|
655
|
+
vba: 'vba',
|
|
656
|
+
f90: 'fortran',
|
|
657
|
+
f95: 'fortran',
|
|
658
|
+
f03: 'fortran',
|
|
659
|
+
f08: 'fortran',
|
|
660
|
+
cob: 'cobol',
|
|
661
|
+
cbl: 'cobol',
|
|
662
|
+
mod: 'modula2',
|
|
663
|
+
ob2: 'oberon',
|
|
664
|
+
di: 'dlang',
|
|
665
|
+
vala: 'vala',
|
|
666
|
+
hx: 'haxe',
|
|
667
|
+
pony: 'pony',
|
|
668
|
+
odin: 'odin',
|
|
669
|
+
v2: 'vlang',
|
|
670
|
+
vv: 'vlang',
|
|
671
|
+
jai: 'jai',
|
|
672
|
+
chpl: 'chapel',
|
|
673
|
+
dfy: 'dafny',
|
|
674
|
+
fst: 'fstar',
|
|
675
|
+
kk: 'koka',
|
|
676
|
+
dats: 'ats',
|
|
677
|
+
groovy: 'groovy',
|
|
678
|
+
gvy: 'groovy',
|
|
679
|
+
gradle: 'gradle',
|
|
680
|
+
bsh: 'beanshell',
|
|
681
|
+
ceylon: 'ceylon',
|
|
682
|
+
fan: 'fantom',
|
|
683
|
+
xtend: 'xtend',
|
|
684
|
+
aj: 'aspectj',
|
|
685
|
+
pde: 'processing',
|
|
686
|
+
ino: 'arduino',
|
|
687
|
+
fsx: 'fsharpscript',
|
|
688
|
+
csx: 'csharpscript',
|
|
689
|
+
nu: 'nushell',
|
|
690
|
+
elv: 'elvish',
|
|
691
|
+
xsh: 'xonsh',
|
|
692
|
+
osh: 'oil',
|
|
693
|
+
tcl: 'tcl',
|
|
694
|
+
tk: 'tcl',
|
|
695
|
+
exp: 'expect',
|
|
696
|
+
awk: 'awk',
|
|
697
|
+
sed: 'sed',
|
|
698
|
+
raku: 'raku',
|
|
699
|
+
p6: 'raku',
|
|
700
|
+
pm6: 'raku',
|
|
701
|
+
pro: 'prolog',
|
|
702
|
+
prolog: 'prolog',
|
|
703
|
+
m2: 'mercury',
|
|
704
|
+
dl: 'datalog',
|
|
705
|
+
gleam: 'gleam',
|
|
706
|
+
moon: 'moon',
|
|
707
|
+
tl: 'teal',
|
|
708
|
+
nut: 'squirrel',
|
|
709
|
+
sp: 'sourcepawn',
|
|
710
|
+
psc: 'papyrus',
|
|
711
|
+
gd: 'gdscript',
|
|
712
|
+
ahk: 'autohotkey',
|
|
713
|
+
au3: 'autoit',
|
|
714
|
+
wren: 'wren',
|
|
715
|
+
reb: 'rebol',
|
|
716
|
+
ring: 'ring',
|
|
717
|
+
svelte: 'svelte',
|
|
718
|
+
astro: 'astro',
|
|
719
|
+
twig: 'twig',
|
|
720
|
+
liquid: 'liquid',
|
|
721
|
+
hbs: 'handlebars',
|
|
722
|
+
handlebars: 'handlebars',
|
|
723
|
+
mustache: 'mustache',
|
|
724
|
+
ejs: 'ejs',
|
|
725
|
+
pug: 'pug',
|
|
726
|
+
jade: 'pug',
|
|
727
|
+
haml: 'haml',
|
|
728
|
+
slim: 'slim',
|
|
729
|
+
jinja: 'jinja',
|
|
730
|
+
jinja2: 'jinja',
|
|
731
|
+
j2: 'jinja',
|
|
732
|
+
erb: 'erb',
|
|
733
|
+
cshtml: 'razor',
|
|
734
|
+
razor: 'razor',
|
|
735
|
+
blade: 'blade',
|
|
736
|
+
tpl: 'smarty',
|
|
737
|
+
vm: 'velocity',
|
|
738
|
+
ftl: 'freemarker',
|
|
739
|
+
xaml: 'xaml',
|
|
740
|
+
xsl: 'xslt',
|
|
741
|
+
xslt: 'xslt',
|
|
742
|
+
htmx: 'htmx',
|
|
743
|
+
cfm: 'coldfusion',
|
|
744
|
+
cfc: 'coldfusion',
|
|
745
|
+
mkd: 'markdownextra',
|
|
746
|
+
mdown: 'markdownextra',
|
|
747
|
+
adoc: 'asciidoc',
|
|
748
|
+
asciidoc: 'asciidoc',
|
|
749
|
+
rst: 'restructuredtext',
|
|
750
|
+
textile: 'textile',
|
|
751
|
+
org: 'org',
|
|
752
|
+
tex: 'latex',
|
|
753
|
+
sty: 'latex',
|
|
754
|
+
cls: 'latex',
|
|
755
|
+
bib: 'bibtex',
|
|
756
|
+
roff: 'troff',
|
|
757
|
+
troff: 'troff',
|
|
758
|
+
typ: 'typst',
|
|
759
|
+
json5: 'json5',
|
|
760
|
+
jsonl: 'jsonl',
|
|
761
|
+
ndjson: 'jsonl',
|
|
762
|
+
hjson: 'hjson',
|
|
763
|
+
properties: 'properties',
|
|
764
|
+
env: 'dotenv',
|
|
765
|
+
gitconfig: 'gitconfig',
|
|
766
|
+
htaccess: 'apacheconf',
|
|
767
|
+
service: 'systemdunit',
|
|
768
|
+
socket: 'systemdunit',
|
|
769
|
+
timer: 'systemdunit',
|
|
770
|
+
kconfig: 'kconfig',
|
|
771
|
+
cmake: 'cmake',
|
|
772
|
+
meson: 'meson',
|
|
773
|
+
ninja: 'ninja',
|
|
774
|
+
bzl: 'bazel',
|
|
775
|
+
bazel: 'bazel',
|
|
776
|
+
star: 'starlark',
|
|
777
|
+
gni: 'gn',
|
|
778
|
+
reg: 'reg',
|
|
779
|
+
desktop: 'desktopentry',
|
|
780
|
+
plist: 'plist',
|
|
781
|
+
csv: 'csv',
|
|
782
|
+
tsv: 'csv',
|
|
783
|
+
pem: 'pem',
|
|
784
|
+
crt: 'pem',
|
|
785
|
+
cer: 'pem',
|
|
786
|
+
log: 'logfile',
|
|
787
|
+
psql: 'psql',
|
|
788
|
+
mysql: 'mysql',
|
|
789
|
+
sqlite: 'sqlite',
|
|
790
|
+
plpgsql: 'plpgsql',
|
|
791
|
+
pgsql: 'plpgsql',
|
|
792
|
+
tsql: 'tsql',
|
|
793
|
+
mssql: 'tsql',
|
|
794
|
+
plsql: 'plsql',
|
|
795
|
+
pks: 'plsql',
|
|
796
|
+
pkb: 'plsql',
|
|
797
|
+
hql: 'hive',
|
|
798
|
+
bq: 'bigquery',
|
|
799
|
+
cql: 'cypher',
|
|
800
|
+
cypher: 'cypher',
|
|
801
|
+
prisma: 'prisma',
|
|
802
|
+
cassandra: 'cassandra',
|
|
803
|
+
compose: 'dockercompose',
|
|
804
|
+
helm: 'helm',
|
|
805
|
+
kustomization: 'kustomize',
|
|
806
|
+
ansible: 'ansible',
|
|
807
|
+
hcl: 'terragrunt',
|
|
808
|
+
pkr: 'packer',
|
|
809
|
+
pulumi: 'pulumi',
|
|
810
|
+
nix: 'nix',
|
|
811
|
+
guix: 'guix',
|
|
812
|
+
bicep: 'bicep',
|
|
813
|
+
pp2: 'puppet',
|
|
814
|
+
sls: 'salt',
|
|
815
|
+
prom: 'prometheus',
|
|
816
|
+
openapi: 'openapi',
|
|
817
|
+
postman: 'postman',
|
|
818
|
+
insomnia: 'insomnia',
|
|
819
|
+
har: 'har',
|
|
820
|
+
iptables: 'iptables',
|
|
821
|
+
nft: 'nftables',
|
|
822
|
+
cron: 'crontab',
|
|
823
|
+
crontab: 'crontab',
|
|
824
|
+
fstab: 'fstab',
|
|
825
|
+
hosts: 'hosts',
|
|
826
|
+
sshconfig: 'sshconfig',
|
|
827
|
+
pbtxt: 'protobuftext',
|
|
828
|
+
textproto: 'protobuftext',
|
|
829
|
+
fbs: 'flatbuffers',
|
|
830
|
+
capnp: 'capnp',
|
|
831
|
+
thrift: 'thrift',
|
|
832
|
+
avsc: 'avro',
|
|
833
|
+
asn: 'asn1',
|
|
834
|
+
asn1: 'asn1',
|
|
835
|
+
wsdl: 'wsdl',
|
|
836
|
+
idl: 'idl',
|
|
837
|
+
smithy: 'smithy',
|
|
838
|
+
jsonnet: 'jsonnet',
|
|
839
|
+
libsonnet: 'jsonnet',
|
|
840
|
+
cue: 'cue',
|
|
841
|
+
dhall: 'dhall',
|
|
842
|
+
ncl: 'nickel',
|
|
843
|
+
ron: 'ron',
|
|
844
|
+
kdl: 'kdl',
|
|
845
|
+
alg: 'algol',
|
|
846
|
+
sim: 'simula',
|
|
847
|
+
st: 'smalltalk',
|
|
848
|
+
sq: 'squeak',
|
|
849
|
+
self: 'self',
|
|
850
|
+
logo: 'logo',
|
|
851
|
+
sb3: 'scratch',
|
|
852
|
+
snap: 'snap',
|
|
853
|
+
applescript: 'applescript',
|
|
854
|
+
as: 'actionscript',
|
|
855
|
+
lingo: 'lingo',
|
|
856
|
+
lasso: 'lasso',
|
|
857
|
+
amped: 'amped',
|
|
858
|
+
raptor: 'raptor',
|
|
859
|
+
prg: 'harbour',
|
|
860
|
+
dbf: 'xbase',
|
|
861
|
+
ntx: 'clipper',
|
|
862
|
+
fxp: 'foxpro',
|
|
863
|
+
lua5: 'luaplus',
|
|
864
|
+
t2: 'terra',
|
|
865
|
+
nelua: 'nelua',
|
|
866
|
+
moon2: 'moonscript',
|
|
867
|
+
carp: 'carp',
|
|
868
|
+
shen: 'shen',
|
|
869
|
+
plisp: 'pico-lisp',
|
|
870
|
+
nl: 'newlisp',
|
|
871
|
+
picolisp: 'picolisp',
|
|
872
|
+
txl: 'txl',
|
|
873
|
+
curry: ' curry',
|
|
874
|
+
u: 'unison',
|
|
875
|
+
bal: 'ballerina',
|
|
876
|
+
gr: 'grain',
|
|
877
|
+
flix: 'flix',
|
|
878
|
+
roc: 'roc',
|
|
879
|
+
uu: 'unison-lang',
|
|
880
|
+
sw: 'sway',
|
|
881
|
+
carbon: 'carbon',
|
|
882
|
+
vale: 'vale',
|
|
883
|
+
mojo: 'mojo',
|
|
884
|
+
mint: 'mint',
|
|
885
|
+
krystal: 'krystal',
|
|
886
|
+
myst: 'myst',
|
|
887
|
+
bsq: 'bosque',
|
|
888
|
+
bex: 'bex',
|
|
889
|
+
lean4: 'lean4',
|
|
890
|
+
reds2: 'redscript',
|
|
891
|
+
asc: 'angelscript',
|
|
892
|
+
uc: 'unrealscript',
|
|
893
|
+
fx: 'hlsl-fx',
|
|
894
|
+
pixelbender: 'pixel-bender',
|
|
895
|
+
hip: 'cuda-hip',
|
|
896
|
+
sycl: 'sycl',
|
|
897
|
+
ispc: 'ispc',
|
|
898
|
+
halide: 'halide',
|
|
899
|
+
slang: 'slang',
|
|
900
|
+
naga: 'naga',
|
|
901
|
+
jsonata: 'jsonata',
|
|
902
|
+
jq: 'jq',
|
|
903
|
+
xpath: 'xpath',
|
|
904
|
+
xsd: 'xsd',
|
|
905
|
+
dtd: 'dtd',
|
|
906
|
+
sdl: 'sdl',
|
|
907
|
+
puml: 'plantuml',
|
|
908
|
+
plantuml: 'plantuml',
|
|
909
|
+
mmd: 'mermaid',
|
|
910
|
+
mermaid: 'mermaid',
|
|
911
|
+
dot: 'graphviz',
|
|
912
|
+
gv: 'graphviz',
|
|
913
|
+
dbml: 'dbml',
|
|
258
914
|
diff: 'diff', patch: 'diff',
|
|
259
915
|
};
|
|
260
916
|
|
|
@@ -374,9 +1030,19 @@ export function highlightLine(text, lang, inComment = false) {
|
|
|
374
1030
|
i = closeAt + L.block[1].length;
|
|
375
1031
|
inComment = false;
|
|
376
1032
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
1033
|
+
// A LINE COMMENT IS A MARKER, EXCEPT WHEN THE LANGUAGE SAYS IT IS A WORD.
|
|
1034
|
+
//
|
|
1035
|
+
// `#` and `//` are punctuation and cannot appear in an identifier, so `startsWith` is exact. Batch's comment is
|
|
1036
|
+
// the WORD `rem`, and a prefix test made `remember` a comment to the end of the line. `lineWord: true` requires
|
|
1037
|
+
// the marker to end where the identifier does.
|
|
1038
|
+
if (L.line) {
|
|
1039
|
+
const isWord = L.lineWord
|
|
1040
|
+
? rest.startsWith(L.line) && !/[\w-]/.test(src[i + L.line.length] || '')
|
|
1041
|
+
: rest.startsWith(L.line);
|
|
1042
|
+
if (isWord && (!L.lineWord || i === 0 || !/[\w-]/.test(src[i - 1]))) {
|
|
1043
|
+
out += paint(src.slice(i), 'comment');
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
380
1046
|
}
|
|
381
1047
|
|
|
382
1048
|
// String. A raw prefix (`r"` in Python, `` ` `` in Go) is handled by treating the prefix as part of the quote
|