Commit Graph

19224 Commits

Author SHA1 Message Date
Björn Linse
ea2023f689 fix(runtime): don't use regexes inside lua require'mod'
Fixes #15147 and fixes #15497. Also sketch "subdir" caching. Currently
this only caches whether an rtp entry has a "lua/" subdir but we could
consider cache other subdirs potentially or even "lua/mybigplugin/"
possibly.

Note: the async_leftpad test doesn't actually fail on master, at least
not deterministically (even when disabling the fast_breakcheck
throttling). It's still useful as a regression test for further changes
and included as such.
2021-10-17 16:21:42 +02:00
dundargoc
f19dc06081
vim-patch:8.2.3519: TOML files are not recognized (#16045)
Problem:    TOML files are not recognized.
Solution:   Add filetype patterns for TOML. (Aman Verma, closes vim/vim#8984)
28b6a3bef6
2021-10-16 23:38:05 +02:00
Christian Clason
fc1cdb8821
Merge pull request #16042 from clason/vim-2286304cdbba
vim-patch:2286304cdbba
chore(test): adapt healthcheck test to new css syntax
2021-10-16 19:24:19 +02:00
Christian Clason
fbc5b7b090 chore(test): adapt healthcheck test to new css syntax
The runtime file update
2286304cdb
added a `syn keyword` for `css`, which affects (via `html` and
`markdown` syntax files) the highlighting of `:checkhealth` output
(before, `ERROR:` was highlighted with `healthError`; now the colon is
no longer included).
2021-10-16 19:17:28 +02:00
Christian Clason
0ba77f2f31 vim-patch:2286304cdbba
Update runtime files
2286304cdb
2021-10-16 18:03:51 +02:00
dundargoc
1ced6cf08c
vim-patch:8.2.3501: tmux filetype dection is incomplete (#16021)
Problem:    tmux filetype dection is incomplete
Solution:   Also use tmux for files having text after .conf. (Eric Pruitt,
            closes vim/vim#8971)
e519eb41c1
2021-10-15 20:01:36 -04:00
Michael Lingelbach
68b2a9e569
fix: correctly capture uri scheme on windows (#16027)
closes https://github.com/neovim/neovim/issues/15261

* normalize uri path to forward slashes on windows
* use a capture group on windows that avoids mistaking drive letters as uri scheme
2021-10-15 12:03:41 -07:00
Björn Linse
5fd4557573
Merge pull request #16014 from dundargoc/refactor/reduce-char-casts
refactor: reduce number of unique char casts
2021-10-14 23:48:42 +02:00
James McCoy
88e16a7f30
Merge pull request #16019 from dundargoc/ci/commitlint/downgrade-necessary-git-version
ci: allow older git versions when using lintcommit
2021-10-14 07:10:33 -04:00
Dundar Göc
35c13620a1 ci: allow older git versions when using lintcommit
More specifically, use "git rev-parse --abbrev-ref HEAD" instead of "git
branch --show-current" to get current branch.
2021-10-14 10:13:56 +02:00
James McCoy
6b9cb665fa
Merge pull request #16015 from dundargoc/ci/labeler/breaking-changes 2021-10-13 16:12:22 -04:00
Dundar Göc
348787a1b7 ci: make labeler also work for breaking changes
This means that

"refactor!: description"

and

"refactor(scope)!: description"

will add the "refactor" label.
2021-10-13 19:55:10 +02:00
Dundar Göc
24a1880866 refactor: reduce number of unique char casts 2021-10-13 18:26:18 +02:00
Javier Lopez
33e79237bc build(tests): isolate the user environment XDG_DATA_DIRS #16003
Problem:
Some tests were not passing on my machine, specifically in
`test/functional/api/vim_spec.lua` the two tests under
`describe('nvim_get_runtime_file...`

Solution:
Unset `XDG_DATA_DIRS` in the test runner.
Note: Window CI failed if we set it to the same value as `XDG_DATA_HOME`.
2021-10-12 20:12:11 -07:00
Javier Lopez
5365f24168
fix(heath/provider.vim): using list as string #16007
Fixes #15988
2021-10-12 20:06:19 -07:00
dundargoc
649b3160a1
refactor: reduce number of unique char casts (#15995) 2021-10-12 17:52:54 +02:00
Justin M. Keyes
64f0fdc682
docs: .git-blame-ignore-revs #15775 2021-10-12 08:00:13 -07:00
dundargoc
40be47e0fa
refactor: format all C files under nvim/ #15977
* refactor: format all C files under nvim
* refactor: disable formatting for Vim-owned files:
    * src/nvim/indent_c.c
    * src/nvim/regexp.c
    * src/nvim/regexp_nfa.c
    * src/nvim/testdir/samples/memfile_test.c
2021-10-12 07:56:52 -07:00
Jose Alvarez
ee342d3cef
fix(lsp): maintain client_ids table structure when filtering (#15991) 2021-10-11 08:52:11 -07:00
Michael Lingelbach
d288daac2b
fix(lsp): do not invoke handlers for unsupported methods (#15926)
Closes https://github.com/neovim/neovim/issues/15174

Instead of invoking handlers with unsupported methods, pre-compute which
clients support a given method and only notify the user if no clients
support the given method.
2021-10-10 22:32:50 -07:00
Jan Edmund Lazo
b3e0d6708e
Merge pull request #15502 from seandewar/vim-8.1.1921
Add method call support for more built-ins: vim-patch:8.1.{1336,1952,1961,1984}
2021-10-10 16:48:24 -04:00
dundargoc
62eec98d5f
vim-patch:8.2.3491: xpm2 filetype dection is not so good (#15982)
Problem:    xpm2 filetype dection is not so good.
Solution:   Adjust the check for xpm2. (closes vim/vim#8914)
6e77b88df6
2021-10-10 20:57:09 +02:00
jdrouhard
45fa70adcb
fix(lsp): add done flag to messages returned in util.get_progress_messages() (#15985) 2021-10-10 11:41:16 -07:00
zeertzjq
f4359b5dbd
vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878
Problem:    Cannot distinguish Normal and Terminal-Normal mode.
Solution:   Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856)
72406a4bd2
2021-10-09 18:15:46 -07:00
Jan Edmund Lazo
65b8232260
vim-patch:8.2.{210,424,436,...} #15976
* vim-patch:8.2.1082: Coverity complains about ignoring dict_add() return value

Problem:    Coverity complains about ignoring dict_add() return value.
Solution:   Add (void).
91639195ef

N/A patches for version.c:

vim-patch:8.2.0210: Coverity complains about uninitialized field

Problem:    Coverity complains about uninitialized field.
Solution:   Initialize the field.
eed3571fe0

vim-patch:8.2.0424: checking for wrong return value

Problem:    Checking for wrong return value. (Tom)
Solution:   Invert the check and fix the test.
97acfc781b

vim-patch:8.2.0436: no warnings for incorrect printf arguments

Problem:    No warnings for incorrect printf arguments.
Solution:   Fix attribute in declaration.  Fix uncovered mistakes. (Dominique
            Pelle, closes vim/vim#5834)
db99f9f29a

vim-patch:8.2.0498: Coverity complains about uninitialized field

Problem:    Coverity complains about uninitialized field.
Solution:   Initialize the whole typval_T.
4227c789ff

vim-patch:8.2.0668: compiler warning for int/size_t usage

Problem:    Compiler warning for int/size_t usage.
Solution:   Change "int" to "size_t". (Mike Williams)
7f6f56f43c

vim-patch:8.2.1034: compiler warning for uninitialized variables

Problem:    Compiler warning for uninitialized variables.
Solution:   Add initializations. (John Marriott)
38041da1c2

vim-patch:8.2.1117: Coverity warns for unsing unitialized field

Problem:    Coverity warns for unsing unitialized field.
Solution:   Initialize v_lock.
a9a8e5f0dc

vim-patch:8.2.1148: warning for using int instead of size_t

Problem:    Warning for using int instead of size_t.
Solution:   Change "len" argument to size_t. (Mike Williams)
cbb6bdcd89

vim-patch:8.2.1251: Vim9: warning for pointer usage, test failure undetected

Problem:    Vim9: warning for pointer usage, test failure undetected.
Solution:   Fix pointer indirection.  Give error when executing function
            failed for any reason.  Fix instruction names.
682d0a1546

printable_func_name() is applicable but the vim9 changes are N/A.
Compilers can detect misuse of static functions.

vim-patch:8.2.1275: Vim9: compiler warning for buffer size

Problem:    Vim9: compiler warning for buffer size.
Solution:   Change the offset from 10 to 15. (Dominique Pellé, closes vim/vim#6518)
5a67c37a55

vim-patch:8.2.1443: Vim9: crash when interrupting a nested :def function

Problem:    Vim9: crash when interrupting a nested :def function.
Solution:   Push a dummy return value onto the stack. (closes vim/vim#6701)
cdd70f09a5

vim-patch:8.2.1818: SE Linux: deprecation warning for security_context_t

Problem:    SE Linux: deprecation warning for security_context_t.
Solution:   Use "char *" instead. (James McCoy, closes vim/vim#7093)
8956023920

SELINUX support was removed in commit 1de77bbcec

vim-patch:8.2.2004: compiler warning for uninitialized variable

Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize "ufunc". (John Marriott)
b3a01946b3

vim-patch:8.2.2051: Vim9: crash when aborting a user function call

Problem:    Vim9: crash when aborting a user function call.
Solution:   Do not use the return value when aboring. (closes vim/vim#7372)
34c54eb6cb

vim-patch:8.2.2270: warning for size_t to int conversion

Problem:    Warning for size_t to int conversion. (Randall W. Morris)
Solution:   Add a type cast.
38a434f7ba

vim-patch:8.2.2333: Vim9: warning for uninitialized variable

Problem:    Vim9: warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize "res".
cb6cbf29e9

vim-patch:8.2.2460: Coverity warns for unused value

Problem:    Coverity warns for unused value.
Solution:   Do not reset the return value to OK.
fc1dafa91c

vim-patch:8.2.2461: Coverity warns for unchecked return value

Problem:    Coverity warns for unchecked return value.
Solution:   Add "(void)" to avoid the warning.
fef8064b54

vim-patch:8.2.2557: compiler warning for shadowd variable

Problem:    Compiler warning for shadowd variable.
Solution:   Declare "p" only once.
087b5ff35d

vim-patch:8.2.2730: Coverity complains about not restoring character

Problem:    Coverity complains about not restoring character.
Solution:   Also restore the character in case of an error.
c9605f0595

vim-patch:8.2.2795: Coverity warns for not using return value

Problem:    Coverity warns for not using return value.
Solution:   Check the return value of compiling the substitute expression.
169502fb0b

vim-patch:8.2.2995: linker errors with dynamic Python 3.10

Problem:    Linker errors with dynamic Python 3.10.
Solution:   Add a couple of library entries. (Zdenek Dohnal, closes vim/vim#8381,
            closes vim/vim#8356)
90478f35a8

vim-patch:8.2.3000: Vim9: warning for uninitialized variable

Problem:    Vim9: warning for uninitialized variable.
Solution:   Add initialization. (John Marriott)
3b814af7e1

vim-patch:8.2.3014: Coverity warns for freeing static string

Problem:    Coverity warns for freeing static string.
Solution:   Do not assign static string to pointer. (Dominique Pellé,
            closes vim/vim#8397)
6e9695525e

vim-patch:8.2.3205: Coverity reports a null pointer dereference

Problem:    Coverity reports a null pointer dereference.
Solution:   Change the logic to avoid Coverity gets confused.
1b862c466b

vim-patch:8.2.3294: Lua: memory leak when adding dict item fails

Problem:    Lua: memory leak when adding dict item fails.
Solution:   Free the typval and the dict item.
1b6acf02b7

vim-patch:8.2.3302: Coverity is not run from github

Problem:    Coverity is not run from github.
Solution:   Add a coverity script. (James McCoy, closes vim/vim#8714)
d57a6bd98c

vim-patch:8.2.3319: Coverity action on github does not work

Problem:    Coverity action on github does not work.
Solution:   Remove undefined $SRCDIR. (James McCoy, closes vim/vim#8739)
eed9616120

* vim-patch:8.2.1085: Coverity complains about ignoring dict_add() return value

Problem:    Coverity complains about ignoring dict_add() return value.
Solution:   Add (void).
6d90c61c5a
2021-10-09 16:40:11 -07:00
dundargoc
5940a3415b
vim-patch:8.2.3490: superfluous return statements #15978
Problem:    Superfluous return statements.
Solution:   Remove superfluous return statements from void functions.
            (closes vim/vim#8977)
3826c0513b
2021-10-09 16:38:50 -07:00
dundargoc
0fc8597f01
refactor: format header files with uncrustify #15877
* refactor: format header files with uncrustify
* fixup(justin): skip formatting of terminfo_defs.h
* fixup: force winsock2 to be included first
* fixup: simplify disable/enable directive to "uncrustify:off/on"
2021-10-09 05:20:16 -07:00
Jakub Łuczyński
a36c6e5df9
fix(checkhealth): duplicate checks if module name has "-" #15935
Problem:    Some plugins have structure `lua/nvim-someplugin/..`
            Since `-` is not allowed in vim function names, healthcheck names in
            lua and in vim can not have the same name (typically vim will use `_`
            instead of `-`).
Solution:   Normalize the names before checking for duplicates.
2021-10-08 17:36:35 -07:00
dundargoc
f620008e59
ci: disable commit-lint on draft PRs #15958 2021-10-08 17:08:47 -07:00
dundargoc
2f50c7b5a3
ci(squash_typos.py): credit authors #15967 2021-10-08 16:37:45 -07:00
dundargoc
1e876bd9a8
fix(mpack): clang warning: unused variable #15968 2021-10-08 16:05:26 -07:00
Michael Lingelbach
4f4dbfe81c
fix(lsp): update tests using 0.5.0 handler calls (#15969)
Fixes test regression introduced in https://github.com/neovim/neovim/pull/15262
2021-10-08 14:01:55 -07:00
francisco souza
fcc11d5942
fix(lsp): add textDocument/prepareRename to capability map (#15961)
This is a simple fix for #15899, as it should at least stop calling
`prepareRename` on servers that don't support renaming.

I imagine a better fix would be to inspect the actual value for, but
that requires some plumbing changes on how capabilities are evaluated
before sending requests out.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2021-10-08 11:30:18 -07:00
Gregory Anders
d5dd0aa1e6
fix(diagnostic): error on invalid severity value (#15965)
Users can pass string values for severities that match with the enum
names (e.g. "Warn" or "Info") which are converted to the corresponding
numerical value in `to_severity`. Invalid strings were simply left
as-is, which caused confusing errors later on. Instead, report an
invalid severity string right up front to make the problem clear.
2021-10-08 12:28:02 -06:00
Rishikesh Vaishnav
3f09732195
fix(lsp): expose ContentModified error code to callbacks (#15262) 2021-10-08 11:19:33 -07:00
Björn Linse
5cbd0fba00
Merge pull request #15962 from bfredl/nosort
fix(buffer_updates): handle :sort of already sorted buffer
2021-10-08 18:19:18 +02:00
Mathias Fußenegger
e9d6f7ca6c
feat(lsp): utilize textEdit.range for startbyte in omnifunc (#15957)
Closes https://github.com/neovim/neovim/issues/15784
2021-10-08 08:47:59 -07:00
Björn Linse
ef687d3218 fix(buffer_updates): handle :sort of already sorted buffer 2021-10-08 16:15:35 +02:00
Björn Linse
93d33ed02e
Merge pull request #15954 from virchau13/fix-table-validation
fix(api): check type in nlua_pop_keydict (fixes #15940)
2021-10-08 13:50:29 +02:00
virchau13
6064376f6d
fix(api): check type in nlua_pop_keydict (#15940) 2021-10-08 18:22:33 +08:00
Gregory Anders
7f93b2ab01
fix: support severity_sort option for show_diagnostic functions (#15948)
Support the severity_sort option for show_{line,position}_diagnostics.
2021-10-07 19:19:30 -06:00
Tejasvi S. Tomar
e16adbf238
fix(provider): compare versions as number, not string #15937
"3.10" < "3.3" but v3.10 > v3.3
Fixes #14586
2021-10-07 14:27:40 -07:00
Björn Linse
2d206d5ab2
Merge pull request #15946 from bfredl/issue-12861
fix(buffer_updates): make lockmarks not affect extmarks and buffer updates
2021-10-07 20:52:10 +02:00
Björn Linse
fe608750a9
Merge pull request #15839 from bfredl/encgrugg
refactor(api): some cleanup
2021-10-07 20:29:53 +02:00
Björn Linse
54b2c6800e fix(buffer_updates): cleanup test behavior 2021-10-07 20:22:10 +02:00
Anton Adamansky
7d171b1c48 fix(buffer_updates): make lockmarks not affect extmarks and buffer updates. fixes #12861
Now mark_adjust() will trigger appropriate buf_updates_send_splice() called by extmark_adjust()
2021-10-07 20:21:23 +02:00
Björn Linse
206f4429c6
Merge pull request #15945 from bfredl/emptydelete
fix(buffer_updates): handle :delete of the very last line in buffer
2021-10-07 20:13:15 +02:00
Björn Linse
413bb6b7a4 refactor(api): cleanup modify_keymap and parse_keymap_opts 2021-10-07 19:45:30 +02:00
Björn Linse
8335e26b2d fix(buffer_updates): handle :delete of the very last line in buffer 2021-10-07 19:35:49 +02:00
Björn Linse
b9a35ec7a4
Merge pull request #15934 from kylo252/replacement-size
fix(lint): remove redundant ternary operator
2021-10-07 18:57:48 +02:00