aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
Commit message (Collapse)AuthorAge
...
* | test(remote): add tests for --remoteCharlie Groves2022-03-11
| | | | | | | | This also fixes a fair number of issues found in running the tests
* | feat(remote): add basic --remote supportCharlie Groves2022-03-11
| | | | | | | | | | This is starting from @geekodour's work at https://github.com/neovim/neovim/pull/8326
* | Merge pull request #17663 from dundargoc/refactor/uncrustifybfredl2022-03-11
|\ \ | | | | | | refactor: apply uncrustify
| * | refactor(uncrustify): format all c filesDundar Göc2022-03-10
| | |
* | | refactor(decorations): move provider codeLewis Russell2022-03-10
|/ / | | | | | | Move decoration provider code to a separate file.
* | feat(api): relax statusline fillchar width checkzeertzjq2022-03-10
| | | | | | | | Treat fillchar as single-width even if it isn't.
* | fix: respect os_proc_children rv of pid not foundCharlie Groves2022-03-01
| | | | | | | | | | | | | | | | os_proc_children returns 2 if there's a failure in the underlying syscall. Only shell out to pgrep in that case. It returns 1 if the pid isn't found. In that case, we can roll forward with returning an empty list.
* | feat(lua): show proper verbose output for lua configurationshadmansaleh2022-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `:verbose` didn't work properly with lua configs (For example: options or keymaps are set from lua, just say that they were set from lua, doesn't say where they were set at. This fixes that issue. Now `:verbose` will provide filename and line no when option/keymap is set from lua. Changes: - compiles lua/vim/keymap.lua as vim/keymap.lua - When souring a lua file current_sctx.sc_sid is set to SID_LUA - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`. So it can be reused for lua files. - Added new function `nlua_get_sctx` that extracts current lua scripts name and line no with debug library. And creates a sctx for it. NOTE: This function ignores C functions and blacklist which currently contains only vim/_meta.lua so vim.o/opt wrappers aren't targeted. - Added function `nlua_set_sctx` that changes provided sctx to current lua scripts sctx if a lua file is being executed. - Added tests in tests/functional/lua/verbose_spec.lua - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose Note: These can't yet be directly set from lua but once that's possible :verbose should work for them hopefully :D - add :verbose support for nvim_exec & nvim_command within lua Currently auto commands/commands/functions ... can only be defined by nvim_exec/nvim_command this adds support for them. Means if those Are defined within lua with vim.cmd/nvim_exec :verbose will show their location . Though note it'll show the line no on which nvim_exec call was made.
* | feat(lua): add <f-args> to user commands callback (#17522)Javier Lopez2022-02-27
| | | | | | | | | | Works similar to ex <f-args>. It only splits the arguments if the command has more than one posible argument. In cases were the command can only have 1 argument opts.fargs = { opts.args }
* | feat(lua): add proper support of luv threadserw72022-02-26
| |
* | fix(highlight): accept NONE as a color name (#17487)Lewis Russell2022-02-21
| | | | | | | | | | | | | | | | ... for when `ns=0`. Also update the documentation of nvim_set_hl to clarify the set behaviour. Fixes #17478
* | Merge pull request #16678 from lewis6991/runtime_file_errbfredl2022-02-16
|\ \ | | | | | | fix(api): re-route nvim_get_runtime_file errors
| * | fix(api): re-route nvim_get_runtime_file errorsLewis Russell2022-02-15
| |/ | | | | | | This allows nvim_get_runtime_file to be properly used via pcall
* / docs: minor changes related to mapping descriptionzeertzjq2022-02-16
|/
* fix: autoload variables not loaded with vim.g & nvim_get_varshadmansaleh2022-02-13
|
* fix(api): use changedir_func() in nvim_set_current_dir()zeertzjq2022-02-10
| | | | Co-Authored-By: smolck <46855713+smolck@users.noreply.github.com>
* refactor(api): use a keyset for highlight dictsBjörn Linse2022-02-02
|
* Merge pull request #17187 from lewis6991/masterbfredl2022-02-01
|\ | | | | feat(highlight): ns=0 to set :highlight namespace
| * feat(highlight): ns=0 to set :highlight namespaceLewis Russell2022-02-01
| | | | | | | | Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
* | Merge pull request #17113 from zeertzjq/vim-8.2.2569zeertzjq2022-02-01
|\ \ | |/ |/| feat(statusline): support multibyte fillchar
| * feat(statusline): support multibyte fillcharzeertzjq2022-01-16
| | | | | | | | | | | | | | | | This includes a partial port of Vim patch 8.2.2569 and some changes to nvim_eval_statusline() to allow a multibyte fillchar. Literally every line of C code touched by that patch has been refactored in Nvim, and that patch contains some irrelevant foldcolumn tests I'm not sure how to port (as Nvim's foldcolumn behavior has diverged from Vim's).
* | Merge pull request #17143 from jamessan/coverity-fixesJames McCoy2022-01-24
|\ \ | | | | | | Various Coverity fixes
| * | fix(coverity/340720): error if nvim_eval_statusline given invalid winidJames McCoy2022-01-19
| |/
* / refactor: remove CSI unescaping and clean up related names and commentszeertzjq2022-01-21
|/
* fix(api): force redefinition of user commands by default (#16918)Gregory Anders2022-01-04
|
* chore: fix typos (#16816)dundargoc2022-01-04
| | | | | | | Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Sebastian Volland <seb@baunz.net> Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* feat(api): add support for lua function & description in keymapshadmansaleh2022-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behavioral changes: 1. Added support for lua function in keymaps in -------------------------------------------- - nvim_set_keymap Can set lua function as keymap rhs like following: ```lua vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references}) ``` Note: lua function can only be set from lua . If api function being called from viml or over rpc this option isn't available. - nvim_{buf_}get_keymap When called from lua, lua function is returned is `callback` key . But in other cases callback contains number of the function ref. - :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly. - :map commands for displaing rhs . For lua keymaps rhs is displayed as <Lua function ref_no> Note: lua keymap cannot be set through viml command / functions. - mapargs() When dict is false it returns string in `<Lua function ref_no>` format (same format as :map commands). When dict is true it returns ref_no number in `callback` key. - mapcheck() returns string in `<Lua function ref_no>` format (same format as :map commands). 2. Added support for keymap description --------------------------------------- - nvim_{buf_}set_keymap: added `desc` option in opts table . ```lua vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'}) ``` - nvim_{buf_}get_keymap: contains `desc` in returned list. - commands like `:nmap <leader>w` will show description in a new line below rhs. - `maparg()` return dict contains `desc`.
* Merge pull request #16752 from gpanders/lua-user-commandsBjörn Linse2021-12-28
|\ | | | | feat(api): implement nvim_{add,del}_user_command
| * feat(api): implement nvim_{add,del}_user_commandGregory Anders2021-12-28
| | | | | | | | | | Add support for adding and removing custom user commands with the Nvim API.
* | chore: fix typos (#16506)dundargoc2021-12-28
|/ | | | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com> Co-authored-by: Alef Pereira <ealefpereira@gmail.com> Co-authored-by: AusCyber <willp@outlook.com.au> Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
* fix(api): nvim__set_hl_ns causes extra redrawsBjörn Linse2021-12-26
|
* fix(api): make nil value in nvim_set_option_value clear local value (#16710)Gregory Anders2021-12-21
| | | | For special options such as 'undolevels' and 'scrolloff', this sets the local value to the special "unset" value (e.g. -12345 for 'undolevels').
* fix: check for interrupt in nvim_echo, write_msg and nlua_print (#16537)ii142021-12-08
| | | | | Fixes `q` in more pager, where `:highlight` can be quit out of with a single `q` keystroke, while in `:lua print(vim.inspect(vim))` it just scrolls down a page.
* feat(api): add nvim_get_option_valueGregory Anders2021-12-04
|
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* fix(channel): fix channels opened by nvim_open_term() never being freedzeertzjq2021-11-11
|
* Merge pull request #16131 from jamessan/vim-8.1.0306James McCoy2021-11-01
|\
| * vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | | | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* | refactor(api/marks)!: add opts param for feature extensibility (#16146)Javier Lopez2021-11-01
|/ | | | | In the future we might want to extend the concept of named marks and adding opts reduces the need of changing the function signature in the furute.
* refactor: uncrustify #16090dundargoc2021-10-29
|
* refactor(api): break out Vim script functions to its own fileBjörn Linse2021-10-29
|
* refactor(api): break out vim_to_object/object_to_vim to own fileBjörn Linse2021-10-29
|
* refactor(api): move extmark API to its own fileBjörn Linse2021-10-25
|
* Merge pull request #16086 from bfredl/termpipe_inputBjörn Linse2021-10-20
|\ | | | | feat(nvim_open_term): support input callback in lua
| * feat(nvim_open_term): support input callback in luaBjörn Linse2021-10-20
| |
* | fix(api/nvim_eval_statusline): allow maxwidth=0 #16080Famiu Haque2021-10-19
|/ | | | Allows disabling statusline truncation by allowing maxwidth to be set to 0 in `nvim_eval_statusline`.
* feat(api): evaluate statusline string #16020Famiu Haque2021-10-18
| | | | | | Adds API function `nvim_eval_statusline` to allow evaluating a statusline string and obtaining information regarding it. Closes https://github.com/neovim/neovim/issues/15849
* fix(runtime): don't use regexes inside lua require'mod'Björn Linse2021-10-17
| | | | | | | | | | | | Fixes #15147 and fixes #15497. Also sketch "subdir" caching. Currently this only caches whether an rtp entry has a "lua/" subdir but we could consider cache other subdirs potentially or even "lua/mybigplugin/" possibly. Note: the async_leftpad test doesn't actually fail on master, at least not deterministically (even when disabling the fast_breakcheck throttling). It's still useful as a regression test for further changes and included as such.
* refactor: reduce number of unique char castsDundar Göc2021-10-13
|
* refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|