Commit Graph

21987 Commits

Author SHA1 Message Date
Famiu Haque
c84bd9e21f fix(nvim_create_user_command): make smods work with nvim_cmd
Closes #18876.
2022-06-08 15:24:52 +06:00
Sean Dewar
3cd22a3485
fix(eval/f_getmatches): return empty list for invalid win argument (#18893)
Slight inaccuracy in v8.1.1084's port.
Like Vim, it should return [], not 0.
Ref #18890
2022-06-07 16:55:32 +01:00
bfredl
057a280867
Merge pull request #18870 from zbirenbaum/winhl-cursor
fix(highlight): let winhighlight use cursor
2022-06-07 14:52:35 +02:00
Christian Clason
1324e7f79e
vim-patch:partial:016188fd8a30 (#18890)
Update runtime files.
016188fd8a

omit changes from doc/builtin.txt (needs 8.2.1536, 8.2.4981)
skip user manual rewrite for Vim9script
2022-06-07 14:41:53 +02:00
zbirenbaum
df70a3abcd fix(highlight): let winhighlight use cursor 2022-06-07 02:15:32 -04:00
zeertzjq
9e442c17ee
fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped (#18885) 2022-06-07 12:41:18 +08:00
zeertzjq
ab1f96e1d5
vim-patch:8.2.5064: no test for what 8.1.0052 fixes (#18881)
Problem:    No test for what 8.1.0052 fixes.
Solution:   Add a test. (closes vim/vim#10531)
3760bfddc4
2022-06-07 00:19:57 +08:00
Jonas Strittmatter
41a49dd9c8
refactor(runtime): port remaining patterns from filetype.vim to filetype.lua (#18814) 2022-06-06 09:25:33 -06:00
Javier Lopez
cf2738109a
docs: documenting struct members inline #18783
Without the proper comments, doxygen doesn't understand the comment
belongs to the struct member:

https://www.doxygen.nl/manual/docblocks.html#memberdoc

[skip ci]
2022-06-06 05:30:48 -07:00
zeertzjq
ae02c02f1f
vim-patch:8.2.5058: input() does not handle composing characters properly (#18872)
Problem:    input() does not handle composing characters properly.
Solution:   Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
            (closes vim/vim#10527)
e3a529bc87

Cherry-pick all of Test_input_func() from patch 8.2.0316.
2022-06-06 05:45:59 +08:00
Mathias Fußenegger
e4df1c9b9e
fix(lsp): fix multi client handling in code action (#18869)
Fixes https://github.com/neovim/neovim/issues/18860
2022-06-05 16:43:32 +02:00
zeertzjq
214f866fe5
fix(terminfo): disable smglr for vtpcon and conemu (#18855) 2022-06-05 14:39:56 +02:00
bfredl
e13dcdf162
Merge pull request #18864 from bfredl/optcut
perf(tests): don't invoke nvim_get_all_options_info until needed
2022-06-05 00:48:43 +02:00
bfredl
545dc82c1b perf(tests): don't invoke nvim_get_all_options_info until needed
This call alone is responible of 40 000 000 out of 80 000 000
individual alloc/free calls in the test suite.
2022-06-05 00:11:57 +02:00
dundargoc
9ce720a601
docs: specify CMAKE_BUILD_TYPE=RelWithDebInfo in README (#18859)
There have been complaints about the installation instructions being
inconsistent around the build type e.g.
https://github.com/neovim/neovim/issues/18670#issuecomment-1146468741.
Use CMAKE_BUILD_TYPE for both examples in the README.
2022-06-05 03:15:06 +08:00
bfredl
79a194a278
Merge pull request #18861 from bfredl/norplugin
fix(startup): nvim with --clean should not load user rplugins
2022-06-04 19:25:52 +02:00
bfredl
aad20de5ab fix(startup): nvim with --clean should not load user rplugins
runtime rplugins such like legacy script providers are not affected
by this change.
2022-06-04 18:37:54 +02:00
Christian Clason
df4ffce543
vim-patch:partial:cfa8f9a3f285 (#18858)
Update runtime files
cfa8f9a3f2

skip syntax/vim.vim (needs 8.2.4770)
skip doc/syntax.vim (needs several colorscheme patches)
skip further rewrite of manual
2022-06-04 10:53:42 +02:00
zeertzjq
9961a9702e
fix(lsp): set buflisted before switching to buffer (#18854) 2022-06-04 10:23:43 +02:00
Christian Clason
e6fa4cca24
vim-patch:8.2.5054: no good filetype for conf files similar to dosini (#18851)
Problem:    No good filetype for conf files similar to dosini.
Solution:   Add the confini filetype. (closes vim/vim#10510)
635f48010d
2022-06-04 09:49:01 +02:00
dundargoc
ff20d40321
docs: fix typos (#18269)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dan Sully <dan+github@sully.org>
Co-authored-by: saher <msaher.shair@gmail.com>
Co-authored-by: Stephan Seitz <stephan.seitz@fau.de>
Co-authored-by: Benedikt Müller <d12bb@posteo.de>
Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
2022-06-04 11:56:36 +08:00
Gregory Anders
86cc33a464
fix(filetype): fix typo in starsetf function (#18856) 2022-06-03 21:52:59 -06:00
Mathias Fußenegger
c6d747e6a5
feat(lsp): send didChangeConfiguration after init (#18847)
Most LSP servers require the notification to correctly load the
settings and for those who don't it doesn't cause any harm.

So far this is done in lspconfig, but with the addition of vim.lsp.start
it should be part of core.
2022-06-03 18:16:11 +02:00
Oliver Marriott
9aba204335
fix(hl): set Normal hl group sg_attr value #18820
fix #18024
2022-06-03 08:29:49 -07:00
kylo252
84d8cc3ae5
ci: use python3 explicitly to fix macos warnings #18837
> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020

Testing `pynvim` compatibility with python2 should not be done in core,
and there's only a provider_spec for python3 either way.
2022-06-03 08:15:45 -07:00
bfredl
64e946c50f
Merge pull request #18848 from bfredl/backevenagain
fix(log): back even again
2022-06-03 17:02:47 +02:00
bfredl
8c86feb930 fix(log): back even again 2022-06-03 16:26:50 +02:00
bfredl
dd0e9910da
Merge pull request #18846 from bfredl/unpackfix
fix(api): some robustness issues in api_parse_enter
2022-06-03 15:02:10 +02:00
Mathias Fußenegger
69774e3179
feat(lsp): add a start function (#18631)
A alternative/subset of https://github.com/neovim/neovim/pull/18506  that should be forward compatible with a potential project system.

Configuration of LSP clients (without lspconfig) now looks like this:

    vim.lsp.start({
       name = 'my-server-name',
       cmd = {'name-of-language-server-executable'},
       root_dir = vim.fs.dirname(vim.fs.find({'setup.py', 'pyproject.toml'}, { upward = true })[1]),
    })
2022-06-03 14:59:19 +02:00
bfredl
61e33f312e
Merge pull request #18845 from bfredl/threadlog
fix(logging): make logmsg() thread-safe again
2022-06-03 14:55:56 +02:00
bfredl
7264444873 fix(api): some robustness issues in api_parse_enter 2022-06-03 12:01:24 +02:00
bfredl
640c695a7b fix(logging): make logmsg() thread-safe again
problem: data race when `recursive` is read outside of mutex by thread A
while thread B has taken the mutex and modifies it.

solution: use a recursive lock.

ref #18764
2022-06-03 11:08:32 +02:00
bfredl
9745941ef6
Merge pull request #18730 from bfredl/apiconvert
convert API types using mpack instead of msgpack
2022-06-02 23:01:21 +02:00
Christian Clason
26966688aa
fix(treesitter): correct region for string parser (#18794)
fixes injections for string parsers after eab4d03a32
2022-06-02 17:35:16 +02:00
bfredl
d5f047bee0 refactor(api): use a unpacker based on libmpack instead of msgpack-c
Currently this is more or less a straight off reimplementation,
but this allow further optimizations down the line, especially
for avoiding memory allocations of rpc objects.

Current score for "make functionaltest; make oldtest" on a -DEXITFREE build:

is 117 055 352 xfree(ptr != NULL) calls (that's NUMBERWANG!).
2022-06-02 16:05:24 +02:00
Christian Clason
d93ba03c71
build(deps): bump Luv to HEAD - 9f8038633 (#18834) 2022-06-02 11:13:42 +02:00
Wsevolod
d5651a4183
fix(lua): stop pending highlight.on_yank timer, if any (#18824)
When yanking another range while previous yank is still highlighted, the
pending timer could clear the highlight almost immediately (especially
when using larger `timeout`, i.e. 2000)
2022-06-02 09:49:57 +02:00
bfredl
285f6518e6
Merge pull request #18831 from dundargoc/ci/disable-perl-macos
ci(provider): skip perl provider tests on macos
2022-06-02 09:46:37 +02:00
Dundar Goc
79bf507449 ci(provider): skip installing perl provider on macOS
The macOS CI jobs fail to properly install the perl provider, making the
entire thing fail.
2022-06-01 23:05:17 +02:00
zeertzjq
57a296d899
fix(inccommand): avoid crash if callback changes inccommand option (#18830)
clang: Result of operation is garbage or undefined
clang: Uninitialized argument value

Also check for == 's' instead of != 'n' as it is more straightforward.

Also fix another unrelated PVS warning:
PVS/V1071: Return value of win_comp_pos() is not always used
2022-06-02 03:48:36 +08:00
Fredrik Ekre
209824ce2c
fix(lsp): adjust offset encoding in lsp.buf.rename() (#18829)
Fix a bug in lsp.buf.rename() where the range returned by the server in
textDocument/prepareRename was interpreted as a byte range directly,
instead of taking the negotiated offset encoding into account. This
caused the placeholder value in vim.ui.input to be incorrect in some
cases, for example when non-ascii characters are used earlier on the
same line.
2022-06-01 18:56:18 +02:00
zeertzjq
19e80738e0
fix(screen): restart win_update() if a decor provider changes signcols (#18768) 2022-06-01 22:53:29 +08:00
dundargoc
9f1ec825cd
refactor(clang-tidy): remove nested redundant ifdefs #18811 2022-06-01 07:27:39 -07:00
Javier Lopez
d837b6d50c
fix(checkhealth): skip vim.health #18816
Problem:
https://github.com/neovim/neovim/pull/18720#issuecomment-1142614996

The vim.health module is detected as a healthcheck, which produces spurious errors:

    vim: require("vim.health").check()
    ========================================================================
    - ERROR: Failed to run healthcheck for "vim" plugin. Exception:
      function health#check, line 20
      Vim(eval):E5108: Error executing lua [string "luaeval()"]:1: attempt to call field 'check' (a nil value)
      stack traceback:
      [string "luaeval()"]:1: in main chunk

Solution:
Skip vim.health when discovering healthchecks.
2022-06-01 07:10:10 -07:00
zeertzjq
96c494dec3
refactor: correct comments and assertions about mapping rhs <Nop> (#18821)
Also avoid referring to mappings as "keymaps" in commands and docs.

						*map_empty_rhs* *map-empty-rhs*
You can create an empty {rhs} by typing nothing after a single CTRL-V (you
have to type CTRL-V two times).  Unfortunately, you cannot do this in a vimrc
file.
2022-06-01 21:37:01 +08:00
zeertzjq
f40adf770d
fix(inccommand): do not try to preview an ambiguous command (#18827) 2022-06-01 20:17:52 +08:00
Gregory Anders
c632f64e24
Merge pull request #18583 from gpanders/path-root
feat(fs): add vim.fs module
2022-05-31 14:00:11 -06:00
Gregory Anders
046b4ed461 feat(fs): add vim.fs.normalize() 2022-05-31 13:30:10 -06:00
Gregory Anders
f271d70661 feat(fs): add vim.fs.find()
This is a pure Lua implementation of the Vim findfile() and finddir()
functions without the special syntax.
2022-05-31 13:04:41 -06:00
Gregory Anders
2a62bec37c feat(fs): add vim.fs.dir()
This function is modeled after the path.dir() function from Penlight and
the luafilesystem module.
2022-05-31 13:04:41 -06:00