aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* | | | fix(lsp): ensure pending changes are flushed on skipped debounce (#17015)Mathias Fußenegger2022-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to https://github.com/neovim/neovim/pull/16881 Document changes could get sent out of order to the server: 1. on_lines: debounce > 0; add to pending changes; setup timer 2. on_lines: debounce = 0; send new changes immediately 3. timer triggers, sending changes from 1.
* | | | fix(lsp): only send valid params in executeCommand (#16987)Michael Lingelbach2022-01-08
| | | |
* | | | fix(lsp): resolve bufnr for get_lines (#16986)Michael Lingelbach2022-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/neovim/neovim/issues/16985 * get_lines checks if buf_loaded using bufnr 0, which is typically used as a sentinel value, but here must be resolved to the true bufnr
* | | | fix(filetype): match negative priority patterns after extensions (#16980)Gregory Anders2022-01-07
| | | | | | | | | | | | | | | | | | | | Negative priority patterns are those that act as catch-alls when all other attempts at matching have failed (typically the patterns that use the StarSetf functions).
* | | | feat(lsp): skip or reduce debounce after idle (#16881)Mathias Fußenegger2022-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of the debounce is to avoid overloading a server with didChange notifications. So far this used a constant value to group changes within an interval together and send a single notification. A side effect of this is that when you were idle, notifications are still delayed. This commit changes the logic to take the time the last notification happened into consideration, if it has been greater than the debounce interval, the debouncing is skipped or at least reduced.
* | | | vim-patch:8.2.4014: git and gitcommit file types not properly recognized ↵Christian Clason2022-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16953) Problem: Git and gitcommit file types not properly recognized. Solution: Adjust filetype detection. (Tim Pope, closes vim/vim#9477) https://github.com/vim/vim/commit/c689f8c3d98fffe7e13730e198ce120934528f9c
* | | | fix(runtime): check markdownError before syn-clear (#16930)Frederick Zhang2022-01-06
| | | | | | | | | | | | | | | | Avoids `E28: No such highlight group name: markdownError` when using a foreign markdown syntax.
* | | | 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 }) ```
* | | | fix(filetype): normalize slashes in file pathsGregory Anders2022-01-05
| | | |
* | | | test(filetype): port test_filetype to LuaGregory Anders2022-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because filetype.lua is gated behind an opt-in variable, it's not tested during the "standard" test_filetype.vim test. So port the test into filetype_spec where we enable the opt-in variable. This means runtime Vim patches will need to update test_filetype in two places. This can eventually be removed if/when filetype.lua is made opt-out rather than opt-in.
* | | | fix(filetype): match on <afile> rather than <abuf> (#16943)Gregory Anders2022-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Filetype detection runs on BufRead and BufNewFile autocommands, both of which can fire without an underlying buffer, so it's incorrect to use <abuf> to determine the file path. Instead, match on <afile> and assume that the buffer we're operating on is the current buffer. This is the same assumption that filetype.vim makes, so it should be safe.
* | | | 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
| | | |
* | | | feat(filetype.lua): add support for txt files (#16926)KillTheMule2022-01-04
| | | |
* | | | chore: ignore unused args in filetype functions (#16927)Gregory Anders2022-01-04
| | | | | | | | | | | | Also mark the 'getline' helper function as private to avoid docgen.
* | | | fix(filetype): set default ft_ignore_pat in filetype.lua (#16917)Gregory Anders2022-01-04
| | | | | | | | | | | | | | | | | | | | This default value is also set in filetype.vim, but if filetype.vim is disabled the variable is never defined, which causes errors in some of the dist#ft detection functions.
* | | | feat(filetype.lua): Add typescript extension to filetype detection (#16923)Robin Gagnon2022-01-04
| | | | | | | | | | | | port from `filetype.vim`; also add `getline` convenience function
* | | | 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>
* | | | fix(lsp): suppress ContentModified errors from UI (#16904)Sam McCall2022-01-04
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/neovim/neovim/issues/16900 If clients receive a ContentModified error, it generally should not show it in the UI for the end-user. Clients can resend the request if they know how to do so. https://microsoft.github.io/language-server-protocol/specifications/specification-current/#implementationConsiderations
* | | 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
| | |
* | | fix(lsp): explicitly pass bufnr in didSave handler (#16906)Michael Lingelbach2022-01-03
| | | | | | | | | | | | Addresses a regression introduced by the stricter type checking in lua api functions from https://github.com/neovim/neovim/pull/16745
* | | fix(lsp): resolve nil bufnr (#16902)Gregory Anders2022-01-03
| | | | | | | | | Related: #16889, #16745
* | | vim-patch:8.2.3995: not all sshconfig files are detected as such (#16899)Christian Clason2022-01-03
| | | | | | | | | | | | | | | | | | Problem: Not all sshconfig files are detected as such. Solution: Adjust the patterns used for sshconfig detection. (David Auer, closes vim/vim#9322) https://github.com/vim/vim/commit/9acf2d8be93f3b50607279e7f3484b019675d0a7
* | | 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.
* | | fix: resolve nil arguments to API functions (#16889)Gregory Anders2022-01-03
| | | | | | | | | | | | | | | | | | As revealed by #16745, some functions pass a nil value to API functions, which have been implicitly converted to 0. #16745 breaks this implicit conversion, so explicitly pass a resolved buffer number to these API functions.
* | | fix(lsp): always use target bufnr in location handler (#16876)Michael Lingelbach2022-01-02
| | |
* | | fix(diagnostic): improve validation for list arguments (#16855)Gregory Anders2022-01-01
| | | | | | | | | | | | | | | | | | Function arguments that expect a list should explicitly use tbl_islist rather than just checking for a table. This helps catch some simple errors where a single table item is passed as an argument, which passes validation (since it's a table), but causes other errors later on.
* | | feat(lua): add support for multiple optional types in vim.validate (#16864)Shadman2022-01-01
| | |
* | | vim-patch:8.2.3964: some common lisp and scheme files not recognized (#16866)Christian Clason2022-01-01
| | | | | | | | | | | | | | | | | | Problem: Some common lisp and scheme files not recognized. Solution: Recognize *.asd as lisp and *.sld as scheme. (Alex Vear, closes vim/vim#9447) https://github.com/vim/vim/commit/654b729c4c9951f2a46c161d1e9fefdc223fc94e
* | | 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`.
* | | fix(runtime): add missing release metadataBjörn Linse2021-12-31
| | |
* | | 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:a4d131d11052 (#16811)Christian Clason2021-12-28
|/ / / | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/a4d131d11052cafcc5baad2273ef48e0dd4d09c5
* | | vim-patch:8.2.3909: Containerfile using prefix name not recognizedChristian Clason2021-12-27
| | | | | | | | | | | | | | | | | | Problem: Containerfile using prefix name not recognized. Solution: Recognize Containerfile.*. https://github.com/vim/vim/commit/bbdd3fb804bf69684f7b0f49d3c0a0b039daec02
* | | vim-patch:8.2.3905: Dockerfile using prefix name not recognizedChristian Clason2021-12-27
|/ / | | | | | | | | | | Problem: Dockerfile using prefix name not recognized. Solution: Recognize Dockerfile.*. (closes vim/vim#9410) https://github.com/vim/vim/commit/c88ac94a0bdc70012558813404821fe077f1de20
* | fix(uri): change scheme pattern to not include the comma character (#16797)Dmytro Meleshko2021-12-26
| |
* | Merge pull request #16788 from jamessan/strptime-fixJames McCoy2021-12-26
|\ \ | | | | | | fix(msgpack#strptime): use calendar.timegm to get seconds since epoch
| * | fix(msgpack#strptime): use calendar.timegm to get seconds since epochJames McCoy2021-12-25
| | | | | | | | | | | | | | | | | | datetime.datetime.timestamp does not exist on Windows and datetime.datetiem.strftime('%s') is not supported, since '%s' is a POSIX format. Instead, use the recommended `calendar.timegm(obj.utctimetuple())`.
* | | 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