diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Trim the lua headers and fix the Scintillua notes
Diffstat (limited to '')
-rw-r--r--custom/extensions/syntax-highlight.lua20
1 file changed, 7 insertions, 13 deletions
diff --git a/custom/extensions/syntax-highlight.lua b/custom/extensions/syntax-highlight.lua
index 8310504..b7ed822 100644
--- a/custom/extensions/syntax-highlight.lua
+++ b/custom/extensions/syntax-highlight.lua
@@ -9,10 +9,10 @@
--
-- SUPPORTED LUA
--
--- Lua 5.1 through 5.4 and LuaJIT. The Scintillua version matters too. Recent
--- Scintillua (6.x) needs Lua 5.3 or newer to load its lexers, older Scintillua
--- releases still load under 5.1 and 5.2. Pick a Scintillua release that matches
--- the Lua cgit is built against.
+-- Lua 5.1 through 5.5 and LuaJIT. Scintillua 6.7 loads all of its lexers on
+-- LuaJIT, so the two do not have to be matched up. A lexer that will not load
+-- is skipped and that file falls back to plain escaped text, so a mismatched
+-- pair degrades rather than breaking the page.
--
-- REQUIREMENTS
--
@@ -33,9 +33,9 @@
-- # or with LuaRocks, matched to your Lua version
-- sudo luarocks --lua-version 5.1 install lpeg
--
--- 2. Scintillua, the lexer collection from the Textadept editor. Roughly 120
+-- 2. Scintillua, the lexer collection from the Textadept editor. Around 160
-- languages as plain .lua files, nothing to compile. Download a release and
--- unpack it anywhere.
+-- unpack it anywhere. Only the lexers directory is needed.
--
-- https://orbitalquark.github.io/scintillua/
--
@@ -43,7 +43,7 @@
--
-- $CGIT_SCINTILLUA_PATH (used alone when set, no fallback)
-- <dir of $CGIT_CONFIG>/scintillua/lexers
--- the scintillua_dirs list in the CONFIGURATION block below
+-- the scintillua_dirs list among the configuration values below
--
-- so either set the variable in the web server environment, or place (or
-- symlink) the scintillua directory next to your cgitrc.
@@ -67,9 +67,6 @@
-- assets/cgit.css styles. Every input byte up to the first NUL is preserved, so
-- the line number gutter stays aligned.
---
--- ===== CONFIGURATION =====
---
-- Files larger than this many bytes are served escaped but unhighlighted, so a
-- huge blob does not cost a lexing pass. Kept well below cgit's max-blob-size.
@@ -120,9 +117,6 @@ local ext_lexer = {
rs = "rust", c = "ansi_c", h = "ansi_c",
}
---
--- =========================
---
local lexer_mod = nil
local filename = ""