Commit Graph

21467 Commits

Author SHA1 Message Date
James McCoy
c04b979331
Merge pull request #18348 from dundargoc/build/abort-if-old-doxygen
build(gen_vimdoc): abort if doxygen version is too old
2022-05-01 18:47:43 -04:00
William Boman
069da468d5
fix(shared): avoid indexing unindexable values in vim.tbl_get() (#18337) 2022-05-01 21:08:05 +02:00
Dundar Goc
5fc251daeb build(gen_vimdoc): abort if doxygen version is too old
There have been a few instances where developers got confused as to why
their generated documentation differs from the one generated by the CI.
More often than not, the reason is that their doxygen version is older
than 1.9.0, which is the current minimum version. Having a simple
version check will help save future developers avoid this problem.
2022-05-01 18:05:12 +02:00
kylo252
651b595271 build: bump msgpack to 4.0.0
see https://github.com/msgpack/msgpack-c/releases/tag/c-4.0.0
2022-05-01 13:40:10 +02:00
Christian Clason
65b4bf055f
docs: syntax is enabled by default (#17637)
`:syntax enable` is no longer necessary (and may even be harmful). Do not recommend it in `usr_05.txt` and `usr_06.txt`, and mention the new default in `syntax.txt`.
2022-05-01 13:31:49 +02:00
bfredl
d9dcfd0219
Merge pull request #18334 from dundargoc/refactor/remove-char_u
refactor: replace char_u variables and functions with char
2022-05-01 10:35:48 +02:00
zeertzjq
07660193a3
chore(editorconfig): unset "charset" for *.vim and *.po files
There  are *.vim and *.po files ported from Vim that use a non-UTF-8 encoding.
2022-05-01 12:57:55 +08:00
ii14
7502f1cae0
docs(api): more API attributes #18336 2022-04-30 16:16:16 -07:00
Famiu Haque
7e10b0dae6
docs: move "hl-VertSplit" to deprecated.txt #18328 2022-04-30 15:23:30 -07:00
Dundar Goc
af782a6306 refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
2022-04-30 23:39:17 +02:00
ii14
039d60bd9c
fix(lsp): fix infinite loop in resolved_capabilities deprecation message (#18333)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-04-30 23:22:47 +02:00
Mathias Fußenegger
0344736aa6
fix(lsp): handle textDocumentSync.save bool capability (#18332)
Follow up to https://github.com/neovim/neovim/pull/17814
2022-04-30 22:13:26 +02:00
bfredl
cc27540560
Merge pull request #18231 from famiu/feat/api/parse_cmdline
feat(api): `nvim_parse_cmd`
2022-04-30 18:41:17 +02:00
Christian Clason
872622bcdb
vim-patch:8.2.4849: Gleam filetype not detected (#18326)
Problem:    Gleam filetype not detected.
Solution:   Add a pattern for Gleam files. (Mathias Jean Johansen,
            closes vim/vim#10326)
917c32c4f7
2022-04-30 17:31:53 +02:00
Mathias Fußenegger
88411613e2
feat(lsp): add async option to vim.lsp.buf.format (#18322)
Deprecates the existing `vim.lsp.buf.formatting` function.
With this, `vim.lsp.buf.format` will replace all three:

- vim.lsp.buf.formatting
- vim.lsp.buf.formatting_sync
- vim.lsp.buf.formatting_seq_sync
2022-04-30 17:23:50 +02:00
zeertzjq
338b903219
Merge pull request #18323 from zeertzjq/vim-8.1.2191
vim-patch:8.1.2191,8.2.4848: mappings for completion keys not ignored
2022-04-30 23:09:58 +08:00
Famiu Haque
8dbb11ebf6 feat(api): add nvim_parse_cmdline
Adds an API function to parse a command line string and get command information from it.
2022-04-30 21:04:51 +06:00
dundargoc
3c23100130
refactor: replace char_u variables and functions with char (#18288)
Work on https://github.com/neovim/neovim/issues/459
2022-04-30 16:48:00 +02:00
zeertzjq
0b12f6d7be vim-patch:8.2.4848: local completion with mappings and simplification not working
Problem:    Local completion with mappings and simplification not working.
Solution:   Fix local completion <C-N>/<C-P> mappings not ignored if keys are
            not simplified. (closes vim/vim#10323)
ee44603069
2022-04-30 22:27:27 +08:00
zeertzjq
db355ca4e5 vim-patch:8.1.2191: when using modifyOtherKeys CTRL-X mode may not work
Problem:    When using modifyOtherKeys CTRL-X mode may not work.
Solution:   Recognize a control character also in the form with a modifier.
88d3d09e07
2022-04-30 22:27:27 +08:00
zeertzjq
fcdf24d8be
fix(tui): disable extended keys before exiting alternate screen (#18318) 2022-04-30 22:18:14 +08:00
Michael Lingelbach
5b04e46d23
feat(lsp): add vim.lsp.buf.format (#18193) 2022-04-30 15:36:40 +02:00
kylo252
eecc6535eb
fix(handlers): more specific error messages (#16772)
Specify which message, or request, was last received in case of an error
instead of the same generic message
2022-04-30 13:55:26 +02:00
Michael Lingelbach
c618b314c6
chore(lsp): remove capabilities sanitization (#17814)
* feat(lsp)!: remove capabilities sanitization

Users must now access client.server_capabilities which matches the same
structure as the protocol.

https://microsoft.github.io/language-server-protocol/specification

client.resolved_capabilities is no longer used to gate capabilities, and
will be removed in a future release.

BREAKING CHANGE


Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2022-04-30 11:22:30 +02:00
Fredrik Ekre
df09e03cf7
feat(lsp): options to filter and auto-apply code actions (#18221)
Implement two new options to vim.lsp.buf.code_action():
 - filter (function): predicate taking an Action as input, and returning
   a boolean.
 - apply (boolean): when set to true, and there is just one remaining
   action (after filtering), the action is applied without user query.

These options can, for example, be used to filter out, and automatically
apply, the action indicated by the server to be preferred:

    vim.lsp.buf.code_action({
        filter = function(action)
            return action.isPreferred
        end,
        apply = true,
    })

Fix #17514.
2022-04-30 10:14:31 +02:00
zeertzjq
de2232878f
vim-patch:8.2.0144: some mapping code is not fully tested (#18313)
Problem:    Some mapping code is not fully tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5519)
c2a60ae10e
2022-04-30 14:00:53 +08:00
zeertzjq
2ba539f449
fix(input): only disable mapped CTRL-C interrupts when getting input (#18310) 2022-04-30 13:11:35 +08:00
zeertzjq
7df25a1372
Merge pull request #18309 from zeertzjq/vim-8.2.4845
vim-patch:8.2.{4844,4845,4846}
2022-04-30 07:04:53 +08:00
zeertzjq
1f72e31550 vim-patch:8.2.4845: duplicate code
Problem:    Duplicate code.
Solution:   Move code below if/else. (closes vim/vim#10314)
590f365f91

N/A patches for version.c:

vim-patch:8.2.4844: <C-S-I> is simplified to <S-Tab>

Problem:    <C-S-I> is simplified to <S-Tab>.
Solution:   Do not simplify CTRL if there is also SHIFT. (closes vim/vim#10313)
758a8d1999

vim-patch:8.2.4846: termcodes test fails

Problem:    Termcodes test fails.
Solution:   use CTRL-SHIFT-V to insert an unsimplified key. (closes vim/vim#10316)
bad8a013c2
2022-04-30 06:07:00 +08:00
zeertzjq
02e9a402ca test: add test for <Cmd> mapping with character containing K_SPECIAL byte 2022-04-30 06:06:11 +08:00
Mathias Fußenegger
9a1920e223
feat(lsp): show feedback on empty hover response (#18308)
Without any feedback it gives the impression that the language server is
not working properly, which isn't the case.
2022-04-29 23:04:00 +02:00
bfredl
6d4180a0d2
Merge pull request #18162 from dundargoc/refactor/unctustify
refactor/uncrustify
2022-04-29 19:33:05 +02:00
zeertzjq
d5dc3dad80
Merge pull request #18305 from zeertzjq/mapping-rhs
feat(mappings): do not simplify the rhs of a mapping
2022-04-29 22:10:25 +08:00
zeertzjq
7ac5359143 feat(mappings): do not simplify the rhs of a mapping 2022-04-29 21:12:48 +08:00
zeertzjq
98f62a2cfa feat(mappings): allow special keys and modifiers in <Cmd> mapping 2022-04-29 21:12:48 +08:00
Dundar Goc
eef8de4df0 refactor(uncrustify): change rules to better align with the style guide
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
2022-04-29 14:13:06 +02:00
Dundar Goc
0b3ae64480 refactor(uncrustify): format all c code under /src/nvim/ 2022-04-29 13:52:43 +02:00
Dundar Goc
995c186368 refactor(uncrustify): disable formatting in problematic code sections 2022-04-29 13:52:12 +02:00
zeertzjq
8c548c9e54
Merge pull request #18301 from zeertzjq/fix-lua-unmap-crash
fix(mappings): fix double-free when unmapping simplifiable Lua mapping
2022-04-29 18:09:25 +08:00
zeertzjq
c8e45366b9 fix(mappings): fix double-free when unmapping simplifiable Lua mapping 2022-04-29 17:39:24 +08:00
zeertzjq
35a7b0f9b9
Merge pull request #17932 from zeertzjq/vim-8.1.2145
vim-patch:8.1.{2145,2159,2165,2167,2333,2346,2350},8.2.{0839,0851,0855,0867,0916,0919,2084,2728,3595,4504,4819,4824,4827,4828,4829,4833,4837}
2022-04-29 17:13:28 +08:00
Michael Lingelbach
c671822d4d
ci: remove mjlbach from reviewers (#18297) 2022-04-29 10:48:12 +02:00
zeertzjq
3601cef137 feat(mappings): do not replace existing mapping for simplified form 2022-04-29 15:51:04 +08:00
zeertzjq
4adf2123dd vim-patch:8.2.4837: modifiers not simplified when timed out
Problem:    Modifiers not simplified when timed out or using feedkeys() with
            'n" flag.
Solution:   Adjust how mapped flag and timeout are used. (closes vim/vim#10305)
68a573ce2b
2022-04-29 15:51:04 +08:00
zeertzjq
1d97781dc5 vim-patch:8.2.4833: failure of mapping not checked for
Problem:    Failure of mapping not checked for.
Solution:   Check return value of ins_typebuf(). (closes vim/vim#10299)
12e21e387b
2022-04-29 15:51:04 +08:00
zeertzjq
bf065d9bb6 vim-patch:8.2.4829: a key may be simplified to NUL
Problem:    A key may be simplified to NUL.
Solution:   Use K_ZERO instead.  Use macros instead of hard coded values.
            (closes vim/vim#10290)
17c95d9608
2022-04-29 15:51:04 +08:00
zeertzjq
f2b512ad75 vim-patch:8.2.4828: fix for unmapping simplified key not fully tested
Problem:    Fix for unmapping simplified key not fully tested.
Solution:   Add a test case. (closes vim/vim#10292)
abeb09b2c5
2022-04-29 15:51:04 +08:00
zeertzjq
11b5a376bc vim-patch:8.2.4827: typo in variable name
Problem:    Typo in variable name. (Gabriel Dupras)
Solution:   Rename the variable.
87f74106f9
2022-04-29 15:51:04 +08:00
zeertzjq
e38cddc989 vim-patch:8.2.4824: expression is evaluated multiple times
Problem:    Expression is evaluated multiple times.
Solution:   Evaluate expression once and store the result. (closes vim/vim#10278)
23d5770ef5
2022-04-29 15:51:04 +08:00
zeertzjq
c14d89f306 vim-patch:8.2.4819: unmapping simplified keys also deletes other mapping
Problem:    Unmapping simplified keys also deletes other mapping.
Solution:   Only unmap a mapping with m_simplified set. (closes vim/vim#10270)
a4e3332650
2022-04-29 15:51:04 +08:00