aboutsummaryrefslogtreecommitdiff
path: root/lua
AgeCommit message (Collapse)AuthorFilesLines
2017-06-05themes: simplify color definitionMarc André Tanner1-16/+16
2017-06-04Improve appearance of line numbers and EOF markersPhilipp Emanuel Weidmann1-2/+2
2017-05-31vis-lua: fix file:match_at API documentationMarc André Tanner1-1/+1
2017-05-30lexer: add simple strace(1) output lexerMarc André Tanner2-0/+36
2017-05-12Add a whitespace rule for the "elixir" lexer.Tynan Colin Beatty1-0/+1
2017-04-09vis: remove handling of \r\n line endingsMarc André Tanner1-4/+0
Use something like dos2unix(1) and unix2dos(1), if you need to edit such files.
2017-03-31vis: improve tab completion in command promptMarc André Tanner1-1/+30
At some point it should probably be possible to add command prompt bindings from within Lua. Currently there is no easy/realiable way to detect the prompt window. Should improve #526.
2017-03-31lexers: sync with scintillua changeset 600 rev fdeca0b808bfMarc André Tanner7-23/+184
I think the default value for the cache argument to the lexer load function should be true, not false. Optimize for the common case. This makes the API ugly/harder to use. But for now we follow upstream.
2017-03-24lexers: fix perl pattern for horrible regex linesS. Gilles1-0/+3
Under presently-not-precise circumstances, regex patterns longer than a screenful can cause first_match_pos to be nil. In this sutation, evaluating `first_match_pos - 1' will be an error, so jump to matchless case.
2017-03-19vis-lua: allow operators to be defined as lua functionsMarc André Tanner1-0/+36
2017-03-19Move :set horizon option implementaiton to luaMarc André Tanner1-1/+8
2017-03-19Move :set theme option implementation to luaMarc André Tanner2-4/+3
2017-03-19Move :set syntax option implementation to luaMarc André Tanner3-32/+54
It is no longer possible to change the used syntax by assigning to the `win.syntax = name` field, instead the function win:set_syntax(name)` should be called. The distinction between filetype and syntax lexer to use should probably be clarified/cleaned up at some point.
2017-03-19Fix errors and add ANS Forth 2012 keywordsstutonk1-17/+31
Added all ANS Forth 2012 keywords as defined at http://lars.nocrew.org/forth2012/core.html and removed keywords that were not part of the standard. This necessitated rewriting most of the Strings rules as well as removing some rules not consistent with the standard. Only the s\" form should allow escaping. The list of characters which may appear as part of a keyword has also been expanded where appropriate. Because '.' is a keyword as well as the first chatacter in a string pattern, strings must now be given parsing precedence over keywords to ensure proper highlighting. A few errors were also fixed such as moving the true (which should make keywords case-insensitive) within the word_match function's closing paren. Parens have been removed from the operator list and moved to their correct place as the delimiters for block comments.
2017-03-18Recognize additional Forth filetypestutonk1-1/+1
2017-03-15Make Vis' Solarized theme match the official Vim one.Tim Allen1-2/+2
2017-03-14Restructure display codeMarc André Tanner4-1/+21
Use pull instead of push based model for display code. Previously view.c was calling into the ui frontend code, with the new scheme this switches around: the necessary data is fetched by the ui as necessary. The UI independent display code is moved out of view.c/ui-curses.c into vis.c. The cell styles are now directly embedded into the Cell struct. New UI styles are introduced for: - status bar (focused / non-focused) - info message - window separator - EOF symbol You will have to update your color themes. The terminal output code is further abstracted into a generic ui-terminal.c part which keeps track of the whole in-memory cell matrix and #includes ui-terminal-curses.c for the actual terminal output. This architecture currently assumes that there are no overlapping windows. It will also allow non-curses based terminal user interfaces.
2017-03-07lua: add filetype detection for Plan9 rc and derivativesDavid B. Lamkins1-0/+3
Close #513
2017-03-05lua: fix more luacheck warningsMarc André Tanner2-4/+16
2017-03-05lua: reimplement word and file name completion in luaMarc André Tanner3-0/+47
The file name completion does not yet behave the same way as the previous C code because the completion prefix is currently simply calculated using the `iw` text object which does not handle common path elements (e.g. `.`, `/`, `~`, etc).
2017-03-02lua: fix luacheck warnings in pluginsMarc André Tanner1-3/+0
2017-03-02lua: use goto label to mimic continue statementMarc André Tanner1-41/+36
This is a Lua 5.2 feature supported by LuaJIT.
2017-03-02lua: let number increment/decrement handle next numberMarc André Tanner1-37/+47
Operate on the next number to the right of the cursor, for now the matches are not restricted to the current line. Based on a patch from Denis Warsow. Close #509
2017-03-01lua: return nil for invalid text objectsMarc André Tanner1-2/+2
2017-03-01vis-lua: make cursor.pos return nil if cursor position is invalidMarc André Tanner1-1/+3
It remains to be seen whether that is a good idea, but at least it will reveal possible bugs.
2017-02-28lua: reimplement number increment <C-a> and decrement <C-x>Marc André Tanner2-0/+55
Based on a patch by Denis Warsow. Stuff which could probably be improved: - in vim the cursor does not need to be on top of the number, it suffices to be on the same line. - decrementing beyond zero does not work for hexadecimal and octal numbers, vim seems to wrap around in this case. 0x00000000 <C-x> becomes 0xffffffff Close #506
2017-02-28lua: move digraph handling to separate 'plugin'Marc André Tanner3-24/+27
Load a standard plugins directly from vis-std.lua.
2017-02-25lexers: sync with scintillua changeset 594 rev 6e29a8d2a783Marc André Tanner26-60/+71
Stuff which was left out / our local changes include: - lexer.lua: different loading mechanism and style handling - ansi_c.lua: for now we keep the separate token definitions with references to the respective standards. This should highlight file names after #include directives. It will also treat simple, non-nested occurrences of #if 0 ... #endif as a comment. - pkgbuild.lua: the arch specific fields have been kept - all scintilla $(style variables) have been replaced
2017-02-23vis-lua: use shorter type namesMarc André Tanner1-1/+1
2017-02-22lua: add file:match_at method to match LPeg pattern around a positionMarc André Tanner1-0/+31
2017-02-22lua: expose vis:module_exist method, load lexer and lpeg module during startupMarc André Tanner2-21/+25
2017-02-07Allow {} to be nested in shell variablesS. Gilles1-1/+1
This allows lines like : ${FOO:="${bar}/baz"} to be highlighted correctly.
2017-02-02lexer: fix scheme token rule orderingMarc André Tanner1-1/+1
This should fix #412 properly.
2017-02-02update comment and readme about lua pathChristian Hesse1-1/+2
Commit 3570869c removed the lexers sub directory from the Lua search path. Update the comment and readme to reflect this change.
2017-01-31vis: add workaround for broken color handling in Terminal.appMarc André Tanner1-0/+3
Terminal.app sets $TERM=xterm-256color and ships a corresponding terminfo description advocating that it is capable of color changes to the 256 color palette when in fact it can not. We introduce a new boolean option "change-256colors" which is true by default but can be used to disable color changes. It is automatically set if Terminal.app is detected using $TERM_PROGRAM. This should fix display artifacts as described in #456.
2017-01-27vis-digraph: add utility to handle digraphsjosuah1-0/+24
Hook it up via Lua to <C-k> in insert and replace mode. Close #460 #475
2017-01-19lexer: sync with scintillua changeset 582 rev d70a5ee43d38Marc André Tanner106-119/+131
2017-01-19lexer: update READMEMarc André Tanner1-12/+18
2017-01-19lexer: update C lexer to C11 and add POSIX errno constantsMarc André Tanner1-6/+50
The most apparent change is that NULL is now also highlighted, the themes might need to be tweaked a bit. Based on an initial patch by Christian Hesse. Close #307
2017-01-18lexer: add lexer for Parallax Spin languageDavid B. Lamkins2-0/+138
Close #466
2017-01-05lua: adjust C lexer to recognize POSIX typesS. Gilles1-3/+6
2017-01-05theme: pretend that specifying color numbers doesn't workS. Gilles1-16/+16
2016-12-29Add rc lexerMichael Forney1-0/+65
2016-12-14lua: make sure we always load a default themeMarc André Tanner2-1/+2
2016-12-14lua: improve error message when failing to load lpeg/lexer moduleMarc André Tanner2-9/+22
Differentiate between the case where the module is not found and the case where an error occured while loading it. This should make it easier to debug cases in which there is a Lua version mismatch between vis and lpeg.
2016-12-14lua: avoid errors if no theme is setMarc André Tanner1-7/+7
Close #429
2016-12-14lua: add crontab file type and configure it to save in-placeMarc André Tanner1-0/+4
This should fix isses with `crontab -e` editing.
2016-12-14lua: allow per file type :commands being executedMarc André Tanner1-3/+11
2016-12-14lua: use Lua patterns to match file extensionsMarc André Tanner1-125/+120
2016-12-09vis-lua: add comment about possibly outdated Lua API documentationMarc André Tanner1-1/+1