aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/vim.lua
Commit message (Collapse)AuthorAge
...
* lua: metatable for empty dict valueBjörn Linse2020-01-01
|
* Fix access on vim.wo (#11517)Ashkan Kiani2019-12-07
| | | * Add more tests for vim.wo
* Add vim.cmd as an alias for nvim_command (#11446)Ashkan Kiani2019-12-01
|
* Return nil instead of NIL for vim.env (#11486)Ashkan Kiani2019-12-01
|
* lua: make vim.wo and vim.bo used nested indexing for specified handleBjörn Linse2019-11-26
| | | | | Also missing option should be an error. Options are functionality, not arbitrary variable names (as for vim.g)
* Lua: vim.env, vim.{g,v,w,bo,wo} #11442Ashkan Kiani2019-11-24
| | | | | | | | - Add vim variable meta accessors: vim.env, vim.{g,v,w,bo,wo} - Redo gen_char_blob to generate multiple blobs instead of just one so that multiple Lua modules can be inlined. - Reorder vim.lua inclusion so that it can use previously defined C functions and utility functions like vim.shared and vim.inspect things. - Inline shared.lua into nvim, but also keep it available in runtime.
* doc: Lua [ci skip] #11378Justin M. Keyes2019-11-17
| | | | - Rework :help lua-commands - Rename if_lua.txt => lua.txt
* lua LSP client: initial implementation (#11336)Ashkan Kiani2019-11-13
| | | | | | Mainly configuration and RPC infrastructure can be considered "done". Specific requests and their callbacks will be improved later (and also served by plugins). There are also some TODO:s for the client itself, like incremental updates. Co-authored by at-tjdevries and at-h-michael, with many review/suggestion contributions.
* Lua: mark some functions as "private"Justin M. Keyes2019-11-11
| | | | | | Problem: scripts/gen_vimdoc.py gets confused and tries to generate docs for `fn_index` and `func`. Solution: Rename them to be private.
* paste: Select-mode, Visual-mode #11360Justin M. Keyes2019-11-09
| | | fix #11344
* doc: vim.fn, vim.call(), vim.api [ci skip]Justin M. Keyes2019-11-06
|
* lua: add vim.fn.{func} for direct access to vimL functionBjörn Linse2019-10-27
| | | | | | | | compared to vim.api.|nvim_call_function|, this fixes some typing issues due to the indirect conversion via the API. float values are preserved as such (fixes #9389) as well as empty dicts/arrays. Ref https://github.com/norcalli/nvim.lua for the call syntax
* tree-sitter: rename tree_sitter => treesitter for consistencyBjörn Linse2019-09-28
|
* tree-sitter: add basic testing on ciBjörn Linse2019-09-28
| | | | build tree-sitter c parser on ci for testing purposes
* paste: fix handling of "<" in cmdline (#11094)Daniel Hahler2019-09-25
| | | Fixes https://github.com/neovim/neovim/issues/11088.
* Merge #10995 'paste: fix paste in terminal mode'Justin M. Keyes2019-09-11
|\
| * paste: fix paste in terminal modeBjörn Linse2019-09-11
|/
* docJustin M. Keyes2019-09-11
| | | | | fix #10127 fix #5972
* doc: |api-fast| [ci skip]Justin M. Keyes2019-09-09
|
* paste: fix normal-mode paste by different approach #10976Justin M. Keyes2019-09-09
| | | | | | | | Forcing insert-mode after the first paste-chunk seems to work, as an alternative to a9e2bae0eb69 (insert-before-cursor). NB: Dot-repeat needs to match the original action. Since a9e2bae0eb69 changed paste to insert-before-cursor, dot-repeat must also. But that makes dot-repeat unpleasant/unusual.
* paste: insert before cursor alwaysJustin M. Keyes2019-09-08
| | | | | | | | | Inserting "after" the cursor in Normal-mode, for big paste-streams, is not reliable: sometimes the text "after" the cursor ends up in the middle of the pasted text. Maybe the cursor position is not updated? To avoid weird behavior, always paste "before". Maybe nvim_put() or vim.paste() can be fixed more properly later.
* paste: do not clobber msg area for small pastesJustin M. Keyes2019-09-08
|
* paste/cmdline: discard all chunks after first lineJustin M. Keyes2019-09-08
| | | | | | Problem: If multiple paste "chunks" are streamed, chunks after the first line are pasted into the buffer. Solution: Check for cmdline-mode for all chunks in a paste-stream.
* paste: reset 'paste' option immediately #10974Justin M. Keyes2019-09-08
| | | | | | - Workaround #10966: 'paste' option is not always reset. - In any case there's not much reason to wait until phase=3, because pasting in cmdline-mode skips lines after the first line (thus the `:set paste .. :set nopaste` dance happens only ~once).
* paste: redraw at endJustin M. Keyes2019-09-02
| | | | | | | | | | | | | | | | | | | | | | | Attempt to fix test failure since 976c6667e140 removed per-chunk redraw: ERROR test/functional/terminal/tui_spec.lua: TUI paste: cmdline-mode inserts 1 line test/functional/terminal/tui_spec.lua:367: in function <test/functional/terminal/tui_spec.lua:360 Expected: |*foo | |* | |{4:~ }| |{4:~ }| |{5:[No Name] [+] }| |:"line 1{1:"} | |{3:-- TERMINAL --} | Actual: |* | |*{4:~ }| |{4:~ }| |{4:~ }| |{5:[No Name] [+] }| |:"line 1{1:"} | |{3:-- TERMINAL --} |
* paste: one undo-block per streamJustin M. Keyes2019-09-02
| | | | | | - All "chunks" in a paste-stream should form a single undo-block. Side effect of 7a8579288424 was to create an undo-block for each chunk. - Also: remove old :redraw force logic, irrelevant after 7a8579288424.
* paste: make vim.paste() "public"Justin M. Keyes2019-08-27
|
* paste: implement redo (AKA dot-repeat)Justin M. Keyes2019-08-27
| | | | | | - Normal-mode redo idiom(?): prepend "i" and append ESC. - Insert-mode only needs AppendToRedobuffLit(). - Cmdline-mode: only paste the first line.
* paste: insert text "before" cursor in Insert-modeJustin M. Keyes2019-08-27
|
* API: nvim_pasteJustin M. Keyes2019-08-27
|
* paste: phases, dotsJustin M. Keyes2019-08-27
| | | | | | - Send `phase` parameter to the paste handler. - Redraw at intervals and when paste terminates. - Show "..." throbber during paste to indicate activity.
* API: nvim_put: "follow" parameterJustin M. Keyes2019-08-27
|
* paste: use nvim_put()Justin M. Keyes2019-08-27
|
* paste: use chansend() in Terminal-modeJustin M. Keyes2019-08-27
|
* paste: fixup testsJustin M. Keyes2019-08-27
|
* paste: abort paste if handler does not return trueJustin M. Keyes2019-08-27
|
* TUI/paste: always flush on paste mode-changeJustin M. Keyes2019-08-27
| | | | | | Flush input before entering, not only when leaving, paste mode. Else there could be pending input which will erroneously be sent to the paste handler.
* TUI/paste: define paste function as Lua builtinJustin M. Keyes2019-08-27
| | | | | | | - Define in Lua so that it is compiled-in (available with `-u NONE`). TODO: Eventually we will want a 'pastefunc' option or some other way to override the default paste handler.
* lua/stdlib: cleanupJustin M. Keyes2019-08-27
|
* libluv: use luv_set_callback to control callback executionBjörn Linse2019-06-30
| | | | | Disable the use of deferred API functions in a fast lua callback Correctly display error messages from a fast lua callback
* lua/shared: share trim() implJustin M. Keyes2019-05-20
|
* Merge #9709 'fileio: use os_copy to create backups'Justin M. Keyes2019-05-20
|\ | | | | | | ref #8288
* | lua/shared: share more stuffJustin M. Keyes2019-05-19
| | | | | | | | | | Leave trim() in vim.lua, because gen_vimdoc.py needs at least one function in there, else it gets confused...
* | lua/shared: share deepcopy() with test/*Justin M. Keyes2019-05-19
| | | | | | | | deepcopy() was duplicated in test/helpers.lua
* | gen_vimdoc.py: support lua/shared.lua module [ci skip]Justin M. Keyes2019-05-19
| |
* | Document the vim.lua functionsKillTheMule2019-05-18
| |
* | lua/stdlib: Introduce vim.sharedJustin M. Keyes2019-05-18
|/ | | | | | | | | | This is where "pure functions" can live, which can be shared by Nvim and test logic which may not have a running Nvim instance available. If in the future we use Nvim itself as the Lua engine for tests, then these functions could be moved directly onto the `vim` Lua module. closes #6580
* lua: expose full interface of vim.inspect and add testBjörn Linse2019-01-14
| | | | | | Implement lazy loading for vim.submodule, this would be over-engineering for inspect only, but we expect to use this solution also for more and larger modules.
* lua/stdlib: Load runtime modules on-demandJustin M. Keyes2019-01-14
| | | | | | | | | | Instead of eager-loading during plugin/* sourcing, define runtime modules such as `vim.inspect` as lazy builtins. Otherwise non-builtin Lua modules such as `vim.inspect` would not be available during startup (init.vim, `-c`, `--cmd`, …). ref #6580 ref #8677
* lua/stdlib: vim.inspect, string functionsKillTheMule2019-01-14
| | | | | ref #6580 ref #8677