Commit Graph

2419 Commits

Author SHA1 Message Date
Sean Dewar
f8f0f14db2
vim-patch:8.2.3433: :delcommand does not take a -buffer option
Problem:    :delcommand does not take a -buffer option.
Solution:   Add the -buffer option.
bdcba24d85
2022-01-30 22:25:08 +00:00
dundargoc
4a96e7809f
chore: typo fixes (#16921)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-29 23:15:22 +00:00
Daniel Steinberg
7b3cfee982 vim-patch:partial:04fb916
Update runtime files
04fb916684
2022-01-29 15:19:30 -05:00
Daniel Steinberg
a94632d212 vim-patch:8.2.3917: the eval.txt help file is way too big
Problem:    The eval.txt help file is way too big.
Solution:   Move the builtin function details to a separate file.
1cae5a0a03

Note: Neovim-specific references to |functions| were changed to
|builtin-functions|. This included updates to:
  1. test/functional/vimscript/functions_spec.lua
  2. test/functional/vimscript/eval_spec.lua
  3. runtime/doc/lua.txt
2022-01-29 15:19:29 -05:00
Björn Linse
baec0d3152 feat(provider)!: remove support for python2 and python3.[3-5]
These versions of python has reached End-of-life. getting rid
of python2 support removes a lot of logic to support two
incompatible python versions in the same version.
2022-01-29 19:49:37 +01:00
Daniel Steinberg
6dcdec8042
vim-patch:8.2.4052: not easy to resize a window from a plugin (#17028) 2022-01-29 20:37:07 +08:00
dundargoc
39d6db3899
docs(helphelp): remove extra backtick interference (#17201)
An extra backtick was explicitly written to show what a backtick looked
like, but it interferes with the syntax highlighting which thinks that
it's a part of a concealed group and couples it with the wrong backtick.
2022-01-27 14:56:18 +01:00
bfredl
9c4e617064
Merge pull request #17166 from Shougo/vim-8.2.4160
vim-patch:8.2.4160: cannot change the register used for Select mode d…
2022-01-27 08:52:08 +01:00
bfredl
480fbbe296
Merge pull request #17145 from zeertzjq/vim-8.2.0128
vim-patch:8.2.0128: cannot list options one per line
2022-01-27 08:37:36 +01:00
bfredl
d50dd12725
Merge pull request #17095 from zeertzjq/vim-8.2.3227
vim-patch:8.2.{3227,3280,4094}: global-local 'virtualedit'
2022-01-27 08:34:57 +01:00
bfredl
7e2ce35e3b
Merge pull request #17156 from zeertzjq/vim-8.2.3584
vim-patch:8.2.{3584,3586,3587}: :command "-keepscript" argument
2022-01-23 19:42:30 +01:00
Christian Clason
4ba7fa1700
vim-patch:6f4754b9f725 (#17179)
Update runtime files
6f4754b9f7
2022-01-23 18:38:41 +01:00
Shougo Matsushita
d7ab4e819a vim-patch:8.2.4160: cannot change the register used for Select mode delete
Problem:    Cannot change the register used for Select mode delete.
Solution:   Make CTRL-R set the register to be used when deleting text for
            Select mode. (Shougo Matsushita, closes vim/vim#9531)
4ede01f188
2022-01-22 11:57:06 +09:00
zeertzjq
8e84d1b930 vim-patch:8.2.3584: "verbose set efm" reports location of the :compiler command
Problem:    "verbose set efm" reports the location of the :compiler command.
            (Gary Johnson)
Solution:   Add the "-keepscript" argument to :command and use it when
            defining CompilerSet.
58ef8a31d7
2022-01-21 18:18:18 +08:00
zeertzjq
8300d337c8 refactor: remove the <xCSI> key
CSI typed directly is now just <CSI>. The <xCSI> key is obsolete.
2022-01-21 18:08:56 +08:00
zeertzjq
aa4eadd2be vim-patch:8.2.0128: cannot list options one per line
Problem:    Cannot list options one per line.
Solution:   Use ":set!" to list one option per line.
6b915c0c0e
2022-01-20 14:34:24 +08:00
Gregory Anders
de6f9233ee
refactor: source ftplugin.vim separately from filetype.vim (#17129)
This is a follow-on to #17040. The real benefit of #17040 was ensuring
that the ftplugin FileType autocommand was defined first and thus always
fired first. A side effect of the implementation in #17040 was that
setting variables that modified the state of filetype detection (such as
g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the
user's init file. Filetype detection can also no longer be prevented
from loading by using `:filetype off`.

This PR addresses both of those side effects by unconditionally sourcing
ftplugin.vim and indent.vim before the user's init file (which ensures
that these autocommands run first) and sourcing filetype.vim *after* the
user's init file (thus allowing it to be blocked or modified).
2022-01-18 12:46:41 -07:00
Gregory Anders
fcf5dd34fd
refactor: enable filetype detection before user startup scripts (#17040) 2022-01-17 14:11:59 -07:00
marvim
2c94b75eac docs: regenerate [skip ci] 2022-01-17 18:28:23 +00:00
Christian Clason
3906b2d4fc
vim-patch:fd31be29b822 (#17114)
Update runtime files
fd31be29b8
2022-01-17 11:58:36 +01:00
zeertzjq
87e54f123a vim-patch:8.2.3280: 'virtualedit' local to buffer is not the best solution
Problem:    'virtualedit' local to buffer is not the best solution.
Solution:   Make it window-local. (Gary Johnson, closes vim/vim#8685)
51ad850f5f
2022-01-15 19:21:17 +08:00
zeertzjq
d391940b9a vim-patch:8.2.3227: 'virtualedit' can only be set globally
Problem:    'virtualedit' can only be set globally.
Solution:   Make 'virtualedit' global-local. (Gary Johnson, closes vim/vim#8638)
53ba05b090

I changed some macros to unsigned integer literals to avoid compiler warnings.
2022-01-15 19:21:17 +08:00
Gregory Anders
c915571b99 feat(diagnostic): allow retrieving current diagnostic config 2022-01-11 16:46:42 -07:00
Christian Clason
e866da12ee
vim-patch:2f0936cb9a2e (#17007)
* vim-patch:2f0936cb9a2e

Update runtime files
2f0936cb9a
2022-01-11 14:14:17 +01:00
Shadman
287d3566de
fix(lua): print multiple return values with =expr (#16933) 2022-01-06 11:42:31 -07:00
Gregory Anders
d78e46679d
feat(lua): add notify_once() (#16956)
Like vim.notify(), but only displays the notification once.
2022-01-06 11:10:56 -07:00
Björn Linse
2f779e3361
Merge pull request #16591 from shadmansaleh/feat/lua_keymaps2
feat(lua): add support for lua keymaps
2022-01-06 18:35:31 +01:00
Michael Lingelbach
55a59e56ed
feat(lsp): enable default debounce of 150 ms (#16908) 2022-01-05 08:36:35 -08:00
Axel Dahlberg
f65b0d4236
feat(autocmd): populate v:event in RecordingLeave (#16828) 2022-01-04 18:55:29 -07:00
Gregory Anders
39238435db
fix(api): force redefinition of user commands by default (#16918) 2022-01-04 11:51:45 -07:00
dundargoc
0b0c4f7dfa
chore: fix typos (#16816)
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>
2022-01-04 11:07:40 -07:00
shadmansaleh
6d41f65aa4 feat(lua): add vim.keymap
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 })
```
2022-01-04 22:31:59 +06:00
Gregory Anders
3fd454bd4a
feat: filetype.lua (#16600)
Adds a new vim.filetype module that provides support for filetype detection in
Lua.
2022-01-04 07:28:29 -07:00
shadmansaleh
d44254641f feat(lua): make =expr print result of expr 2022-01-04 16:08:07 +06:00
Sean Dewar
76435c0cfa
docs(usr_05): fix section numbers (#16886)
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.
2022-01-03 14:52:01 +01:00
Shadman
55c4393e9f
feat(lua): add support for multiple optional types in vim.validate (#16864) 2022-01-01 12:35:15 -07:00
Christian Clason
36a8f31a37
vim-patch:partial 04fb91668482 (#16852)
Update runtime files
04fb916684

omits doc/usr_41.txt (rewritten to focus on vim9script)
2022-01-01 10:56:55 +01:00
shadmansaleh
b411f436d3 feat(api): add support for lua function & description in keymap
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`.
2022-01-01 00:26:58 +06:00
Björn Linse
7bb593169e
Merge pull request #16752 from gpanders/lua-user-commands
feat(api): implement nvim_{add,del}_user_command
2021-12-28 23:18:07 +01:00
Gregory Anders
eff11b3c3f feat(api): implement nvim_{add,del}_user_command
Add support for adding and removing custom user commands with the Nvim
API.
2021-12-28 14:08:44 -07:00
dundargoc
08616571f4
chore: fix typos (#16506)
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>
2021-12-28 18:15:16 +01:00
Christian Clason
8c720f6b9d
vim-patch:partial fa3b72348d88 (#16780)
Update runtime files
fa3b72348d

omit
doc/eval.txt (needs 8.2.3864)
doc/map.txt (needs 8.2.3619)
menu.vim (needs 8.2.0413)
2021-12-26 11:03:25 +01:00
Jan Edmund Lazo
9dd8557921
Merge pull request #16774 from zeertzjq/vim-8.2.2468
vim-patch:8.2.2468: not easy to get the full command name from a shortened one
2021-12-25 23:26:59 -05:00
Jan Edmund Lazo
1dcdf86849
Merge pull request #16618 from zeertzjq/vim-8.2.3780
vim-patch:8.2.{3780,3784}: ":cd" works differently on MS-Windows
2021-12-25 21:10:44 -05:00
Jan Edmund Lazo
397201f2c6
Merge pull request #16705 from zeertzjq/vim-8.2.2508
vim-patch:8.2.{2508,2641,3846}
2021-12-25 19:08:36 -05:00
Lewis Russell
e11a44aa22
feat(lua): add vim.spell (#16620) 2021-12-25 12:36:56 -07:00
zeertzjq
cf609ce655 vim-patch:8.2.3784: the help for options is outdated
Problem:    The help for options is outdated.
Solution:   Include all the recent changes.
7b1463bca3

This is the only applicable hunk.
2021-12-25 11:31:54 +08:00
zeertzjq
42cf76fd0a vim-patch:8.2.3780: ":cd" works differently on MS-Windows
Problem:    ":cd" works differently on MS-Windows.
Solution:   Add the 'cdhome' option. (closes vim/vim#9324)
29f3a45915
2021-12-25 11:31:54 +08:00
zeertzjq
ccc4d83507 vim-patch:partial:6c391a74fe90
Update runtime files
6c391a74fe
2021-12-25 08:36:32 +08:00
zeertzjq
7fa8411d8b vim-patch:partial:6aa57295cfbe
Update runtime files
6aa57295cf
2021-12-25 08:32:58 +08:00