aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
Commit message (Collapse)AuthorAge
* 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
| |/
* / fix(api): fix nvim_buf_set_extmarkerw72021-10-07
|/ | | | Fix the problem of calling clear_virttext on undefined variables.
* fix(docs): add win_config.cJustin M. Keyes2021-10-05
|
* fix(docs): duplicate tag, wrong formattingJustin M. Keyes2021-10-05
| | | | | | | Fixes build error: cd /usr/home/build/neovim/build/runtime && /usr/local/bin/cmake -E remove doc/* && /usr/local/bin/cmake -E copy_directory /usr/home/build/neovim/runtime/doc doc && /usr/home/build/neovim/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ ++t\ doc -c quit Error detected while processing command line: E154: Duplicate tag "vim.register_keystroke_callback()" in file doc/lua.txt
* feat(api): named marks set, get, delete #15346Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | Adds the following API functions. - nvim_buf_set_mark(buf, name, line, col) * Set marks in a buffer. - nvim_buf_del_mark(buf, name) * Delete a mark that belongs to buffer. - nvim_del_mark(name) * Delete a global mark. - nvim_get_mark(name) * Get a global mark. Tests: - Adds test to all the new api functions, and adds more for the existing nvim_buf_get_mark. * Tests include failure cases. Documentation: - Adds documentation for all the new functions, and improves the existing fucntion docs.
* docs: fix typoAditya Kurdunkar2021-10-04
|
* Merge pull request #15901 from bfredl/apiorgBjörn Linse2021-10-04
|\ | | | | refactor(api): re-organanize public and private API functions
| * refactor(api): move window config related functions to own fileBjörn Linse2021-10-04
| |
| * refactor(api): make export of functions opt-in, not opt-outBjörn Linse2021-10-03
| |
* | refactor: remove redundant char casts #15888dundargoc2021-10-04
|/
* Merge pull request #15516 from bfredl/keysetBjörn Linse2021-10-03
|\ | | | | refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
| * refactor(api): handle option dicts properlyBjörn Linse2021-10-03
| | | | | | | | | | | | | | Do not copy a lot of lua strings (dict keys) to just strequal() them Just compare them directly to a dedicated hash function. feat(generators): HASHY McHASHFACE
* | fix(nvim_open_win): crash if autocmds delete buffer/window #15549Sean Dewar2021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | win_set_buf can trigger autocmds if noautocmd=false. If they close the window, code afterwards will dereference the freed win_T* wp pointer. This interaction became possible after commit 1def3d1542d6a65f057e743faea39a760b50db87. The reason deleting curbuf crashes, and not the buf passed to `nvim_open_win`, is because the float initially edits curbuf (`win_init`) until it's later set to edit buf (windows from `:new` and `:split <buf>` behave similiarly: approx. `:split`, then `:buffer <buf>`). `do_buffer` closes windows when their edited buffer is deleted (unless it's the only window; N/A for floats), so the float closes when curbuf is deleted, so we need to check `win_valid` after `win_set_buf` too. Closes #15548
* | fix(float)!: always anchor to corner of window including border #15832zeertzjq2021-10-02
|/ | | | | | | | | | N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the window (including border). This line may also need change in this case (change 0 to -1): This is most consistent and easiest to reason about, especially with GUIs whose border do not need to have width/height of 1/1 in cell units. Fix #15789
* Refactor/uncrustify (#15790)dundargoc2021-09-29
| | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* feat(decorations): support virtual lines (for now: only one block at a time)Björn Linse2021-09-26
|