snibbets 2.0.13 → 2.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,379 @@
1
+ LEXERS_DB =<<EOLEXERS
2
+ abap [abap, ABAP]
3
+ abnf [abnf]
4
+ actionscript, as [as]
5
+ ada [adb, ads, ada]
6
+ adl [adl, adls, adlf, adlx]
7
+ agda [agda]
8
+ aheui [aheui]
9
+ alloy [als]
10
+ ambienttalk [at]
11
+ amdgpu [isa]
12
+ ampl [run]
13
+ ansys [ans]
14
+ apache [.htaccess, apache.conf, apache2.conf]
15
+ apl [apl, aplf, aplo, apln, aplc, apli, dyalog]
16
+ applescript [applescript]
17
+ arduino [ino]
18
+ arrow [arw]
19
+ asc [asc]
20
+ pem [pem, id_dsa, id_ecdsa, id_ecdsa_sk, id_ed25519, id_ed25519_sk, id_rsa]
21
+ aspectj [aj]
22
+ aspx-vb [aspx, asax, ascx, ashx, asmx, axd]
23
+ asymptote, asy [asy]
24
+ augeas [aug]
25
+ autohotkey, ahk [ahk, ahkl]
26
+ autoit [au3]
27
+ awk [awk]
28
+ bare [bare]
29
+ shell [sh, ksh, bash, zsh]
30
+ batch [bat, cmd]
31
+ bbcbasic [bbc]
32
+ bc [bc]
33
+ befunge [befunge]
34
+ bibtex [bib]
35
+ blitzbasic [bb, decls]
36
+ blitzmax [bmx]
37
+ bnf [bnf]
38
+ boa [boa]
39
+ boo [boo]
40
+ boogie [bpl]
41
+ brainfuck, bf [bf, b]
42
+ bst [bst]
43
+ c-objdump [c-objdump]
44
+ c [c, h, idc]
45
+ ca65 [s]
46
+ cadl [cadl]
47
+ cddl [cddl]
48
+ ceylon [ceylon]
49
+ cfc [cfc]
50
+ cf3 [cf]
51
+ cfm [cfm, cfml]
52
+ chaiscript, chai [chai]
53
+ chapel, chpl [chpl]
54
+ charmci [ci]
55
+ cheetah, spitfire [tmpl, spt]
56
+ cirru [cirru]
57
+ clay [clay]
58
+ clean [icl, dcl]
59
+ clojure, clj [clj]
60
+ clojurescript, cljs [cljs]
61
+ cmake [cmake, CMakeLists.txt]
62
+ cobol [cob, cpy]
63
+ cobolfree [cbl]
64
+ coffeescript, coffee-script, coffee [coffee]
65
+ common-lisp, cl [cl]
66
+ lisp [lisp]
67
+ componentpascal, cp [cp, cps]
68
+ coq [v]
69
+ cpp, c++ [cpp, hpp, c++, h++, cc, hh, cxx, hxx, C, H, cp, CPP]
70
+ cpp-objdump, c++-objdumb, cxx-objdump [cpp-objdump, c++-objdump, cxx-objdump]
71
+ cpsa [cpsa]
72
+ cr, crystal [cr]
73
+ crmsh, pcmk [crmsh, pcmk]
74
+ croc [croc]
75
+ cryptol, cry [cry]
76
+ csharp, c# [cs]
77
+ csound, csound-orc [orc, udo]
78
+ csound-document, csound-csd [csd]
79
+ csound-score, csound-sco [sco]
80
+ css [css]
81
+ cuda, cu [cu, cuh]
82
+ cypher [cyp, cypher]
83
+ cython, pyx, pyrex [pyx, pxd, pxi]
84
+ d [d, di]
85
+ dart [dart]
86
+ dasm16 [dasm16, dasm]
87
+ delphi, pas, pascal, objectpascal [pas, dpr]
88
+ devicetree, dts [dts, dtsi]
89
+ dg [dg]
90
+ diff, udiff [diff, patch]
91
+ docker, dockerfile [Dockerfile, docker]
92
+ dpatch [dpatch, darcspatch]
93
+ dtd [dtd]
94
+ jbst [duel, jbst]
95
+ dylan-console, dylan-repl [dylan-console]
96
+ dylan-lid, lid [lid, hdp]
97
+ dylan [dylan, dyl, intr]
98
+ earl-grey, earlgrey, eg [eg]
99
+ easytrieve [ezt, mac]
100
+ ebnf [ebnf]
101
+ ec [ec, eh]
102
+ ecl [ecl]
103
+ eiffel [e]
104
+ elixir, ex, exs [ex, eex, exs, leex]
105
+ elm [elm]
106
+ emacs-lisp, elisp, emacs [el]
107
+ email, eml [eml]
108
+ erb [erb]
109
+ erl [erl-sh]
110
+ erlang [erl, hrl, es, escript]
111
+ evoque [evoque]
112
+ execline [exec]
113
+ extempore [xtm]
114
+ ezhil [n]
115
+ factor [factor]
116
+ fan [fan]
117
+ fancy, fy [fy, fancypack]
118
+ felix, flx [flx, flxh]
119
+ fennel, fnl [fnl]
120
+ fish, fishshell [fish, load]
121
+ floscript, flo [flo]
122
+ forth [frt, fs]
123
+ fortran [f03, f90, F03, F90]
124
+ fortranfixed [f, F]
125
+ foxpro, vfp, clipper, xbase [PRG, prg]
126
+ freefem [edp]
127
+ fsharp, f# [fs, fsi]
128
+ fstar [fst, fsti]
129
+ futhark [fut]
130
+ gap [g, gd, gi, gap]
131
+ gas, asm [s, S]
132
+ gcode [gcode]
133
+ gdscript, gd [gd]
134
+ genshi, kid, xml+genshi, xml+kid [kid]
135
+ gherkin, cucumber [feature]
136
+ glsl [vert, frag, geo]
137
+ gnuplot [plot, plt]
138
+ go, golang [go]
139
+ golo [golo]
140
+ gooddata-cl [gdc]
141
+ gosu [gs, gsx, gsp, vark]
142
+ graphviz, dot [gv, dot]
143
+ groff, nroff, man [man]
144
+ groovy [groovy, gradle]
145
+ gsql [gsql]
146
+ gst [gst]
147
+ haml [haml]
148
+ haskell, hs [hs]
149
+ haxe, hxsl, hx [hx, hxsl]
150
+ haxeml, hxml [hxml]
151
+ hlsl [hlsl, hlsli]
152
+ hsail, hsa [hsail]
153
+ handlebars [handlebars, hbs]
154
+ html+ng2 [ng2]
155
+ html+php [phtml]
156
+ html+twig [twig]
157
+ html [html, htm, xhtml, xslt]
158
+ hybris, hy [hy, hyb]
159
+ hylang [hy]
160
+ i6t [i6t]
161
+ idl [pro]
162
+ idris, idr [idr]
163
+ igor, igorpro [ipf]
164
+ inform6, i6 [inf]
165
+ inform7, i7 [ni, i7x]
166
+ ini, cfg, dosini [ini, cfg, inf, service, socket, device, mount, automount, swap, target, path, timer, slice, scope]
167
+ io [io]
168
+ ioke, ik [ik]
169
+ isabelle [thy]
170
+ j [ijs]
171
+ jags [jag, bug]
172
+ jasmin, jasminxt [j]
173
+ java [java]
174
+ javascript, js [js, jsm, mjs, cjs]
175
+ jcl [jcl]
176
+ jsgf [jsgf]
177
+ jslt [jslt]
178
+ json, json-object [json]
179
+ jsonld, json-ld [jsonld]
180
+ jsp [jsp]
181
+ julia, jl [jl]
182
+ juttle [juttle]
183
+ kal [kal]
184
+ kmsg, dmesg [kmsg, dmesg]
185
+ koka [kk, kki]
186
+ kotlin [kt, kts]
187
+ kuin [kn]
188
+ lasso, lassoscript [lasso]
189
+ lean [lean]
190
+ less [less]
191
+ limbo [b]
192
+ liquid [liquid]
193
+ literate-agda, lagda [lagda]
194
+ literate-cryptol, lcryptol, lcry [lcry]
195
+ literate-haskell, lhaskell, lhs [lhs]
196
+ literate-idris, lidris, lidr [lidr]
197
+ livescript, live-script [ls]
198
+ llvm-mir [mir]
199
+ llvm [ll]
200
+ logos [x, xi, xm, xmi]
201
+ logtalk [lgt, logtalk]
202
+ lsl [lsl]
203
+ lua [lua, wlua]
204
+ make, makefile, mf, bsdmake [mak, mk, Makefile, makefile, Makefile. GNUmakefile]
205
+ mako [mao]
206
+ maql [maql]
207
+ markdown, md [md, markdown, mmd]
208
+ mask [mask]
209
+ mason [m, mhtml, mc, mi, autohandler, dhandler]
210
+ mathematica, mma, nb [nb, cdf, nbp, ma]
211
+ miniscript, ms [ms]
212
+ modelica [mo]
213
+ modula2, m2 [def, mod]
214
+ monkey [monkey]
215
+ monte [mt]
216
+ moocode, moo [moo]
217
+ moonscript, moon [moon]
218
+ mosel [mos]
219
+ mscgen, msc [msc]
220
+ mupad [mu]
221
+ mxml [mxml]
222
+ myghty [myt, autodelegate]
223
+ ncl [ncl]
224
+ nemerle [n]
225
+ nesc [nc]
226
+ nestedtext, nt [nt]
227
+ newlisp [lsp, nl, kif]
228
+ newspeak [ns2]
229
+ nimrod, nim [nim, nimrod]
230
+ nit [nit]
231
+ nixos, nix [nix]
232
+ nsis, nsi, nsh [nsi, nsh]
233
+ nusmv [smv]
234
+ objdump [objdump]
235
+ objective-c++, objectivec++, obj-c++, objc++ [mm, hh]
236
+ objective-c, objectivec, obj-c, objc [m, h]
237
+ objective-j, objectivej, obj-j, objj [j]
238
+ ocaml [ml, mli, mll, mly]
239
+ odin [odin]
240
+ omg-idl [idl, pidl]
241
+ ooc [ooc]
242
+ opa [opa]
243
+ openedge, abl, progress [p, cls]
244
+ pacmanconf [pacman.conf]
245
+ pan [pan]
246
+ parasail [psi, psl]
247
+ pawn [p, pwn, inc]
248
+ peg [peg]
249
+ perl, pl [pl, pm, t, perl]
250
+ php [php, inc]
251
+ pig [pig]
252
+ pike [pike, pmod]
253
+ pkgconfig [pc]
254
+ pointless [ptls]
255
+ pony [pony]
256
+ postscript, postscr [ps, eps]
257
+ pot, po [pot, po]
258
+ pov [pov, inc]
259
+ powershell, pwsh, posh, ps1, psm1 [ps1, psm1]
260
+ praat [praat, proc, psc]
261
+ prolog [ecl, prolog, pro, pl]
262
+ promql [promql]
263
+ properties, jproperties [properties]
264
+ protobuf, proto [proto]
265
+ pug [pug]
266
+ jade [jade]
267
+ puppet [pp]
268
+ py2tb [py2tb]
269
+ pypylog, pypy [pypylog]
270
+ pytb, py3tb [pytb, py3tb]
271
+ python, py, sage [py, pyw, jy, sage, sc, bzl, tac]
272
+ qbasic, basic [BAS, bas]
273
+ qml, qbs [qml, qbs]
274
+ qvto, qvt [qvto]
275
+ racket, rkt [rkt, rktd, rktl]
276
+ reasonml, reason [re, rei]
277
+ rebol [r, r3, reb]
278
+ red [red, reds]
279
+ redcode [cw]
280
+ registry [reg]
281
+ restructuredtext, rst, rest [rst, rest]
282
+ rexx, arexx [rexx, rex, rx, arexx]
283
+ rhtml [rhtml]
284
+ ride [ride]
285
+ rng-compact, rnc [rnc]
286
+ roboconf-graph [graph]
287
+ roboconf-instances [instances]
288
+ robotframework [robot]
289
+ rql [rql]
290
+ rsl [rsl]
291
+ ruby, rb [rb, rbw, rake, gemspec, rbx, duby]
292
+ rust, rs [rs, rs.in]
293
+ sarl [sarl]
294
+ sas [SAS, sas]
295
+ sass [sass, scss]
296
+ scala [scala]
297
+ scaml [scaml]
298
+ scdoc, scd [scd, scdoc]
299
+ scheme, scm [scm, ss]
300
+ scilab [sci, sce, tst]
301
+ sgf [sgf]
302
+ shen [shen]
303
+ shexc, shex [shex]
304
+ sieve [siv, sieve]
305
+ silver [sil, vpr]
306
+ slash [sla]
307
+ slim [slim]
308
+ slurm, sbatch [sl]
309
+ smali [smali]
310
+ smalltalk, squeak, st [st]
311
+ smarty [tpl]
312
+ smithy [smithy]
313
+ sml [sml, sig, fun]
314
+ snobol [snobol]
315
+ snowball [sbl]
316
+ solidity [sol]
317
+ sp [sp]
318
+ sparql [rq, sparql]
319
+ spec [spec]
320
+ r [R]
321
+ sql [sql]
322
+ ssp [ssp]
323
+ stan [stan]
324
+ stata, do [do, ado]
325
+ supercollider, sc [sc, scd]
326
+ swift [swift]
327
+ swig [swg, i]
328
+ systemverilog, sv [sv, svh]
329
+ tads3 [t]
330
+ tap [tap]
331
+ tasm [tasm]
332
+ tcl [tcl, rvt]
333
+ tcsh, csh [tcsh, csh]
334
+ tea [tea]
335
+ teal [teal]
336
+ teratermmacro, teraterm, ttl [ttl]
337
+ termcap [termcap, termcap.src]
338
+ terminfo [terminfo, terminfo.src]
339
+ terraform, tf [tf]
340
+ tex, latex [tex, aux, toc]
341
+ text [txt]
342
+ thrift [thrift]
343
+ ti, thingsdb [ti]
344
+ tid [tid]
345
+ tnt [tnt]
346
+ trafficscript, rts [rts]
347
+ treetop [treetop, tt]
348
+ turtle [ttl]
349
+ typescript, ts [ts]
350
+ typoscript [typoscript]
351
+ ucode [u, u1, u2]
352
+ urbiscript [u]
353
+ usd, usda [usd, usda]
354
+ vala, vapi [vala, vapi]
355
+ vb.net, vbnet [vb, bas]
356
+ vbscript [vbs, VBS]
357
+ vcl [vcl]
358
+ velocity [vm, fhtml]
359
+ verilog, v [v]
360
+ vgl [rpf]
361
+ vhdl [vhdl, vhd]
362
+ vim [vim, .vimrc, .exrc, .gvimrc, _vimrc, _exrc, _gvimrc, vimrc, gvimrc]
363
+ wast, wat [wat, wast]
364
+ wdiff [wdiff]
365
+ webidl [webidl]
366
+ whiley [whiley]
367
+ x10, xten [x10]
368
+ xml [xml, xsl, rss, xslt, xsd, wsdl, wsf]
369
+ xquery, xqy, xq, xql, xqm [xqy, xquery, xq, xql, xqm]
370
+ xslt [xsl, xslt, xpl]
371
+ xtend [xtend]
372
+ yaml+jinja, salt, sls [sls]
373
+ yaml [yaml, yml]
374
+ yang [yang]
375
+ zeek [zeek]
376
+ bro [bro]
377
+ zephir [zep]
378
+ zig [zig]
379
+ EOLEXERS
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snibbets
4
- VERSION = '2.0.13'
4
+ VERSION = '2.0.15'
5
5
  end
