aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
Commit message (Collapse)AuthorAge
...
* | | fix(lua): print multiple return values with =expr (#16933)Shadman2022-01-06
| | |
* | | feat(lua): add notify_once() (#16956)Gregory Anders2022-01-06
| | | | | | | | | Like vim.notify(), but only displays the notification once.
* | | Merge pull request #16591 from shadmansaleh/feat/lua_keymaps2Björn Linse2022-01-06
|\ \ \ | | | | | | | | feat(lua): add support for lua keymaps
| * | | feat(lua): add vim.keymapshadmansaleh2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces two new functions `vim.keymap.set` & `vim.keymap.del` differences compared to regular set_keymap: - remap is used as opposite of noremap. By default it's true for <Plug> keymaps and false for others. - rhs can be lua function. - mode can be a list of modes. - replace_keycodes option for lua function expr maps. (Default: true) - handles buffer specific keymaps Examples: ```lua vim.keymap.set('n', 'asdf', function() print("real lua function") end) vim.keymap.set({'n', 'v'}, '<leader>lr', vim.lsp.buf.references, {buffer=true}) vim.keymap.set('n', '<leader>w', "<cmd>w<cr>", {silent = true, buffer = 5 }) vim.keymap.set('i', '<Tab>', function() return vim.fn.pumvisible() == 1 and "<C-n>" or "<Tab>" end, {expr = true}) vim.keymap.set('n', '[%', '<Plug>(MatchitNormalMultiBackward)') vim.keymap.del('n', 'asdf') vim.keymap.del({'n', 'i', 'v'}, '<leader>w', {buffer = 5 }) ```
* | | | feat(lsp): enable default debounce of 150 ms (#16908)Michael Lingelbach2022-01-05
| | | |
* | | | feat(autocmd): populate v:event in RecordingLeave (#16828)Axel Dahlberg2022-01-04
| | | |
* | | | 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: filetype.lua (#16600)Gregory Anders2022-01-04
| | | | | | | | | | | | Adds a new vim.filetype module that provides support for filetype detection in Lua.
* | | feat(lua): make =expr print result of exprshadmansaleh2022-01-04
| | |
* | | docs(usr_05): fix section numbers (#16886)Sean Dewar2022-01-03
| | | | | | | | | | | | | | | Other refs to 05.3 don't need to be updated as they refer to the simple mappings section anyway. Seems they weren't updated when the defaults.vim section was added as 05.3 instead.
* | | feat(lua): add support for multiple optional types in vim.validate (#16864)Shadman2022-01-01
| | |
* | | vim-patch:partial 04fb91668482 (#16852)Christian Clason2022-01-01
| | | | | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/04fb916684829f6aa12f33f14d0d0023b458f200 omits doc/usr_41.txt (rewritten to focus on vim9script)
* | | 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>
* | vim-patch:partial fa3b72348d88 (#16780)Christian Clason2021-12-26
| | | | | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/fa3b72348d88343390fbe212cfc230fec1602fc2 omit doc/eval.txt (needs 8.2.3864) doc/map.txt (needs 8.2.3619) menu.vim (needs 8.2.0413)
* | Merge pull request #16774 from zeertzjq/vim-8.2.2468Jan Edmund Lazo2021-12-25
|\ \ | | | | | | vim-patch:8.2.2468: not easy to get the full command name from a shortened one
| * | vim-patch:partial:6c391a74fe90zeertzjq2021-12-25
| | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/6c391a74fe90190796ca0b0c010112948a6e75d7
| * | vim-patch:partial:6aa57295cfbezeertzjq2021-12-25
| | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/6aa57295cfbe8f21c15f0671e45fd53cf990d404
| * | vim-patch:8.2.2468: not easy to get the full command name from a shortened onezeertzjq2021-12-25
| | | | | | | | | | | | | | | | | | Problem: Not easy to get the full command name from a shortened one. Solution: Add fullcommand(). (Martin Tournoij, closes vim/vim#7777) https://github.com/vim/vim/commit/038e09ee7645731de0296d255aabb17603276443
* | | Merge pull request #16618 from zeertzjq/vim-8.2.3780Jan Edmund Lazo2021-12-25
|\ \ \ | | | | | | | | vim-patch:8.2.{3780,3784}: ":cd" works differently on MS-Windows
| * | | vim-patch:8.2.3784: the help for options is outdatedzeertzjq2021-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The help for options is outdated. Solution: Include all the recent changes. https://github.com/vim/vim/commit/7b1463bca36d16e70afd6779e4fbb30761048c91 This is the only applicable hunk.
| * | | vim-patch:8.2.3780: ":cd" works differently on MS-Windowszeertzjq2021-12-25
| |/ / | | | | | | | | | | | | | | | Problem: ":cd" works differently on MS-Windows. Solution: Add the 'cdhome' option. (closes vim/vim#9324) https://github.com/vim/vim/commit/29f3a4591528130fded3fe1d63d74bcf22ab4f6c
* | | Merge pull request #16705 from zeertzjq/vim-8.2.2508Jan Edmund Lazo2021-12-25
|\ \ \ | | | | | | | | vim-patch:8.2.{2508,2641,3846}
| * | | vim-patch:8.2.2508: cannot change the character displayed in non existing lineszeertzjq2021-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot change the character displayed in non existing lines. Solution: Add the "eob" item to 'fillchars'. (closes vim/vim#7832, closes vim/vim#3820) https://github.com/vim/vim/commit/a98f8a230596d8fb44cc68321de72980a21428cb Nvim has already implemented this feature, so this just ports the tests and docs.
* | | | feat(lua): add vim.spell (#16620)Lewis Russell2021-12-25
| |/ / |/| |
* | | docs: regenerate (#16742)github-actions[bot]2021-12-23
| | | | | | | | | Co-authored-by: marvim <marvim@users.noreply.github.com>
* | | vim-patch:8.2.3874: cannot highlight the number column for a signJames McCoy2021-12-22
|/ / | | | | | | | | | | Problem: Cannot highlight the number column for a sign. Solution: Add the "numhl" argument. (James McCoy, closes vim/vim#9381) https://github.com/vim/vim/commit/a80aad717464760a5a50ac2201ce35b24a0cf7a5
* | autocmd: RecordingEnter, RecordingLeave (#16684)Gregory Anders2021-12-18
|\ \
| * | docs(autocmd): update docs to match implementationThomas Vigouroux2021-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs(reg_recorded): add links to relevant docs docs(Recording): update docs to match implementation docs(Q) update references of Q to be gQ docs(autocmd) add description about state of reg_record{ing,ed} for RecordingLeave docs(vim_diff) add Recording{Enter,Leave} to features docs(index) removed duplicate gQ docs(options) removed line about gQ erroring in visual mode Update runtime/doc/vim_diff.txt Co-authored-by: zeertzjq <zeertzjq@outlook.com> docs(vim_diff) removed double mention of Q
| * | feat(autocmd): add Recording autocmdsThomas Vigouroux2021-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feat(eval): add reg_recorded() This function is used the get the last recorded register. style(Recording): rename handler to match suggestions fix(RecordingLeave): send autocommand earlier This makes the autocommand fire just before setting reg_recorded to reg_recording, this way we clearly show that we are actually just before actually quitting the recording mode.
* | | fix(diagnostic): respect "if_many" source option for virtual text (#16653)Gregory Anders2021-12-17
|/ / | | | | | | | | | | | | | | The `prefix_source` function only evaluates the sources from the diagnostics passed to it; however, because each namespace draws its own virtual text, its diagnostics will never contain more than a single source (by definition). This requires changing the semantics of what "if_many" means from "multiple sources in a single 'batch' of diagnostics" to "multiple sources of all diagnostics within a buffer".
* | vim-patch:0e6adf8a29d5 (#16682)Christian Clason2021-12-16
| | | | | | | | Update runtime files https://github.com/vim/vim/commit/0e6adf8a29d5c2c96c42cc7157f71bf22c2ad471
* | docs(options): mention how to disable `inccommand` preview (#16534)Hitarth Thummar2021-12-15
| | | | | | Co-authored-by: Hitarth Thumma
* | docs: regenerate (#16468)github-actions[bot]2021-12-15
| | | | | | Co-authored-by: marvim <marvim@users.noreply.github.com>
* | fix(ui): close floating window on BufLeave event (#16557)ii142021-12-15
| | | | | | | | | | | | | | | | | | When buffer is visible in two splits simultaneously, BufHidden event is not triggered, causing the floating window to remain on screen after switching to another buffer. Remove BufHidden event from close_events defaults, and close the window if we changed the buffer to something other than the buffer that spawned the floating window or the floating window buffer itself.
* | fix(docs): add bufnr and user_data to diagnostic-structure (#16619)Mathias Fußenegger2021-12-11
| |
* | docs(vim_diff.txt): document SearchWrapped (#16612)zeertzjq2021-12-10
| |
* | feat: add autocommand event when search wraps around (#8487)Alejandro Exojo2021-12-10
| |
* | Merge pull request #16541 from jamessan/vim-8.2.3664James McCoy2021-12-09
|\ \ | | | | | | vim-patch:8.2.3664,8.2.3743,8.2.3747,8.2.3748,8.2.3757
| * | vim-patch:partial 6304be625ce4James McCoy2021-12-08
| | | | | | | | | | | | | | | | | | | | | Update runtime files. https://github.com/vim/vim/commit/6304be625ce44dcfedc6735164d0b853578581c8 Remaining changes left out of 03d250eb4504d5168a754d0f3b7e9992337d60b4
| * | vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'James McCoy2021-12-08
| | | | | | | | | | | | | | | | | | | | | Problem: Cannot adjust sign highlighting for 'cursorline'. Solution: Add CursorLineSign and CursorLineFold highlight groups. (Gregory Anders, closes vim/vim#9201) https://github.com/vim/vim/commit/e413ea04b716effb28eb49dbc98ad3f9f761545a
* | | Merge pull request #16582 from dundargoc/docs/remove-redundant-help-filesJames McCoy2021-12-09
|\ \ \ | |/ / |/| | docs: remove redundant help files
| * | docs: remove redundant help filesDundar Göc2021-12-08
| | |
* | | refactor(diagnostic): remove bufnr parameter from open_float (#16579)Gregory Anders2021-12-08
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The overwhelming majority of use cases for `open_float` are to view diagnostics from the current buffer in a floating window. Thus, most use cases will just `0` or `nil` as the first argument, which makes the argument effectively useless and wasteful. In the cause of optimizing for the primary use case, make the `bufnr` parameter an optional parameter in the options table. This still allows using an alternative buffer for those that wish to do so, but makes the "primary" use case much easier. The old signature is preserved for backward compatibility, though it can likely be fully deprecated at some point.
* | docs(lsp): fix resolve_capabilities docstring (#16577)Gregory Anders2021-12-08
| |
* | docs: update missing help sections from main help page (#16573)dundargoc2021-12-08
| | | | | | Also replace non-existent help section remote.txt to remote_plugins.txt
* | 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.