aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * vim-patch:9.0.1686: undotree() only works for the current buffer (#24665)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | | | | | | | Problem: undotree() only works for the current buffer Solution: Add an optional "buffer number" parameter to undotree(). If omitted, use the current buffer for backwards compatibility. closes: vim/vim#4001 closes: vim/vim#12292 https://github.com/vim/vim/commit/5fee11114975b7405b7ccd3ee8758e54bf559760 Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
| * feat(defaults): treat "•" as a list item prefix #24623Justin M. Keyes2023-08-09
| | | | | | | | | | | | | | | | Problem: Nvim docs use "•" as a list item prefix but `gw{motion}` doesn't format such lists by default. Solution: Change the 'comments' option to include "fb:•" by default.
| * Merge pull request #24631 from clason/vim-c2bd205254c8zeertzjq2023-08-10
| |\ | | | | | | vim-patch:{c2bd205254c8,0401933a5be3}: typo fixes
| | * vim-patch:c2bd205254c8Christian Clason2023-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change "the" to "then" under ':help bufload()' (vim/vim#12662) https://github.com/vim/vim/commit/c2bd205254c89ecf46e08965f53d7991315d9c98 N/A commits: vim-patch:64dea84bb05a (we have our own manpager at home) vim-patch:958e15bb1c7d (we have our own editorconfig syntax file) vim-patch:c41b3c9f95ac (we don't have defaults.vim) Co-authored-by: Daniel Steinberg <dstein64@users.noreply.github.com>
| * | fix(api): revert unintended change of optional bool paramsbfredl2023-08-09
| |/ | | | | | | | | | | | | | | | | | | Currently (as of nvim 0.9), the behavior of boolean params in vim.api lua wrappers is inconsistent for optional parameters (part of an `opts` dict) compared to positional parameters. This was inadvertently changed in #24524 . While cleaning up this inconsistency is something we might want eventually, it needs to be discussed separately and the impact of existing code considered.
| * fix(lua): improve annotations for stricter luals diagnostics (#24609)Christian Clason2023-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: luals returns stricter diagnostics with bundled luarc.json Solution: Improve some function and type annotations: * use recognized uv.* types * disable diagnostic for global `vim` in shared.lua * docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type) * add type alias for lpeg pattern * fix return annotation for `vim.secure.trust` * rename local Range object in vim.version (shadows `Range` in vim.treesitter) * fix some "missing fields" warnings * add missing required fields for test functions in eval.lua * rename lsp meta files for consistency
| * docs(builtin): fix some missing lines (#24615)Sean Dewar2023-08-08
| | | | | | | | | | | | These two functions seem to have previously had their docs start on the same line as the signature, which I guess contributed to the lines being lost (though I checked all other such functions from before again and these were the only two).
| * build(deps): bump tree-sitter to HEAD - 0a1c4d846 (#24607)Christian Clason2023-08-08
| | | | | | | | adapt to breaking change in `ts_query_cursor_set_max_start_depth` https://github.com/tree-sitter/tree-sitter/pull/2278
| * Merge pull request #24524 from bfredl/typed_keysbfredl2023-08-07
| |\ | | | | | | refactor(api): use typed keysets
| | * feat(lua): specific error messages for type checking `opts` paramsbfredl2023-08-07
| | |
| | * refactor(api): use typed keysetsbfredl2023-08-07
| | | | | | | | | | | | | | | Initially this is just for geting rid of boilerplate, but eventually the types could get exposed as metadata
| | * feat(lua): more specific error messages for vim.api type checkingbfredl2023-08-04
| | |
| * | fix(inccommand): don't set an invalid 'undolevels' value (#24575)zeertzjq2023-08-05
| | | | | | | | | | | | | | | | | | | | | Problem: Cannot break undo by setting 'undolevels' to itself in 'inccommand' preview callback. Solution: Don't set an invalid 'undolevels' value. Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
| * | docs(options): fix mistakes (#24568)zeertzjq2023-08-05
| | |
| * | docs(options): take ownership of options.txt (#24528)Lewis Russell2023-08-04
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * docs(options): take ownership of options.txt - `src/nvim/options.lua` is now the source of truth - generate runtime/lua/vim/_meta/options.lua * fixup! zeer comments * fixup! zeer comments (2) * fixup! re-enable luacheck * fixup! regen
| * fix(terminal): forward horizontal mouse scrolling (#24552)zeertzjq2023-08-04
| |
| * fix(terminal): include modifiers when forwarding mouse (#24549)zeertzjq2023-08-04
| |
| * docs: miscJustin M. Keyes2023-08-03
| | | | | | | | Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
| * docs(lua): fix generated `fname` param annotations #24533Marc Jakobi2023-08-02
| |
| * docs(builtin): fix alignment of comments in code blocks (#24529)zeertzjq2023-08-02
| |
| * docs: drop "Can also be used as a method" #24508Justin M. Keyes2023-08-01
| | | | | | | | | | | | | | | | Now that we "own" builtin.txt, we cant remove the repetitive mention of Vimscript's UFCS syntax. It's noisy to mention this for each function, and it's also not a Vimscript feature that should be encouraged. Also change the builtin.txt heading to "NVIM REFERENCE MANUAL", which indicates when a help file is Nvim-owned.
| * feat(lua-types): types for vim.api.* (#24523)Lewis Russell2023-08-01
| |
| * docs(builtin): fix and annotate language blocks (#24506)Lewis Russell2023-08-01
| |
| * build: fix --luamod-dev not working properly (#24519)zeertzjq2023-08-01
| | | | | | Fixes a regression from #23112.
| * feat(docs): generate builtin.txt (#24493)Lewis Russell2023-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - eval.lua is now the source of truth. - Formatting is much more consistent. - Fixed Lua type generation for polymorphic functions (get(), etc). - Removed "Overview" section from builtin.txt - Can generate this if we really want it. - Moved functions from sign.txt and testing.txt into builtin.txt. - Removed the *timer* *timers* tags since libuv timers via vim.uv should be preferred. - Removed the temp-file-name tag from tempname() - Moved lueval() from lua.txt to builtin.txt. * Fix indent * fixup! * fixup! fixup! * fixup! better tag formatting * fixup: revert changes no longer needed * fixup! CI --------- Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * fix(inccommand): don't save information of a buffer twice (#24501)zeertzjq2023-07-28
| | | | | | | | | | Problem: 'inccommand' doesn't restore 'undolevels' properly for a buffer shown in multiple windows. Solution: Don't save information of a buffer twice.
| * fix(window): prevent win_size_restore from changing cmdheightSean Dewar2023-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it only skips if `Rows` changed, but it's possible for the height of the usable area for windows to change (e.g: via `&ch`, `&stal` or `&ls`), which can cause the value of `&cmdheight` to change when the sizes are restored. This is a Vim bug, so I've submitted a PR there too. No telling when it'll be merged though, given the current lack of activity there. `ROWS_AVAIL` is convenient here, but also subtracts the `global_stl_height()`. Not ideal, as we also care about the height of the last statusline for other values of `&ls`. Meh. Introduce `last_stl_height` for getting the height of the last statusline and use it in `win_size_save/restore` and `last_status` (means `last_status_rec`'s `statusline` argument will now be true if `&ls` is 3, but that does not change the behaviour). Also corrects the logic in `comp_col` to not assume there's a last statusline if `&ls` is 1 and the last window is floating.
| * feat(api): allow win_hide to close cmdwin or non-previous windowsSean Dewar2023-07-26
| | | | | | | | | | | | | | This aligns its behaviour better with `nvim_win_close`. Note that `:hide` is actually incapable of closing the cmdwin, unlike `:close` and `:quit`, so this is a bit of a difference in behaviour.
| * feat(api): allow win_close in cmdwin to close wins except previousSean Dewar2023-07-26
| | | | | | | | | | | | | | | | | | | | | | Disallow closing the previous window from `nvim_win_close`, as this will cause issues. Again, no telling how safe this is. It also requires exposing old_curwin. :/ Also note that it's possible for the `&cmdheight` to change if, for example, there are 2 tabpages and `nvim_win_close` is used to close the last window in the other tabpage while `&stal` is 1. This is addressed in a later commit.
| * feat(api): allow open_win/win_set_buf in the cmdwin in some casesSean Dewar2023-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: As discussed on Matrix, there was some interest in having `nvim_open_win` again be able to open floats in the cmdwin (e.g: displaying a hover doc related to what's in the cmdwin). After #23228, this was disallowed. Solution: Allow `nvim_open_win` in the cmdwin as long as `!enter` and `buffer != curbuf` (the former can cause all sorts of issues, and the latter can crash Nvim after closing cmdwin). Also allow `nvim_win_set_buf` in a similar fashion. Note that we're not *entirely* sure if this is 100% safe (cmdwin is a global-state-using-main-loop-calling beast), but this seems to work OK..? Also: - Check the buffer argument of `nvim_open_win` earlier, and abort if it's invalid (it used to still open a window in this case). - Untranslate `e_cmdwin` errors in the API (other errors in the API are not translated: although not detailed in the API contract yet, errors are supposed to be stable).
| * fix(gen_vimfn_types): don't include tag before signature's line (#24492)zeertzjq2023-07-26
| | | | | | | | | | | | | | When signature is a bit long or there are too many tags, the tags appear before the signature's line. Don't include the line with tags in the previous function' docs. Also fix lint warnings.
| * feat(lua): typing for vim.fn.* (#24473)Lewis Russell2023-07-26
| | | | | | | | | | | | | | Problem: No LSP information for `vim.fn.*` Solution: Add meta file for `vim.fn.*`.
| * vim-patch:partial:8.1.1981: the evalfunc.c file is too big (#24490)zeertzjq2023-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The evalfunc.c file is too big. Solution: Move undo functions to undo.c. Move cmdline functions to ex_getln.c. Move some container functions to list.c. https://github.com/vim/vim/commit/08c308aeb5e7dfa18fa61f261b0bff79517a4883 Undo functions only. Cmdline functions have already been moved. A lot of container functions have been added to eval/funcs.c instead of list.c in previously ported Vim 8.2.x patches, so deal with that later. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * fix(inccommand): restrict cmdpreview undo calls (#24289)Alexandre Teoi2023-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The cmdpreview saved undo nodes on cmdpreview_prepare() from ex_getln.c may become invalid (free) if the preview function makes undo operations, causing heap-use-after-free errors. Solution: Save the buffer undo list on cmdpreview_prepare)_ and start a new empty one. On cmdpreview_restore_state(), undo all the entries in the new undo list and restore the original one. With this approach, the preview function will be allowed to undo only its own changes. Fix #20036 Fix #20248
| * fix(startup): make recovery mode work without --headless (#24477)zeertzjq2023-07-25
| |
| * fix(mouse): drag vsep of window with 'statuscolumn' (#24462)zeertzjq2023-07-24
| | | | | | | | | | | | Problem: Cannot drag a vertical separator to the right of a window whose 'statuscolumn' is wider than itself. Solution: Never treat a click on a vertical separator as a click on 'statuscolumn'.
| * fix(statuscolumn): don't update clicks if current width is 0 (#24459)zeertzjq2023-07-24
| |
| * fix(terminal): call validate_cursor() before screen update (#24425)fredizzimo2023-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When the CurSearch highlight group is set, and a search is active and you are listening to the remote UI "win_viewport" events, then typing is very unresponsive, because "win_viewport" is not sent as soon as the character is typed. On the other hand if you refresh the screen on "flush", the screen will scroll with a delay since "win_viewport" comes too late. I estimate this delay be up to one second, but it varies. Solution: Call validate_cursor() before drawing the screen, just like other modes. No tests have been added because only the intermediate state is wrong.
| * fix(highlight): make CurSearch work properly with 'winhl' (#24448)zeertzjq2023-07-23
| |
| * fix(events): trigger VimResume on next UI request (#24426)zeertzjq2023-07-23
| |
| * refactor: remove some (const char **) casts (#24423)zeertzjq2023-07-22
| |
| * fix(api/options): validate buf and winLewis Russell2023-07-22
| | | | | | Fixes #24398
| * fix(terminal): send Shift-Home Shift-End Ctrl-Home Ctrl-End (#24418)zeertzjq2023-07-22
| |
| * docs: also change "vimL" and "viml" to "Vimscript" (#24414)zeertzjq2023-07-21
| |
| * fix(folds): update folds in Insert mode with fdm=indent (#24402)Brandon Simmons2023-07-21
| | | | | | | | | | | | | | | | | | | | | | Previously, when using foldmethod=indent, inserting an unindented line would inadvertently open closed folds below it. As a performance improvement, folds were only updated once, across all lines, after Insert mode was exited. Now, the performance improvement is no longer being used when foldmethod=indent, so folds are updated multiple times during Insert mode, but only across the lines that are changing, which preserves the folds (and their open/close states) instead of recreating them.
| * fix(decoration_provider): don't leak memory on error (#24410)zeertzjq2023-07-21
| |
| * feat(lsp): implement textDocument/diagnostic (#24128)Chris AtLee2023-07-20
| |
| * feat(decoration_provider): log errors as error messagesThomas Vigouroux2023-07-19
| |
| * test(startup_spec): add a test for #18315 (#24391)zeertzjq2023-07-19
| |
| * Merge pull request #24363 from lewis6991/docs/luatypesLewis Russell2023-07-17
| |\ | | | | | | docs(lua): move some function docs to lua files