diff options
| author | orbitalquark <70453897+orbitalquark@users.noreply.github.com> | 2024-09-18 14:30:49 -0400 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2025-01-04 12:29:07 -0700 |
| commit | c1f4d3f68787fa2ae964c468d28a84df37319b28 (patch) | |
| tree | dcd62bd74f8f9fd786cba6a0c248fb388d5244a8 /lua/lexers/texinfo.lua | |
| parent | cc18cea14d1f836abcebb84a96f5029431474255 (diff) | |
| download | vis-c1f4d3f68787fa2ae964c468d28a84df37319b28.tar.gz vis-c1f4d3f68787fa2ae964c468d28a84df37319b28.tar.xz | |
lexers: switch to tabs for indentation
Diffstat (limited to 'lua/lexers/texinfo.lua')
| -rw-r--r-- | lua/lexers/texinfo.lua | 236 |
1 files changed, 118 insertions, 118 deletions
diff --git a/lua/lexers/texinfo.lua b/lua/lexers/texinfo.lua index 08fc948..5823199 100644 --- a/lua/lexers/texinfo.lua +++ b/lua/lexers/texinfo.lua @@ -32,15 +32,15 @@ local lex = lexer.new(...) -- Directives. lex:add_rule('directive', - lex:tag('command', ('@end' * lexer.space^1 + '@') * lex:word_match('directive', true))) + lex:tag('command', ('@end' * lexer.space^1 + '@') * lex:word_match('directive', true))) -- Chapters. lex:add_rule('chapter', lex:tag('command.section', - ('@end' * lexer.space^1 + '@') * lex:word_match('chapter', true))) + ('@end' * lexer.space^1 + '@') * lex:word_match('chapter', true))) -- Common keywords. lex:add_rule('keyword', lex:tag(lexer.KEYWORD, ('@end' * lexer.space^1 + '@') * - lex:word_match(lexer.KEYWORD, true))) + lex:word_match(lexer.KEYWORD, true))) -- Italics local nested_braces = lexer.range('{', '}', false, false, true) @@ -79,127 +79,127 @@ lex:add_fold_point('command', '@startchapter', '@end startchapter') -- Word lists. lex:set_word_list('directive', { - 'end', - -- Custom keywords for chapter folding - 'startchapter', 'endchapter', - -- List and tables (page 2, column 2) - 'itemize', 'enumerate', - -- Beginning a Texinfo document (page 1, column 1) - 'titlepage', 'copying', - -- Block environments (page 2, column 1) - 'cartouche', - -- Block environments > Displays using fixed-width fonts (page 2, column 2) - 'example', 'smallexample', - -- List and tables (page 2, column 2) - 'multitable', - -- Floating Displays (page 2, column 3) - 'float', 'listoffloats', 'caption', 'shortcaption', 'image', - -- Floating Displays > Footnotes (page 2, column 3) - 'footnote', 'footnotestyle', - -- Conditionally (in)visible text > Output formats (page 3, column 3) - 'ifdocbook', 'ifhtml', 'ifinfo', 'ifplaintext', 'iftex', 'ifxml', 'ifnotdocbook', 'ifnothtml', - 'ifnotplaintext', 'ifnottex', 'ifnotxml', 'ifnotinfo', 'inlinefmt', 'inlinefmtifelse', - -- Conditionally (in)visible text > Raw formatter text (page 4, column 1) - 'docbook', 'html', 'tex', 'xml', 'inlineraw', - -- Conditionally (in)visible text > Documents variables (page 4, column 1) - 'set', 'clear', 'value', 'ifset', 'ifclear', 'inlineifset', 'inlineifclear', - -- Conditionally (in)visible text > Testing for commands (page 4, column 1) - 'ifcommanddefined', 'ifcommandnotdefined', 'end', - -- Defining new Texinfo commands (page 4, column 1) - 'alias', 'macro', 'unmacro', 'definfounclose', - -- File inclusion (page 4, column 1) - 'include', 'verbatiminclude', - -- Formatting and headers footers for TeX (page 4, column 1) - 'allowcodebreaks', 'finalout', 'fonttextsize', - -- Formatting and headers footers for TeX > paper size (page 4, column 2) - 'smallbook', 'afourpaper', 'afivepaper', 'afourlatex', 'afourwide', 'pagesizes', - -- Formatting and headers footers for TeX > Page headers and footers (page 4, column 2) - -- not implemented - -- Document preferences (page 4, column 2) - -- not implemented - -- Ending a Texinfo document (page 4, column 2) - 'bye' + 'end', + -- Custom keywords for chapter folding + 'startchapter', 'endchapter', + -- List and tables (page 2, column 2) + 'itemize', 'enumerate', + -- Beginning a Texinfo document (page 1, column 1) + 'titlepage', 'copying', + -- Block environments (page 2, column 1) + 'cartouche', + -- Block environments > Displays using fixed-width fonts (page 2, column 2) + 'example', 'smallexample', + -- List and tables (page 2, column 2) + 'multitable', + -- Floating Displays (page 2, column 3) + 'float', 'listoffloats', 'caption', 'shortcaption', 'image', + -- Floating Displays > Footnotes (page 2, column 3) + 'footnote', 'footnotestyle', + -- Conditionally (in)visible text > Output formats (page 3, column 3) + 'ifdocbook', 'ifhtml', 'ifinfo', 'ifplaintext', 'iftex', 'ifxml', 'ifnotdocbook', 'ifnothtml', + 'ifnotplaintext', 'ifnottex', 'ifnotxml', 'ifnotinfo', 'inlinefmt', 'inlinefmtifelse', + -- Conditionally (in)visible text > Raw formatter text (page 4, column 1) + 'docbook', 'html', 'tex', 'xml', 'inlineraw', + -- Conditionally (in)visible text > Documents variables (page 4, column 1) + 'set', 'clear', 'value', 'ifset', 'ifclear', 'inlineifset', 'inlineifclear', + -- Conditionally (in)visible text > Testing for commands (page 4, column 1) + 'ifcommanddefined', 'ifcommandnotdefined', 'end', + -- Defining new Texinfo commands (page 4, column 1) + 'alias', 'macro', 'unmacro', 'definfounclose', + -- File inclusion (page 4, column 1) + 'include', 'verbatiminclude', + -- Formatting and headers footers for TeX (page 4, column 1) + 'allowcodebreaks', 'finalout', 'fonttextsize', + -- Formatting and headers footers for TeX > paper size (page 4, column 2) + 'smallbook', 'afourpaper', 'afivepaper', 'afourlatex', 'afourwide', 'pagesizes', + -- Formatting and headers footers for TeX > Page headers and footers (page 4, column 2) + -- not implemented + -- Document preferences (page 4, column 2) + -- not implemented + -- Ending a Texinfo document (page 4, column 2) + 'bye' }) lex:set_word_list('chapter', { - -- Chapter structuring (page 1, column 2) - 'lowersections', 'raisesections', 'part', - -- Chapter structuring > Numbered, included in contents (page 1, column 2) - 'chapter', 'centerchap', - -- Chapter structuring > Context-dependent, included in contents (page 1, column 2) - 'section', 'subsection', 'subsubsection', - -- Chapter structuring > Unumbered, included in contents (page 1, column 2) - 'unnumbered', 'unnumberedsec', 'unnumberedsubsec', 'unnumberedsubsection', 'unnumberedsubsubsec', - 'unnumberedsubsubsection', - -- Chapter structuring > Letter and numbered, included in contents (page 1, column 2) - 'appendix', 'appendixsec', 'appendixsection', 'appendixsubsec', 'appendixsubsection', - 'appendixsubsubsec', 'appendixsubsubsection', - -- Chapter structuring > Unumbered, not included in contents, no new page (page 1, column 3) - 'chapheading', 'majorheading', 'heading', 'subheading', 'subsubheading' + -- Chapter structuring (page 1, column 2) + 'lowersections', 'raisesections', 'part', + -- Chapter structuring > Numbered, included in contents (page 1, column 2) + 'chapter', 'centerchap', + -- Chapter structuring > Context-dependent, included in contents (page 1, column 2) + 'section', 'subsection', 'subsubsection', + -- Chapter structuring > Unumbered, included in contents (page 1, column 2) + 'unnumbered', 'unnumberedsec', 'unnumberedsubsec', 'unnumberedsubsection', 'unnumberedsubsubsec', + 'unnumberedsubsubsection', + -- Chapter structuring > Letter and numbered, included in contents (page 1, column 2) + 'appendix', 'appendixsec', 'appendixsection', 'appendixsubsec', 'appendixsubsection', + 'appendixsubsubsec', 'appendixsubsubsection', + -- Chapter structuring > Unumbered, not included in contents, no new page (page 1, column 3) + 'chapheading', 'majorheading', 'heading', 'subheading', 'subsubheading' }) lex:set_word_list(lexer.KEYWORD, { - 'end', - -- Beginning a Texinfo document (page 1, column 1) - 'setfilename', 'settitle', 'insertcopying', - -- Beginning a Texinfo document > Internationlization (page 1, column 1) - 'documentencoding', 'documentlanguage', 'frenchspacing', - -- Beginning a Texinfo document > Info directory specification and HTML document description - -- (page 1, column 1) - 'dircategory', 'direntry', 'documentdescription', - -- Beginning a Texinfo document > Titre pages (page 1, column 1) - 'shorttitlepage', 'center', 'titlefont', 'title', 'subtitle', 'author', - -- Beginning a Texinfo document > Tables of contents (page 1, column 2) - 'shortcontents', 'summarycontents', 'contents', 'setcontentsaftertitlepage', - 'setshortcontentsaftertitlepage', - -- Nodes (page 1, column 2) - 'node', 'top', 'anchor', 'novalidate', - -- Menus (page 1, column 2) - 'menu', 'detailmenu', - -- Cross references > Within the Info system (page 1, column 3) - 'xref', 'pxref', 'ref', 'inforef', 'xrefautomaticsectiontitle', - -- Cross references > Outside of info (page 1, column 3) - 'url', 'cite', - -- Marking text > Markup for regular text (page 1, column 3) - 'var', 'dfn', 'acronym', 'abbr', - -- Marking text > Markup for litteral text (page 1, column 3) - 'code', 'file', 'command', 'env', 'option', 'kbd', 'key', 'email', 'indicateurl', 'samp', 'verb', - -- Marking text > GUI sequences (page 2, column 1) - 'clicksequence', 'click', 'clickstyle', 'arrow', - -- Marking text > Math (page 2, column 1) - 'math', 'minus', 'geq', 'leq', - -- Marking text > Explicit font selection (page 2, column 1) - 'sc', 'r', 'i', 'slanted', 'b', 'sansserif', 't', - -- Block environments (page 2, column 1) - 'noindent', 'indent', 'exdent', - -- Block environments > Normally filled displays using regular text fonts (page 2, column 1) - 'quotation', 'smallquotation', 'indentedblock', 'smallindentedblock', 'raggedright', - -- Block environments > Line-for-line displays using regular test fonts (page 2, column 2) - 'format', 'smallformat', 'display', 'smalldisplay', 'flushleft', 'flushright', - -- Block environments > Displays using fixed-width fonts (page 2, column 2) - 'lisp', 'smalllisp', 'verbatim', - -- List and tables (page 2, column 2) - 'table', 'ftable', 'vtable', 'tab', 'item', 'itemx', 'headitem', 'headitemfont', 'asis', - -- Indices (page 2, column 3) - 'cindex', 'findex', 'vindex', 'kindex', 'pindex', 'tindex', 'defcodeindex', 'syncodeindex', - 'synindex', 'printindex', - -- Insertions within a paragraph > Characters special to Texinfo (page 2, column 3) - '@', '{', '}', 'backslashcar', 'comma', 'hashcar', ':', '.', '?', '!', 'dmn', - -- Insertions within a paragraph > Accents (page 3, column 1) - -- not implemented - -- Insertions within a paragraph > Non-English characters (page 3, column 1) - -- not implemented - -- Insertions within a paragraph > Other text characters an logos (page 3, column 1) - 'bullet', 'dots', 'enddots', 'euro', 'pounds', 'textdegree', 'copyright', 'registeredsymbol', - 'TeX', 'LaTeX', 'today', 'guillemetleft', 'guillementright', 'guillemotleft', 'guillemotright', - -- Insertions within a paragraph > Glyphs for code examples (page 3, column 2) - 'equiv', 'error', 'expansion', 'point', 'print', 'result', - -- Making and preventing breaks (page 3, column 2) - '*', '/', '-', 'hyphenation', 'tie', 'w', 'refill', - -- Vertical space (page 3, column 2) - 'sp', 'page', 'need', 'group', 'vskip' - -- Definition commands (page 3, column 2) - -- not implemented + 'end', + -- Beginning a Texinfo document (page 1, column 1) + 'setfilename', 'settitle', 'insertcopying', + -- Beginning a Texinfo document > Internationlization (page 1, column 1) + 'documentencoding', 'documentlanguage', 'frenchspacing', + -- Beginning a Texinfo document > Info directory specification and HTML document description + -- (page 1, column 1) + 'dircategory', 'direntry', 'documentdescription', + -- Beginning a Texinfo document > Titre pages (page 1, column 1) + 'shorttitlepage', 'center', 'titlefont', 'title', 'subtitle', 'author', + -- Beginning a Texinfo document > Tables of contents (page 1, column 2) + 'shortcontents', 'summarycontents', 'contents', 'setcontentsaftertitlepage', + 'setshortcontentsaftertitlepage', + -- Nodes (page 1, column 2) + 'node', 'top', 'anchor', 'novalidate', + -- Menus (page 1, column 2) + 'menu', 'detailmenu', + -- Cross references > Within the Info system (page 1, column 3) + 'xref', 'pxref', 'ref', 'inforef', 'xrefautomaticsectiontitle', + -- Cross references > Outside of info (page 1, column 3) + 'url', 'cite', + -- Marking text > Markup for regular text (page 1, column 3) + 'var', 'dfn', 'acronym', 'abbr', + -- Marking text > Markup for litteral text (page 1, column 3) + 'code', 'file', 'command', 'env', 'option', 'kbd', 'key', 'email', 'indicateurl', 'samp', 'verb', + -- Marking text > GUI sequences (page 2, column 1) + 'clicksequence', 'click', 'clickstyle', 'arrow', + -- Marking text > Math (page 2, column 1) + 'math', 'minus', 'geq', 'leq', + -- Marking text > Explicit font selection (page 2, column 1) + 'sc', 'r', 'i', 'slanted', 'b', 'sansserif', 't', + -- Block environments (page 2, column 1) + 'noindent', 'indent', 'exdent', + -- Block environments > Normally filled displays using regular text fonts (page 2, column 1) + 'quotation', 'smallquotation', 'indentedblock', 'smallindentedblock', 'raggedright', + -- Block environments > Line-for-line displays using regular test fonts (page 2, column 2) + 'format', 'smallformat', 'display', 'smalldisplay', 'flushleft', 'flushright', + -- Block environments > Displays using fixed-width fonts (page 2, column 2) + 'lisp', 'smalllisp', 'verbatim', + -- List and tables (page 2, column 2) + 'table', 'ftable', 'vtable', 'tab', 'item', 'itemx', 'headitem', 'headitemfont', 'asis', + -- Indices (page 2, column 3) + 'cindex', 'findex', 'vindex', 'kindex', 'pindex', 'tindex', 'defcodeindex', 'syncodeindex', + 'synindex', 'printindex', + -- Insertions within a paragraph > Characters special to Texinfo (page 2, column 3) + '@', '{', '}', 'backslashcar', 'comma', 'hashcar', ':', '.', '?', '!', 'dmn', + -- Insertions within a paragraph > Accents (page 3, column 1) + -- not implemented + -- Insertions within a paragraph > Non-English characters (page 3, column 1) + -- not implemented + -- Insertions within a paragraph > Other text characters an logos (page 3, column 1) + 'bullet', 'dots', 'enddots', 'euro', 'pounds', 'textdegree', 'copyright', 'registeredsymbol', + 'TeX', 'LaTeX', 'today', 'guillemetleft', 'guillementright', 'guillemotleft', 'guillemotright', + -- Insertions within a paragraph > Glyphs for code examples (page 3, column 2) + 'equiv', 'error', 'expansion', 'point', 'print', 'result', + -- Making and preventing breaks (page 3, column 2) + '*', '/', '-', 'hyphenation', 'tie', 'w', 'refill', + -- Vertical space (page 3, column 2) + 'sp', 'page', 'need', 'group', 'vskip' + -- Definition commands (page 3, column 2) + -- not implemented }) lexer.property['scintillua.comment'] = '@c' |
