aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
Commit message (Collapse)AuthorAge
...
* docs: fix typos (#18269)dundargoc2022-06-04
| | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Dan Sully <dan+github@sully.org> Co-authored-by: saher <msaher.shair@gmail.com> Co-authored-by: Stephan Seitz <stephan.seitz@fau.de> Co-authored-by: Benedikt Müller <d12bb@posteo.de> Co-authored-by: Andrey Mishchenko <mishchea@gmail.com> Co-authored-by: Famiu Haque <famiuhaque@protonmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com>
* refactor(api): use a unpacker based on libmpack instead of msgpack-cbfredl2022-06-02
| | | | | | | | | | Currently this is more or less a straight off reimplementation, but this allow further optimizations down the line, especially for avoiding memory allocations of rpc objects. Current score for "make functionaltest; make oldtest" on a -DEXITFREE build: is 117 055 352 xfree(ptr != NULL) calls (that's NUMBERWANG!).
* Merge pull request #18194 from famiu/feat/usercmd_previewbfredl2022-05-31
|\ | | | | feat: user command "preview" (like inccommand)
| * feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | | | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
* | docs: clarify that nvim_strwidth counts control characters as one cell (#18802)zeertzjq2022-05-31
|/
* feat(nvim_create_user_command): pass structured modifiers to commandsFamiu Haque2022-05-29
| | | | | | | Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
* refactor: missing parenthesis may cause unexpected problems (#17443)kylo2522022-05-26
| | | related vim-8.2.{4402,4639}
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* Merge pull request #18528 from lewis6991/setwinoptbfredl2022-05-25
|\ | | | | feat(api): add `win` and `buf` to `nvim_set_option_value`
| * feat(api): add win and buf to nvim_set_option_valueLewis Russell2022-05-17
| | | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* | refactor: grid->rows and grid->colsbfredl2022-05-18
| |
* | feat(ui): add `'winbar'`Famiu Haque2022-05-18
|/ | | | | | | Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* docs(api): nvim_set_hl attributes #18558Oliver Marriott2022-05-15
|
* fix(api): nvim_eval_statusline should validate input #18347deforde2022-05-15
| | | | | Fix #18112 Make an exception for strings starting with "%!".
* docs(nvim_set_keymap): specify that optional arguments defaults to false ↵dundargoc2022-05-15
| | | | | (#18177) Closes: https://github.com/neovim/neovim/issues/16919
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* feat(nvim_parse_cmd): add range, count, reg #18383Famiu Haque2022-05-04
| | | | | Adds range, count and reg to the return values of nvim_parse_cmd. Also makes line1 and line2 be -1 if the command does not take a range. Also moves nvim_parse_cmd to vimscript.c because it fits better there.
* fix(coverity): use xstrndup() instead of vim_strsave() (#18363)zeertzjq2022-05-03
|
* fix(api): preserve `cmdmod` on `nvim_parse_cmd`Famiu Haque2022-05-02
|
* feat(api): add `nvim_parse_cmdline`Famiu Haque2022-04-30
| | | | Adds an API function to parse a command line string and get command information from it.
* refactor: replace char_u variables and functions with char (#18288)dundargoc2022-04-30
| | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.1.2145: cannot map <C-H> when modifyOtherKeys is enabledzeertzjq2022-04-29
| | | | | | | | | | | | | Problem: Cannot map <C-H> when modifyOtherKeys is enabled. Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected. https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of "special" is different between Vim and Nvim. Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs. Omit tests as they send terminal codes. Keep the behavior of API functions.
* refactor(terminal)!: drop winpty, require Windows 10 #18253erw72022-04-26
| | | | | | | | | | | Problem: winpty is only needed for Windows 8.1. Removing it reduces our build and code complexity. Solution: - Remove winpty. - Require Windows 10. closes #18252
* docs: make docstring consistent with parameters #18178dundargoc2022-04-23
| | | Closes: https://github.com/neovim/neovim/issues/12691
* refactor!: rename nvim_add_user_command to nvim_create_user_commandGregory Anders2022-04-10
|
* vim-patch:8.2.4723: the ModeChanged autocmd event is inefficientzeertzjq2022-04-10
| | | | | | | | | Problem: The ModeChanged autocmd event is inefficient. Solution: Avoid allocating memory. (closes vim/vim#10134) Rename trigger_modechanged() to may_trigger_modechanged(). https://github.com/vim/vim/commit/2bf52dd065495cbf28e28792f2c2d50d44546d9f Make v:event readonly for ModeChanged.
* chore(nvim_paste): assert the correct String (#17752)zeertzjq2022-03-24
|
* vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | Problem: Syntax coloring and highlighting is in one big file. Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan, closes vim/vim#4674) https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614 Name the new file highlight_group.c instead. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #17266 from famiu/feat/ui/global-statuslinebfredl2022-03-17
|\ | | | | feat(statusline): add global statusline
| * feat: add support for global statuslineFamiu Haque2022-03-18
| | | | | | | | | | | | | | | | | | | | Ref: #9342 Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`. Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`. The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
* | chore: fix typos (#17670)dundargoc2022-03-17
| | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | refactor: fix clint warnings (#17682)dundargoc2022-03-13
| |
* | docs(api): improve section on nvim_set_hl (#17692)adrian52022-03-13
| |
* | Merge pull request #17687 from zeertzjq/fix-channel-consistencyzeertzjq2022-03-13
|\ \ | | | | | | fix(channel): fix channel consistency
| * | fix(channel): fix channel consistencyerw72022-03-12
| | | | | | | | | | | | | | | | | | | | | - Fix the problem that chanclose() does not work for channel created by nvim_open_term(). - Fix the problem that the loopback channel is not released. - Fix the error message when sending raw data to the loopback channel.
* | | refactor(main): separate connection code from --remote execution codeBjörn Linse2022-03-12
|/ /
* | 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
| |