aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua
Commit message (Collapse)AuthorAge
...
* | treesitter: separate tree and parserThomas Vigouroux2020-11-04
|/ | | | While this might sound silly, it is needed for further improvements.
* startup: handle autoload and lua packages during startupBjörn Linse2020-11-02
| | | | ¡NO HAY BANDA!
* Merge pull request #12870 from bfredl/themeparkBjörn Linse2020-11-01
|\ | | | | Color themes (per window/line) and lua theme providers
| * api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | | | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* | Merge pull request #13192 from bfredl/nodeidBjörn Linse2020-11-01
|\ \ | | | | | | ] treesitter: add node:id()
| * | treesitter: add node:id()Björn Linse2020-11-01
| |/
* | treesitter: fix wrong string formattingThomas Vigouroux2020-11-01
| |
* | tree-sitter: error out when parsing failsThomas Vigouroux2020-11-01
|/ | | | | This can happen when there is ABI mismatches, and removes the assumption parsing alwasy succeeds (which is wrong).
* treesitter: allow custom parser for highlighterThomas Vigouroux2020-10-12
| | | | | | | | | | | Also allow to get parser ranges. This will be useful for language injection, allowing us to tweak the parser's ranges on the fly. Update runtime/lua/vim/treesitter.lua Co-authored-by: Paul Burlumi <paul@burlumi.com>
* api: multiple decoration providers at onceBjörn Linse2020-10-10
|
* treesitter: check language ABI version on loadThomas Vigouroux2020-10-08
| | | | This is will avoid some issues at runtime.
* lua: vim.wait allows control of fast events (#13053)TJ DeVries2020-10-06
| | | | | | | | | * lua: vim.wait allows control of fast events * fixup: remove requirement of function for easier waiting * fixup: lint * fixup: bfredl comments
* treesitter: add string parser (#13008)Thomas Vigouroux2020-09-30
|
* lua: cleanup naming conventions of executor functionsBjörn Linse2020-09-10
|
* treesitter: use new on_bytes interfaceBjörn Linse2020-09-09
| | | | | | | | | | This will significantly reduce the parsing work needed e.g. when rehighlighting after every keypress in insert mode. Also add safety check for tree-sitter trying to read past the end of a line. This can happen after we sent an incorrect buffer update.
* treesitter: add node:field() to get field childrenThomas Vigouroux2020-09-01
|
* treesitter: allow to iterate over node childrenThomas Vigouroux2020-08-31
|
* lua: add vim.register_keystroke_callback (#12536)TJ DeVries2020-08-14
| | | | | | | | | | | | | | | * feat: Add vim.register_keystroke_callback * fixup: Forgot to remove mention of old option * fixup: Answer jamessan comments * fixup: Answer norcalli comments * fixup: portability * Update runtime/doc/lua.txt Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
* fix: runtimepath always updates lua package.pathTJ DeVries2020-08-10
|
* Merge pull request #12653 from erw7/fix-build-freebsd-ciJames McCoy2020-07-20
|\ | | | | build: Fix build failure with CI in FreeBSD
| * build: Fix build failure with CI in FreeBSDerw72020-07-20
| | | | | | | | Co-authored-by: James McCoy <jamessan@jamessan.com>
* | lua: Fix crash on unprotected lua errors (#12658)TJ DeVries2020-07-19
|/ | | | | | | | | | | | | | | | | | Can be reproduced with a script like this: -- in some lua file vim.fn.timer_start(10, function() error("uh....") end) -- will cause neovim to crash with the following error. PANIC: unprotected error in call to Lua API (nlua_CFunction_func_call failed.) After this, it will instead print the error message from the top of the stack, like so. tmp/error_nvim.lua:10: uh... Also added an example test. Previously this test caused the embedded nvim to panic.
* lua: Add ability to pass tables with __callTJ DeVries2020-07-10
| | | | | | | | | | | | vim-patch:8.2.1054: not so easy to pass a lua function to Vim vim-patch:8.2.1084: Lua: registering function has useless code I think I have also opened up the possibility for people to use these callbacks elsewhere, since I've added a new struct that we should be able to use. Also, this should allow us to determine what the state of a list is in Lua or a dictionary in Lua, since we now can track the luaref as we go.
* lua: Add ability to pass lua functions directly to vimLTJ DeVries2020-07-10
|
* treesitter: call bufload before parsing (#12603)Thomas Vigouroux2020-07-10
|
* doc: mention that defer_fn applies schedule_wrap (#12601)Christian Clason2020-07-07
|
* lua: add options to highlight.on_yank (#12549)Christian Clason2020-07-05
| | | | | NOTE: Configuration options have changed for highlight.on_yank. Check help for |:help highlight.on_yank()|
* doc: fix scripts and regenerate (#12506)TJ DeVries2020-07-02
| | | | | | | | | | | | | | | | | * Fix some small doc issues * doc: fixup * doc: fixup * Fix lint and rebase * Remove bad advice * Ugh, stupid mpack files... * Don't let people include these for now until they specifically want to * Prevent duplicate tag
* treesitter: use single nodes in set_rangesThomas Vigouroux2020-06-29
| | | | fixup! treesitter: fix lint
* treesitter: fix lintThomas Vigouroux2020-06-29
|
* treesitter: use nodes to mark rangesThomas Vigouroux2020-06-29
|
* treesitter: fix some clint errorsThomas Vigouroux2020-06-29
| | | | Also fixes some mismatches on the name of the function
* treesitter: test newly added set_included_rangesThomas Vigouroux2020-06-29
|
* treesitter: add set_included_ranges to the parserThomas Vigouroux2020-06-29
| | | | This is the first step towards language injection using treesitter.
* treesitter: simplify puhstree call processThomas Vigouroux2020-06-23
|
* vim-patch:8.2.0111: VAR_SPECIAL is also used for booleansBilly Su2020-06-06
| | | | | | Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking. https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
* lua: vim.wait implementationTJ DeVries2020-05-30
|
* lua: vim.wait initial outlineBjörn Linse2020-05-30
|
* lua: Add highlight.on_yank (#12279)Christian Clason2020-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add lua function to highlight yanked region * extract namespace, better naming, default values * add default for event argument * free timer * factor out mark to position calculation * d'oh * make sure timer stops before callback (cf. luv example) * factor out timer, more documentation * fixup * validate function argument for schedule * fix block selection past eol * correct handling of multibyte characters * move arguments around, some cleanup * move utility functions to vim.lua * use anonymous namespaces, avoid local api * rename function * add test for schedule_fn * fix indent * turn hl-yank into proper (hightlight) module * factor out position-to-region function mark extraction now part of highlight.on_yank * rename schedule_fn to defer_fn * add test for vim.region * todo: handle double-width characters * remove debug printout * do not shadow arguments * defer also callable table * whitespace change * move highlight to vim/highlight.lua * add documentation * add @return documentation * test: add check before vim.defer fires * doc: fixup
* lua: Add buffer, window and tab accessors (#12268)TJ DeVries2020-05-07
| | | | | * Add buffer, window and tab accessors * Fix deletion and add tests
* paste: support replace mode (#11945)Jesse2020-05-05
| | | | | | * paste: support replace mode * Clean up Co-authored-by: Jesse Bakker <git@jessebakker.com>
* Merge #11851 'eval.c: factor out eval/userfunc.c'Justin M. Keyes2020-04-26
|\ | | | | | | vim-patch:7.4.2058
| * rename: user_funcs -> userfuncJakub Łuczyński2020-02-13
| | | | | | | | Lets stick with vim for now
| * fix: includesJakub Łuczyński2020-02-13
| |
* | treesitter: check for integer overflow (#12135)Thomas Vigouroux2020-04-22
| | | | | | | | | | | | | | Sometimes treesitter calls for an invalid column within a line, checking that the column is actually valid and forcing the value avoids an integer overflow and an infinite sequence of invalid reads. Fixes #12131
* | lua: add regex support, and `@match` support in treesitter queriesBjörn Linse2020-02-26
|/
* eval.c: factor out eval/funcs.c #11828Jakub Łuczyński2020-02-10
| | | | | | close #11828 ref #5081 cf. vim patch 7.4.2063
* treesitter: add standard &rtp/parser/ search path for parsersBjörn Linse2020-02-07
|
* lua: metatable for empty dict valueBjörn Linse2020-01-01
|
* clang/'Logic error': set ret_tv if non-nullJan Edmund Lazo2019-12-25
|