aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | | | | | | | | Merge pull request #16961 from f380cedric/vim-8.2.3582Thomas Vigouroux2022-01-11
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | vim-patch:8.2.3582
| * | | | | | | | vim-patch:8.2.3582: reading uninitialized memory when giving spell suggestionsf380cedric2022-01-06
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Reading uninitialized memory when giving spell suggestions. Solution: Check that preword is not empty. https://github.com/vim/vim/commit/15d9890eee53afc61eb0a03b878a19cb5672f732
* | | | | | | | Merge pull request #17025 from zeertzjq/compl-k-luabfredl2022-01-10
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | fix(completion): prevent K_LUA from closing pum
| * | | | | | | | fix(completion): prevent K_LUA from closing pumzeertzjq2022-01-10
| | | | | | | | |
* | | | | | | | | Merge pull request #17006 from vigoux/tree-sitter-allocThomas Vigouroux2022-01-10
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | feat(treesitter): set allocator when possible
| * | | | | | | | feat(treesitter): set allocator when possibleThomas Vigouroux2022-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new cmake check to keep this backwards compatible with the different versions of tree-sitter.
* | | | | | | | | Merge pull request #16849 from dundargoc/refactor/pvs/v1048bfredl2022-01-09
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | refactor(PVS/V1048): prevent "variable was assigned the same value" warning
| * | | | | | | | | refactor(PVS/V1048): ignore "assigned the same value" warningDundar Göc2022-01-08
| |/ / / / / / / /
* | | | | | | | | test: use old style test for testing filetype.lua (#17003)Gregory Anders2022-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a much better solution than #16942 as it doesn't require copying every new change from test_filetype.vim into filetype_spec.lua (which is much more maintainable).
* | | | | | | | | fix(api): validate user_command name (#17004)Lewis Russell2022-01-09
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | The name argument of nvim_add_user_command must begin with an uppercase character. Check that is does.
* | | | | | | | Merge pull request #16848 from dundargoc/refactor/prevent-overflow-by-castingbfredl2022-01-08
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | refactor: avoid overflow by explicitly casting operand to a wider type
| * | | | | | | | chore(fixup): bfredl size_tDundar Göc2022-01-01
| | | | | | | | |
| * | | | | | | | chore(fixup): zeerdundargoc2022-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | | | | | | | refactor: avoid overflow by explicitly casting operand to a wider typeDundar Göc2021-12-31
| | | | | | | | |
* | | | | | | | | Merge pull request #16991 from bk2204/ex-modebfredl2022-01-08
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Make mode() return correct value in ex mode
| * | | | | | | | | fix: make mode() return correct value in ex modebrian m. carlson2022-01-08
| | |_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user is in ex mode, a call to mode(1) is documented to return "cv". However, it does not currently do so, because the check which checks for ex mode is nested inside a conditional which is never reached in ex mode. Vim uses an explicit check for exmode_active, so let's do the same thing here. Add some tests for this case both with a TTY and in silent mode.
* / | | | | | | | vim-patch:8.2.4033: running filetype tests leaves directory behind (#16984)zeertzjq2022-01-07
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Running filetype tests leaves directory behind. Solution: Delete the top directory. (closes vim/vim#9483) https://github.com/vim/vim/commit/a4c96252b12c9ebc0ba563694c064e500d707b06
* | | | | / / / 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
* | | | | | | vim-patch:8.2.0951: search stat test has leftover from debugging (#16967)zeertzjq2022-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Search stat test has leftover from debugging. Solution: Remove line that writes a file. (Christian Brabandt, closes vim/vim#6224) https://github.com/vim/vim/commit/6ba24d87630b1ec2b8c7ff71550c9e41d143800e
* | | | | | | 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 }) ```
* | | | | | | | Merge pull request #16817 from lewis6991/masterBjörn Linse2022-01-06
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | vim-patch:8.2.3921: the way xdiff is used is inefficient
| * | | | | | | vim-patch:8.2.3921: the way xdiff is used is inefficientLewis Russell2021-12-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The way xdiff is used is inefficient. Solution: Use hunk_func instead of the out_line callback. (Lewis Russell, closes vim/vim#9344) https://github.com/vim/vim/commit/d9da86e94ea8dbaa056270a666892945c40a6674
* | | | | | | | 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
| |_|_|_|_|/ |/| | | | |
* | | | | | 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
* | | | | | ci: simplify ci_fold function (#16874)dundargoc2022-01-03
| | | | | |
* | | | | | fix(lua): stricter type check when calling API function (#16745)dundargoc2022-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solves #13651 Co-authored-by: Gregory Anders <greg@gpanders.com>
* | | | | | Merge pull request #16870 from dundargoc/refactor/pvs/V009James McCoy2022-01-01
|\ \ \ \ \ \ | | | | | | | | | | | | | | refactor(PVS/V009): add special comment at top of file required by PVS
| * | | | | | refactor(PVS/V009): add special comment at top of file required by PVSDundar Göc2022-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | More info: https://pvs-studio.com/en/docs/warnings/v009/
* | | | | | | perf(api): elide luaref copy when setting 'callback' in nvim_set_keymapBjörn Linse2022-01-01
|/ / / / / /
* | | | | | Merge pull request #16857 from dundargoc/vim-8.2.3956Björn Linse2022-01-01
|\ \ \ \ \ \ | | | | | | | | | | | | | | vim-patch:8.2.3956
| * | | | | | vim-patch:8.2.3956: duplicate assignmentDundar Göc2022-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Duplicate assignment. Solution: Remove the second assignment. (closes vim/vim#9442) https://github.com/vim/vim/commit/4b1478093eb8b8bebc94b1f596e0afc25db4d189
* | | | | | | 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
* | | | | | 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`.
* | | | | | vim-patch:8.2.3952: first line not redrawn when adding lines to an empty bufferzeertzjq2021-12-31
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: First line not redrawn when adding lines to an empty buffer. Solution: Adjust the argument to appended_lines(). (closes vim/vim#9439, closes vim/vim#9438) https://github.com/vim/vim/commit/1fa3de1ce806ba18ebcc00c6d9a0678a84735463
* | | | | Merge pull request #16728 from dundargoc/refactor/remove-unused-macrosBjörn Linse2021-12-30
|\ \ \ \ \ | |_|_|/ / |/| | | | refactor: remove unused macros
| * | | | refactor: remove unused macrosDundar Göc2021-12-30
| | | | | | | | | | | | | | | | | | | | Closes #13505
* | | | | Merge pull request #16373 from zeertzjq/terminal-mouse-release-forwardBjörn Linse2021-12-28
|\ \ \ \ \ | | | | | | | | | | | | fix(terminal): correctly forward mouse events
| * | | | | fix(terminal): correctly forward mouse eventszeertzjq2021-12-27
| | | | | |
* | | | | | 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>
* | | | | | chore: fix compiler warning for multi-line comment (#16812)zeertzjq2021-12-28
| | | | | |
* | | | | | vim-patch:8.2.3914 (#16808)dundargoc2021-12-28
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vim-patch:8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416) https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Co-authored-by: zeertzjq <zeertzjq@outlook.com>