data/lib/snibbets.rb CHANGED
@@ -253,7 +253,7 @@ module Snibbets
253
253
  warn header
254
254
  warn '-' * header.length
255
255
  code = snip['code']
256
- code = highlight(code, filepath) if Snibbets.options[:highlight]
256
+ code = Highlight.highlight(code, filepath) if Snibbets.options[:highlight]
257
257
  print(code)
258
258
  end
259
259
  end
@@ -300,7 +300,7 @@ module Snibbets
300
300
  warn header
301
301
  warn '-' * header.length
302
302
  code = answer['code']
303
- code = highlight(code, filepath) if Snibbets.options[:highlight]
303
+ code = Highlight.highlight(code, filepath) if Snibbets.options[:highlight]
304
304
  print(code)
305
305
  end
306
306
  end
@@ -0,0 +1,192 @@
1
+ {
2
+ "_comments": [
3
+ "This theme has been adapted from: https://ethanschoonover.com/solarized/"
4
+ ],
5
+ "metadata" : {
6
+ "copyright": [
7
+ "SPDX-FileCopyrightText: 2011 Ethan Schoonover",
8
+ "SPDX-FileCopyrightText: 2012 Dominik Haumann <dhaumann@kde.org>",
9
+ "SPDX-FileCopyrightText: 2018 Andrew Crouthamel <andrew.crouthamel@kdemail.net>"
10
+ ],
11
+ "license": "SPDX-License-Identifier: MIT",
12
+ "revision" : 6,
13
+ "name" : "Solarized Dark"
14
+ },
15
+ "text-styles": {
16
+ "Normal" : {
17
+ "text-color" : "#839496",
18
+ "selected-text-color" : "#586e75",
19
+ "bold" : false,
20
+ "italic" : false,
21
+ "underline" : false,
22
+ "strike-through" : false
23
+ },
24
+ "Keyword" : {
25
+ "text-color" : "#859900",
26
+ "selected-text-color" : "#859900"
27
+ },
28
+ "Function" : {
29
+ "text-color" : "#268bd2",
30
+ "selected-text-color" : "#268bd2"
31
+ },
32
+ "Variable" : {
33
+ "text-color" : "#268bd2",
34
+ "selected-text-color" : "#268bd2"
35
+ },
36
+ "ControlFlow" : {
37
+ "text-color" : "#859900",
38
+ "selected-text-color" : "#859900"
39
+ },
40
+ "Operator" : {
41
+ "text-color" : "#859900",
42
+ "selected-text-color" : "#859900"
43
+ },
44
+ "BuiltIn" : {
45
+ "text-color" : "#cb4b16",
46
+ "selected-text-color" : "#cb4b16"
47
+ },
48
+ "Extension" : {
49
+ "text-color" : "#268bd2",
50
+ "selected-text-color" : "#268bd2"
51
+ },
52
+ "Preprocessor" : {
53
+ "text-color" : "#cb4b16",
54
+ "selected-text-color" : "#cb4b16"
55
+ },
56
+ "Attribute" : {
57
+ "text-color" : "#268bd2",
58
+ "selected-text-color" : "#268bd2"
59
+ },
60
+ "Char" : {
61
+ "text-color" : "#2aa198",
62
+ "selected-text-color" : "#2aa198"
63
+ },
64
+ "SpecialChar" : {
65
+ "text-color" : "#dc322f",
66
+ "selected-text-color" : "#dc322f"
67
+ },
68
+ "String" : {
69
+ "text-color" : "#2aa198",
70
+ "selected-text-color" : "#2aa198"
71
+ },
72
+ "VerbatimString" : {
73
+ "text-color" : "#23877e",
74
+ "selected-text-color" : "#23877e"
75
+ },
76
+ "SpecialString" : {
77
+ "text-color" : "#dc322f",
78
+ "selected-text-color" : "#dc322f"
79
+ },
80
+ "Import" : {
81
+ "text-color" : "#2aa198",
82
+ "selected-text-color" : "#2aa198"
83
+ },
84
+ "DataType" : {
85
+ "text-color" : "#b58900",
86
+ "selected-text-color" : "#b58900"
87
+ },
88
+ "DecVal" : {
89
+ "text-color" : "#2aa198",
90
+ "selected-text-color" : "#2aa198"
91
+ },
92
+ "BaseN" : {
93
+ "text-color" : "#2aa198",
94
+ "selected-text-color" : "#2aa198"
95
+ },
96
+ "Float" : {
97
+ "text-color" : "#2aa198",
98
+ "selected-text-color" : "#2aa198"
99
+ },
100
+ "Constant" : {
101
+ "text-color" : "#2aa198",
102
+ "selected-text-color" : "#2aa198",
103
+ "bold" : true
104
+ },
105
+ "Comment" : {
106
+ "text-color" : "#586e75",
107
+ "selected-text-color" : "#93a1a1",
108
+ "italic" : true
109
+ },
110
+ "Documentation" : {
111
+ "text-color" : "#dc322f",
112
+ "selected-text-color" : "#dc322f"
113
+ },
114
+ "Annotation" : {
115
+ "text-color" : "#268bd2",
116
+ "selected-text-color" : "#268bd2"
117
+ },
118
+ "CommentVar" : {
119
+ "text-color" : "#2aa198",
120
+ "selected-text-color" : "#2aa198"
121
+ },
122
+ "RegionMarker" : {
123
+ "text-color" : "#268bd2",
124
+ "selected-text-color" : "#268bd2",
125
+ "background-color" : "#073642"
126
+ },
127
+ "Information" : {
128
+ "text-color" : "#b58900",
129
+ "selected-text-color" : "#b58900"
130
+ },
131
+ "Warning" : {
132
+ "text-color" : "#cb4b16",
133
+ "selected-text-color" : "#cb4b16"
134
+ },
135
+ "Alert" : {
136
+ "text-color" : "#d33682",
137
+ "selected-text-color" : "#d33682",
138
+ "bold" : true
139
+ },
140
+ "Error" : {
141
+ "text-color" : "#dc322f",
142
+ "selected-text-color" : "#dc322f",
143
+ "underline" : true
144
+ },
145
+ "Others" : {
146
+ "text-color" : "#859900",
147
+ "selected-text-color" : "#859900"
148
+ }
149
+ },
150
+ "editor-colors": {
151
+ "BackgroundColor" : "#002b36",
152
+ "CodeFolding": "#083d4a",
153
+ "BracketMatching" : "#083d4a",
154
+ "CurrentLine" : "#073642",
155
+ "IconBorder" : "#073642",
156
+ "IndentationLine" : "#083d4a",
157
+ "LineNumbers" : "#586e75",
158
+ "CurrentLineNumber": "#93a1a1",
159
+ "MarkBookmark" : "#268bd2",
160
+ "MarkBreakpointActive" : "#dc322f",
161
+ "MarkBreakpointReached" : "#b58900",
162
+ "MarkBreakpointDisabled" : "#d33682",
163
+ "MarkExecution" : "#586e75",
164
+ "MarkWarning" : "#cb4b16",
165
+ "MarkError" : "#dc322f",
166
+ "ModifiedLines" : "#cb4b16",
167
+ "ReplaceHighlight": "#3c4300",
168
+ "SavedLines" : "#2aa198",
169
+ "SearchHighlight": "#0a4d5e",
170
+ "TextSelection": "#083d4a",
171
+ "Separator" : "#1c3e49",
172
+ "SpellChecking" : "#dc322f",
173
+ "TabMarker" : "#586e75",
174
+ "TemplateBackground" : "#073642",
175
+ "TemplatePlaceholder" : "#073642",
176
+ "TemplateFocusedPlaceholder" : "#073642",
177
+ "TemplateReadOnlyPlaceholder" : "#073642",
178
+ "WordWrapMarker" : "#586e75"
179
+ },
180
+ "custom-styles": {
181
+ "XML": {
182
+ "Element": {
183
+ "selected-text-color": "#839496",
184
+ "text-color": "#268bd2"
185
+ },
186
+ "Element Symbols": {
187
+ "selected-text-color": "#586e75",
188
+ "text-color": "#657b83"
189
+ }
190
+ }
191
+ }
192
+ }