aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
Commit message (Collapse)AuthorAge
...
| * Address 'review'Michael Lingelbach2022-01-12
| |
| * feat(extmarks): add strict optionMichael Lingelbach2022-01-08
| | | | | | | | | | | | | | | | | | The strict option, when set to false, allows placing extmarks on invalid row and column values greater than the maximum buffer row or line column respectively. This allows for nvim_buf_set_extmark to be a drop-in replacement for nvim_buf_set_highlight.
* | feat(api, lua): more conversions between LuaRef and Vim Funcrefzeertzjq2022-01-13
| |
* | fix(api): validate user_command name (#17004)Lewis Russell2022-01-09
|/ | | | The name argument of nvim_add_user_command must begin with an uppercase character. Check that is does.
* 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>
* perf(api): elide luaref copy when setting 'callback' in nvim_set_keymapBjörn Linse2022-01-01
|
* 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
|
* Merge pull request #16630 from kylo252/unused-includesBjörn Linse2021-12-26
|\ | | | | refactor(build): remove unused includes
| * refactor(build): remove unused includeskylo2522021-12-12
| |
* | 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').
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* Merge pull request #16547 from pekdon/sunosJames McCoy2021-12-09
|\ | | | | Portability improvements, first steps at getting neovim on x86_64 SunOS
| * fix: add STRNLEN compatability macroClaes Nästén2021-12-06
| | | | | | | | | | Older SunOS systems come without strnlen, add STRNLEN macro in line with the other str* compat macros.
* | 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.
* | fix(api): allow nvim_buf_set_extmark to accept end_row key (#16548)Gregory Anders2021-12-08
|/ | | | | | | nvim_buf_get_extmark uses "end_row" rather than "end_line" in its 'details' dict, which means callers must modify the key names if they want to re-use the information. Change the parameter name in nvim_buf_set_extmark to "end_row" and use "end_line" as an alias to make this more consistent.
* feat(api): add nvim_get_option_valueGregory Anders2021-12-04
|
* chore: fix typos (#16361)dundargoc2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com> Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* 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: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* 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
|
* feat(decorations): support more than one virt_lines blockBjörn Linse2021-10-23
|
* 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(gen_vimdoc.py): spacing around inline elements #16092Gregory Anders2021-10-19
| | | | | | | | | | The spacing fix drew attention to a couple of places that were using incorrect formatting such as the key listing for `nvim_open_win`, so those were fixed too.
* | 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
|
* refactor: format all C files under nvim/ #15977dundargoc2021-10-12
| | | | | | | | * refactor: format all C files under nvim * refactor: disable formatting for Vim-owned files: * src/nvim/indent_c.c * src/nvim/regexp.c * src/nvim/regexp_nfa.c * src/nvim/testdir/samples/memfile_test.c
* refactor: format header files with uncrustify #15877dundargoc2021-10-09
| | | | | | * refactor: format header files with uncrustify * fixup(justin): skip formatting of terminfo_defs.h * fixup: force winsock2 to be included first * fixup: simplify disable/enable directive to "uncrustify:off/on"
* Merge pull request #15839 from bfredl/encgruggBjörn Linse2021-10-07
|\ | | | | refactor(api): some cleanup
| * refactor(api): cleanup modify_keymap and parse_keymap_optsBjörn Linse2021-10-07
| |
* | Merge pull request #15934 from kylo252/replacement-sizeBjörn Linse2021-10-07
|\ \ | | | | | | fix(lint): remove redundant ternary operator
| * | fix(lint): remove redundant ternary operatorkylo2522021-10-06
| |/ | | | | | | | | The value of `new_len` will never be '0' since `replacement.size` is checked against that early on.
* | Merge pull request #15941 from dundargoc/refactor/remove-redundant-castsBjörn Linse2021-10-07
|\ \ | | | | | | refactor: remove redundant casts
| * | refactor: remove redundant castsDundar Göc2021-10-07
| |/