Commit Graph

20012 Commits

Author SHA1 Message Date
Michael Lingelbach
e42c906597
fix(lsp): always use target bufnr in location handler (#16876) 2022-01-02 07:55:16 +01:00
Gregory Anders
838631e29e
fix(diagnostic): improve validation for list arguments (#16855)
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.
2022-01-01 12:58:34 -07:00
Shadman
55c4393e9f
feat(lua): add support for multiple optional types in vim.validate (#16864) 2022-01-01 12:35:15 -07:00
dundargoc
f86039de1e
ci: remove outdated travis-specific code (#16869) 2022-01-01 12:42:26 -05:00
Christian Clason
302beaa36b
build(deps): bump tree-sitter to v0.20.2 (#16863) 2022-01-01 17:59:00 +01:00
James McCoy
603db555a4
Merge pull request #16870 from dundargoc/refactor/pvs/V009
refactor(PVS/V009): add special comment at top of file required by PVS
2022-01-01 11:55:27 -05:00
James McCoy
e5f7b61136
Merge pull request #16840 from zeertzjq/ci-clang-13
ci: bump clang version to 13 in asan and tsan
2022-01-01 11:43:38 -05:00
Björn Linse
273b5c9282
Merge pull request #16871 from bfredl/luaperf
perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap
2022-01-01 17:21:26 +01:00
Björn Linse
9f489f591d perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap 2022-01-01 16:41:16 +01:00
Dundar Göc
68b23b08a0 refactor(PVS/V009): add special comment at top of file required by PVS
More info: https://pvs-studio.com/en/docs/warnings/v009/
2022-01-01 16:23:22 +01:00
zeertzjq
a5eadbaf3c
test: make some tests more stable (#16860) 2022-01-01 07:28:52 -07:00
Björn Linse
5dbc64dced
Merge pull request #16857 from dundargoc/vim-8.2.3956
vim-patch:8.2.3956
2022-01-01 14:15:54 +01:00
Christian Clason
b0f21adef0
vim-patch:8.2.3964: some common lisp and scheme files not recognized (#16866)
Problem:    Some common lisp and scheme files not recognized.
Solution:   Recognize *.asd as lisp and *.sld as scheme. (Alex Vear,
            closes vim/vim#9447)
654b729c4c
2022-01-01 14:00:33 +01:00
Dundar Göc
f6c89e03d7 vim-patch:8.2.3956: duplicate assignment
Problem:    Duplicate assignment.
Solution:   Remove the second assignment. (closes vim/vim#9442)
4b1478093e
2022-01-01 12:44:26 +01: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
Dundar Göc
3fccdeb326 chore(fixup): bfredl size_t 2022-01-01 02:55:34 +01:00
dundargoc
6fb9c278d8
chore(fixup): zeer
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-01 02:52:39 +01:00
zeertzjq
6a932f68e6 ci: bump clang version to 13 in asan and tsan 2022-01-01 06:24:48 +08:00
Björn Linse
b218d02c44
Merge pull request #16594 from shadmansaleh/feat/api/lua_keymaps
feat(api): add support for lua function & description in keymap
2021-12-31 20:10:35 +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
5c1b8b77c5 fix(runtime): add missing release metadata 2021-12-31 19:04:37 +01:00
James McCoy
35034da779
ci: run lint only on master branch
The list of known lint issues is only updated for the master branch, so
other branches report lots of false positive issues.
2021-12-31 12:09:23 -05:00
James McCoy
fc62fdd42f
Merge pull request #16846 from dundargoc/ci/remove-brew-workaround
ci: remove outdated brew workaround that isn't needed anymore
2021-12-31 11:24:48 -05:00
Björn Linse
dc3a16abfc
Merge pull request #16851 from zeertzjq/vim-8.2.3952
vim-patch:8.2.3952: first line not redrawn when adding lines to an empty buffer
2021-12-31 15:48:02 +01:00
zeertzjq
ba7b30080f vim-patch:8.2.3952: first line not redrawn when adding lines to an empty buffer
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)
1fa3de1ce8
2021-12-31 22:20:31 +08:00
Dundar Göc
db7fe34017 refactor: avoid overflow by explicitly casting operand to a wider type 2021-12-31 14:45:03 +01:00
Dundar Göc
2a12e8ddfd ci: remove outdated brew workaround that isn't needed anymore 2021-12-31 13:09:01 +01:00
Björn Linse
991e872d80
Merge pull request #16728 from dundargoc/refactor/remove-unused-macros
refactor: remove unused macros
2021-12-30 22:20:10 +01:00
Dundar Göc
7e9aaf1e0f refactor: remove unused macros
Closes #13505
2021-12-30 21:53:18 +01:00
Björn Linse
c46f7caad0
Merge pull request #16373 from zeertzjq/terminal-mouse-release-forward
fix(terminal): correctly forward mouse events
2021-12-28 23:44:17 +01: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
Lewis Russell
f89989dbf3 vim-patch:8.2.3921: the way xdiff is used is inefficient
Problem:    The way xdiff is used is inefficient.
Solution:   Use hunk_func instead of the out_line callback. (Lewis Russell,
            closes vim/vim#9344)
d9da86e94e
2021-12-28 21:12:44 +00: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
zeertzjq
2ff5189d68
chore: fix compiler warning for multi-line comment (#16812) 2021-12-28 15:55:28 +01:00
Christian Clason
645b314576
vim-patch:a4d131d11052 (#16811)
Update runtime files
a4d131d110
2021-12-28 12:24:44 +01:00
dundargoc
6e00d4754c
vim-patch:8.2.3914 (#16808)
* 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)
af4a61a85d

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2021-12-28 11:28:48 +01:00
Christian Clason
9804a2870f
Merge pull request #16805 from clason/vim-8.2.3905
vim-patch:8.2.{3905,3909}: Dockerfile, Containerfile using prefix name not recognized
2021-12-27 12:52:43 +01:00
Christian Clason
d54329e1b6 vim-patch:8.2.3909: Containerfile using prefix name not recognized
Problem:    Containerfile using prefix name not recognized.
Solution:   Recognize Containerfile.*.
bbdd3fb804
2021-12-27 12:52:17 +01:00
Christian Clason
5743b0345c vim-patch:8.2.3905: Dockerfile using prefix name not recognized
Problem:    Dockerfile using prefix name not recognized.
Solution:   Recognize Dockerfile.*. (closes vim/vim#9410)
c88ac94a0b
2021-12-27 12:52:17 +01:00
Björn Linse
06ca0667a1
Merge pull request #16799 from bfredl/nohlsplash
fix(api): nvim__set_hl_ns causes extra redraws
2021-12-27 08:56:45 +01:00
Björn Linse
505c12cb9c fix(api): nvim__set_hl_ns causes extra redraws 2021-12-26 23:43:37 +01:00
zeertzjq
e0956f7452 fix(terminal): correctly forward mouse events 2021-12-27 06:08:16 +08:00
Dmytro Meleshko
56f3c41f5f
fix(uri): change scheme pattern to not include the comma character (#16797) 2021-12-26 16:36:14 -05:00
Björn Linse
99526dc9b3
Merge pull request #16596 from dm1try/do_not_leave_terminal_mode_after_mouse_activation
do not leave Terminal mode after entering to it using a mouse
2021-12-26 19:11:51 +01:00
Björn Linse
457a8ca7a7
Merge pull request #16630 from kylo252/unused-includes
refactor(build): remove unused includes
2021-12-26 19:03:21 +01:00
Björn Linse
a23f4a7921
Merge pull request #16792 from zeertzjq/ins-lastc-k-event
fix: do not save K_EVENT as lastc in Insert mode
2021-12-26 18:29:49 +01:00
James McCoy
2b0be9eff8
Merge pull request #16788 from jamessan/strptime-fix
fix(msgpack#strptime): use calendar.timegm to get seconds since epoch
2021-12-26 09:42:52 -05: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
zeertzjq
ab1ceaaaa9 fix: do not save K_EVENT as lastc in Insert mode
I'm also gonna move some other K_EVENT-related tests to vim_spec.lua
2021-12-26 16:14:35 +08:00