summaryrefslogtreecommitdiffstats
path: root/genvim.txr
Commit message (Collapse)AuthorAgeFilesLines
* vim: improvement multi-line strings.Kaz Kylheku2022-02-041-5/+5
| | | | | | | | | | | | | | | | | | Vim's handling of multi-line Lisp strings is glitchy. We are contributing to it by tryign to match the backslash-newline as an escape sequence. As a result of this change, Vim is less confused. Indentation is still incorrect after some multi-line strings, but I'm not seeing the discrepancy between the behavior of the visual parentheses matching, and the % parentheses jump. I'm able to navigate around in the stdlib/getopts.tl code. * genvim.txr (chesc): Remove the backslash-newline from the list of character escapes. (txr_string, txr_quasilit, txr_regex, tx_regex): Use skip= to recognize the backslash-newline sequence as part of the literal.
* genvim.txr: remove unused variable pkg-name.Paul A. Patience2021-07-011-1/+0
|
* vim: improve json unquote situation.Kaz Kylheku2021-06-241-1/+2
| | | | | | | | * genvim.txr (jlist): Include txr_junqtok. (txr_junqtok): New region. Provides okay-ish match for ~ followed by unparenthesized Lisp item. For some reason, keywords aren't lit up specially, but it's still an improvement over just flagging everything as an error.
* vim: recognize #/.../ inside brace variables.Kaz Kylheku2021-06-151-1/+1
| | | | | | * genvim.txr (bvar): Add tl_regex as a constituent. This occurs in quasiliteral pattern matching syntax, like `...@{a #/regex}...`.
* vim: handle more kinds of unquotes in JSON.Kaz Kylheku2021-06-011-2/+4
| | | | | | * genvim.txr (list): Add txr_junqbkt: unquoted bracket. (txr_junqlist): Support optional # for vector syntax. (txr_junqbkt): New region for unquoted bracket expressions.
* vim: improve JSON highlighting.Kaz Kylheku2021-06-011-11/+23
| | | | | | | | | | | | | | | | | | * genvim.txr (ws, jlist, jsonkw, jerr, jpunc, jesc, juesc, jnum): New variables. (txr_circ): Move down; this somehow clashes with JSON regions beginning with #, so that even if we include txr_circ in JSON regions, it doesn't work properly. (txr_jerr, txr_jpunc, txr_jesc, txr_juesc, txr_jnum): Define using variables. (txr_jkeyword): Switch to regex match instead of keyword. Vim 8.0 does not recognize keywords when they are glued to #J, as in #Jtrue, even though #J is excluded from the region. (txr_jatom): New region. (txr_jarray, txr_jhash): Define using jlist variable for contained items. (txr_jarray_in, txr_jhash_in): New regions for the inner parts without the #J.
* vim: syntax highlighting for #J syntax.Kaz Kylheku2021-05-271-8/+46
| | | | | | | | | | | | * genvim.txr (dig19, bvar, dir, list): New variables. (txr_bracevar, tl_bracevar, tl_directive, txr_list, txr_bracket, txr_mlist_txr_mbracket): Use variable to specify common contents. JSON stuff added. (txr_ign_tok): Specify contents using @list. (txr_jkeyword, txr_jerr, txr_jpunc, txr_jesc, txr_juesc, txr_jnum): New matches. (txr_junqlist, txr_jstring, txr_jarray, txr_jhash): New regions.
* vim: attempt at #; syntax.Kaz Kylheku2021-05-121-4/+7
| | | | | | | | | | Problem is, there is no way to assert that txr_ign_tok should be colored as a comment, overriding the non-transparent item that it contains. * genvim.txr (txr_list, txr_bracket, txr_mlist): Add new contained item, txr_ign_tok. (txr_ign_tok): New region.
* vim: more accurate treatment of brace vars.Kaz Kylheku2021-04-301-1/+2
| | | | | | | | | | The txr_bracevar region is not appropriate for quasiliterals, because it contains txr_regex. * genvim.txr (tl_bracevar): New syn region, based on copying txr_bracevar and changing it so it contains tl_regex and not txr_regex. (txr_quasilit): Contain tl_bracevar rather than txr_bracevar.
* vim: support for #T and #N syntax.Kaz Kylheku2021-04-301-4/+4
| | | | | | * genvim.txr (txr_error, txr_list, txr_ign_par, txr_ign_bkt): Add T and N to the pattern that recognises #H, #S and #R, so that tree and node literals are handled.
* vim: remove txr_keyword from tl.vim.Paul A. Patience2021-04-131-0/+2
| | | | | | * genvim.txr: the tl.vim file does not require a highlighting association between txr_keyword and Keyword, since it lacks the txr_keyword match group.
* genvim: take advantage of @(if) in @(output)Kaz Kylheku2020-07-081-10/+2
| | | | | * genvim.txr (generate): Use a single, undivided @(output) block instead of multiple blocks with :continue.
* genvim: work around Vim "contains" bug.Kaz Kylheku2020-04-181-1/+3
| | | | | | | * genvim.txr (tl-sym): Recognize the contains symbol and render it as the string "contain[s]". Vim thinks that contains is reserved a keyword, anywhere in the syn keyword line, and throws an error.
* genvim: colon isn't keyword constituent any more.Kaz Kylheku2020-03-071-1/+1
| | | | | | | | | | | * genvim (iskeyword): Remove the : character from being a symbol constituent. This doesn't work well with tags, which are oblivious to packages. We would not only have to make tags.tl deal with packages, but in the tags file we would have to duplicate every entry with and without the package prefix. It doesn't make a lot of sense. Plus, packages themselves are tags, and if we put the cursor on the package part of a qualified symbol, we can jump to the package.
* genvim: treatment of comments.Kaz Kylheku2019-04-041-0/+2
| | | | | * genvim.txr (comments): new variable. Generate "set comments" command for TXR and TXR Lisp.
* vim: colorize hash bang for Lisp.Kaz Kylheku2018-11-061-1/+2
| | | | | | * genvim.txr: generate the txr_hashbang match in both txr.vim and tl.vim, not only txr.vim. Use Vim's \% regex operator to match only in the first line of a file.
* genvim: include .tlo files in vimrc example.Kaz Kylheku2018-10-281-2/+2
| | | | | * genvim.txr: In the Vim syntax file comment's example .vimrc lines, include .tlo files, which are just TXR Lisp syntax.
* genvim: % is constituent of identifiers.Kaz Kylheku2017-10-301-1/+1
| | | | * genvim.txr (iskeyword): add % character.
* genvim: ^ is constituent of identifiers.Kaz Kylheku2017-08-011-1/+1
| | | | | * genvim.txr (iskeyword): add ^ character. Now r^ and others are colorized properly.
* genvim: flag trailing junk in #x #o #b literals.Kaz Kylheku2017-07-291-9/+14
| | | | | | | | | | | * genvim.txr (txr_pnum): New match; matches a superset of the #x, #o and #b literals with the inclusion of trailing alphanumeric junk. Highlighted as Error. (txr_xnum, txr_onum, txr_bnum): New match categories, formed by renaming the previous #x, #o and #b matches. These are contained in txr_pnum, highlighted as Number. (txr_bracevar, txr_directive, txr_list, txr_bracket, txr_mlist, txr_mbracket): Include txr_pnum.
* genvim: flag invalid # syntax.Kaz Kylheku2017-07-281-0/+2
| | | | | | | * genvim.txr (txr_error): New match in this category for # followed by something other than H, S or R. Some characters other than these are valid after #, but are covered by explicit matches that occur later.
* genvim: fix buggy tl_ident containing #.Kaz Kylheku2017-07-281-1/+1
| | | | | | | * genvim.txr (tl_ident): Fix the incorrect match which allows things beginning with # to be categorized as identifier tokens. The new match reflects the true original intent: the match must not begin with #, but may contain #.
* genvim: highlight buffer literals.Kaz Kylheku2017-07-281-4/+11
| | | | | | | * genvim.txr (txr_buf_error, txr_buf_interior): New matches. (txr_list, txr_bracket, txr_mlist, txr_mbracket): Now also contain txr_buf. (txr_buf): New region, in the new txr_string matchgroup.
* genvim: bugfix for #x, #o and #b integer tokensKaz Kylheku2017-07-271-3/+3
| | | | | | | * genvim.txr (txr_num): Move the syn match definitions for hex, octal and binary integer tokens after tl_ident, which is a more general match that matches them also, and causes them to be colorized as symbols rather than numbers.
* genvim: include ffi type symbols.Kaz Kylheku2017-06-301-2/+4
| | | | | | * genvim.txr: do syntax coloring for symbols that are defined as FFI types or are FFI type operators. Also, include type operators in the Vim lispwords list.
* genvim: remove useless code.Kaz Kylheku2017-06-301-4/+0
| | | | | | | | | * genvim.txr: remove code which probes a few symbols with boundp. The point of this is to stimulate some autoloading, but it is based on a misunderstanding. The symbols in the lisplib.c autoload module are all interned. When the usr package is walked, they all get checked with boundp, and all all library autoloads are triggered.
* vim: colorize #n= and #n#.Kaz Kylheku2016-11-111-6/+8
| | | | | | | | | * genvim.txr (txr_circ): New match. Link to Special highlight group. (txr_bracevar, txr_directive, txr_list, txr_mlist, txr_mbracket): Introduce txr_circ into these regions. * txr.vim, tl.vim: Regenerated.
* New #; syntax for erasing following object.Kaz Kylheku2016-11-071-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * parser.c (parser_circ_ref): Don't generate the circular reference if circular suppression is in effect. * parser.h (struct parser): New member, circ_suppress. We use this for suppressing the generation of circular #n# references in erased objects. * parser.l (grammar): Scan #; producing HASH_SEMI token. * parser.y (HASH_SEMI): New token. (hash_semis_n_expr, hash_semis_i_expr, ignored_i_exprs, ignored_n_exprs): New nonterminals, needed for supporting the use of #; in front of top-level forms. (spec): Use hash_semis_n_expr and hash_semis_i_expr instead of n_expr and i_expr. (r_expr): Support object erasure within nested syntax. (yybadtoken): Handle H_SEMI token. (parse): Initialize new circ_suppress member of parser struct to zero. * txr.1: Documented. * genvim.txr (txr_ign_par, txr_ign_bkt, txr_ign_par_interior, txr_ign_bkt_interior): New regions for colorizing erased objects (partial support). (txr_list, txr_bracket, txr_mlist, txr_mbrackets): Include erased objects by including regions txr_ign_par and txr_ign_bkt. * txr.vim, tl.vim: Regenerated.
* vim syntax: support #H properly, plus #R, #S.Kaz Kylheku2016-11-071-1/+1
| | | | | | * genvim.txr (txr_list): Rewrite start delimiter regex. * txr.vim, tl.vim: Regenerated.
* Get rid of txl prefix from symbols.Kaz Kylheku2016-05-071-23/+23
| | | | | | * genvim.txr: Let's not get rid of this just from the instructions comment, but from the internals. txl-* replaced with tl-*.
* Don't refer to .txl in install instructions.Kaz Kylheku2016-05-071-3/+3
| | | | | | * genvim.txr: "INSTALL-HOWTO" comment still talks about .txl files, an experimental suffix we didn't go with. Now fixed to .tl.
* Fix Vim syntax highlighting bugs.Kaz Kylheku2016-05-041-2/+2
| | | | | | | | * genvim.txr (txr_splicevar): This match must be contained. (txr_metanum): Must be contained in TXR, need not be contained in TXR Lisp. * txr.vim, tl.vim: Regenerated.
* Add missing txr words to syntax highlighting.Kaz Kylheku2016-01-191-1/+2
| | | | | | * genvim.txr: Add missing single, first, last and other output repeat modifiers. Removing rep, since it's scraped from the table registration in match.c.
* Syntax highlighting regression and omission.Kaz Kylheku2015-12-221-13/+14
| | | | | | | * genvim.txr: Use new mboundp to check for macros, and special-operator-p to detect operators. fboundp doesn't report them any more. Also, :postinit must be included among lispwords.
* Some missing exceptions to indentation rule.Kaz Kylheku2015-11-301-1/+2
| | | | | * genvim.txr: Indent new, lnew, meth, umeth and usel forms like function calls.
* Vim: better indentation for some forms.Kaz Kylheku2015-10-071-1/+7
| | | | | * genvim.txr: Some operators should indent like functions. We don't want these in lispwords.
* bugfix: macro-time not bound as special operator.Kaz Kylheku2015-10-021-1/+0
| | | | | | | * eval.c (eval_init): Bind macro-time to op_error. * genvim.txr: No longer manually add macro-time to txl-orig-sym.
* Set lispwords for better indenting.Kaz Kylheku2015-10-021-8/+23
| | | | | * genvim.txr (txl-orig-sym, lispwords): New variable. (generate): Generate Vim set lispwords command.
* Don't scan C source code for Lisp symbols.Kaz Kylheku2015-09-101-33/+17
| | | | | | | | | | | | | | * eval.c (eval_init): Register package-alist, package-name and package-symbols intrinsics. * genvim.txr: Rather than scanning C sources for TXR Lisp symbols, iterate over the packages and their symbols, collecting anything which has a binding or is self-evaluating. To get the stdlib symbols, we trigger the autoloads by doing boundp queries on a few symbols. * txr.1: Document package-alist, package-name and package-symbols.
* Version 114.txr-114Kaz Kylheku2015-09-021-3/+3
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * genvim.txr: Scan struct.c, path-test.tl and struct.tl files. * txr.vim, tl.vim: Regenerated.
* One-liner to allow @{obj.slot} in quasiliterals.Kaz Kylheku2015-09-021-1/+1
| | | | | | | | * parser.l (grammar): Recognize '.' token in BRACED state also. * genvim.txr: @{obj.slot ...} syntax highlighting support. Include txr_dot and txr_dotdot in txr_bracevar region.
* Switching some globals to lexical and changing some names.Kaz Kylheku2015-08-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arith.c (arith-init): Changing *flo-...* from special to lexical, and adding un-earmuffed variants. The earmuffed versions are obsolescent. Adding %pi% and %e% global lexicals. Earmuffed versions are also made global lexical, and obsolescent. * eval.c (lookup_global_var, lookup_global_var_l): New functions. (lookup_var): Uses lookup_global_var. (reg_varl): New function. (reg_var): Uses reg_var. (eval_init): Register global lexicals user-package, system-package and keyword-package. Old symbols with earmuffs are obsoleted, and also turned into global lexicals. (top-vb, top-fb): Changed to lexical. * eval.h (lookup_global_var, lookup_global_var_l, reg_varl): Declared. * genvim.txr: Scan ver.tl so that the lib-version variable is included. Extract reg_varl calls. * glob.c (glob_init): glob-err and other variables made lexical. * lib.c (get_user_package, get_system_package, get_keyword_package): Use lookup_global_var_l to avoid searching dynamic scope for lexicals which cannot be dynamically rebound. * share/txr/stdlib/ver.tl (lib-version): New global lexical variable. (*lib-version*): Turned lexical. Obsolescent. * signal.c (sig-init): sig-* variables turned lexical. * sysif.c (sysif-init): s-*, poll-* and w-* variables turned lexical. * syslog.c (syslog-init): log-* variables turned lexical. * txr.c (sysroot-init): stdlib and *txr-version* variables turned lexical. txr-version variable added, and *txr-version* is obsolescent. (txr-main): self-path variable added. *self-path* turns lexical and is obsolescent. * txr.1: Documentation updated. Lexical variables not referred to as special. Special variables referred to as special.
* * genvim.txr: Improved highlighting of items in quasiquote.Kaz Kylheku2015-07-251-5/+5
| | | | | Lists can be spliced and quoted. Metanums and metavars can be prefixed by multiple @'s.
* * genvim.txr: Do not refer to installed code via stdlib.Kaz Kylheku2015-07-251-3/+4
| | | | Refer to source tree.
* * genvim.txr: Scan cadr.c, cadr.tl, with-resources.tl, txr-case.tl.Kaz Kylheku2015-07-231-7/+6
| | | | | Remove hard-coded txr-case symbols. Recognize operators registered with in-line intern.
* * genvim.txr (chesc): Include space among escaped characters.Kaz Kylheku2015-07-071-1/+1
|
* Reduce regex duplication in genvim.txr.Kaz Kylheku2015-07-041-30/+39
| | | | | | | | | * genvim.txr (bs, hex, at, alpha, alnum, dig, oct, chesc, glyph): New variables. *(txr_error, txr_atat, txr_comment, txr_contin, txr_char, txr_regdir, txr_variable, txr_splicevar, txr_stresc, txr_numesc, txr_regesc, txr_chr, txr_num, txr_badnum,txr_ident, txr_braced_ident): Use regex definitions.
* Syntax highlighting fixes: characters, variables, identifers.Kaz Kylheku2015-07-031-6/+6
| | | | | | | * genvim.txr (txr_variable, txr_splicevar, txr_bracevar): Weren't being generated into tl.vim. Moved to a common section. (txr_nested_error): Relocate above other matches. (txr_ident): Fixed not to match tokens starting with #.
* Support trailing semicolon after hex/octal characters.Kaz Kylheku2015-07-021-3/+4
| | | | | | | | | | | | | | | | * parser.l (%option): Remove nounput option since we need yyunput. (grammar): Rule for matching hex and octal escape in SPECIAL state recognizes optional semicolon. In 109 compatibility, this is pushed back into the stream, otherwise consumed. * txr.1: Updated documentation, including compat notes. * genvim.txr (txr_char): Include optional semicolon in match. Corrected some errors where 8 and 9 were being included as matches for octal digits. (txr_error): Default match for \x or \o not followed by digits.
* Handle escapes accurately in Vim syntax highlighting.Kaz Kylheku2015-07-021-5/+14
| | | | | | | | | * genvim.txr (txr_badesc, txr_stresc, txr_numesc, txr_regesc): New match categories. (txr_string, txr_quasilit, txr_regex, txl_regex): No longer use skip= argument, but rather contain escape categories. All escapes are colored as Special rather than String, and unknown or malformed escapes are colored as errors.