Commit Graph

261 Commits

Author SHA1 Message Date
Christian Clason
f2894bffb0
lua: Add highlight.on_yank (#12279)
* 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
2020-05-18 09:49:50 -04:00
TJ DeVries
a6be7a9180
doc: Vim internal variables & options in lua (#12302)
* doc: Add info about vim dicts in lua

* doc: preamble and info

* doc: remove weird spacing

* fixup
2020-05-17 23:29:34 -04:00
Tristan Konolige
bf0f745861
lua: allow deepcopy of functions (#12136) 2020-04-19 01:04:37 +02:00
Björn Linse
9c00fea585 lua: add regex support, and @match support in treesitter queries 2020-02-26 19:39:02 +01:00
Björn Linse
00c57c98df treesitter: add standard &rtp/parser/ search path for parsers 2020-02-07 09:22:55 +01:00
Justin M. Keyes
9231684986
doc [ci skip] #11656 2020-01-12 23:41:55 -08:00
Björn Linse
ea4127e9a7 lua: metatable for empty dict value 2020-01-01 19:26:29 +01:00
Justin M. Keyes
c24f8f46b4 gen_vimdoc.py: sort by name 2019-12-30 03:31:32 -08:00
Björn Linse
440695c296 tree-sitter: implement query functionality and highlighting prototype [skip.lint] 2019-12-22 12:51:46 +01:00
Justin M. Keyes
fd5710ae9a
doc + extmarks tweaks #11421
- nvim_buf_get_extmarks: rename "amount" => "limit"
- rename `set_extmark_index_from_obj`
2019-11-25 01:08:02 -08:00
Justin M. Keyes
af53a0c012
doc: Lua [ci skip] #11378
- Rework :help lua-commands
- Rename if_lua.txt => lua.txt
2019-11-17 19:06:59 -08:00