Many filetypes from filetype.vim set buffer-local variables, meaning
vim.filetype.match cannot be used without side effects. Instead of
setting these buffer-local variables in the filetype detection functions
themselves, have vim.filetype.match return an optional function value
that, when called, sets these variables. This allows vim.filetype.match
to work without side effects.
* build: move the logic for linters to cmake
Cmake is our source of truth. We should have as much of our build
process there as possible so everyone can make use of it.
* build: remove redundant check for ninja generator
The minimum cmake version as of writing this is 3.10, which has ninja
support.
The "first run" has high variability. Looks like the test failures
correlate with 545dc82c1b
, which makes sense because that improves "first run" performance.
So the `1000*` factor of this test could be adjusted to e.g. `300*` or `500*`.
ref https://github.com/neovim/neovim/pull/16945
fixes#15221
I tried to reproduce with a test, but failed. The below patch is able to
cause the out of bound access (I verified by adding a check to the
code), but it doesn't seg fault or trigger asan/valgrind errors.
```
diff --git a/src/nvim/testdir/test_tagfunc.vim b/src/nvim/testdir/test_tagfunc.vim
index ffc1d63b9..22828a39f 100644
--- a/src/nvim/testdir/test_tagfunc.vim
+++ b/src/nvim/testdir/test_tagfunc.vim
@@ -117,4 +117,26 @@ func Test_tagfunc_settagstack()
delfunc Mytagfunc2
endfunc
+func Test_tagfunc_settagstack_many()
+
+ func Mytagfunc1(pat, flags, info)
+ return [{'name' : 'mytag', 'filename' : 'Xtest', 'cmd' : '1'}]
+ endfunc
+ set tagfunc=Mytagfunc1
+ call writefile([''], 'Xtest')
+
+ for i in range(0,20)
+ let pos = [bufnr()] + getcurpos()[1:]
+ let newtag = [{'tagname' : 'mytag' + i, 'from' : pos}]
+ call settagstack(1, {'items' : newtag}, 'a')
+ call settagstack(1, {'curidx' : 21})
+ endfor
+
+ tag
+
+ call delete('Xtest')
+ set tagfunc&
+ delfunc Mytagfunc1
+endfunc
```
* on_scrollback_option_changed renamed to adjust_scrollback. The
function name did not correspond to what it was doing. It is
called unconditionally in every refresh of the terminal
unrelated if the scrollback option was changed.
* new on_scrollback_option_changed function, which calls
refresh_terminal, which then calls adjust_scrollback
* terminal_check_size is not the appropriate function to call when the
option is changed since it only conditionally adjusts the scrollback.
Use the new on_scrollback_option_changed
fixes#15477fixes#11811
Problem:
Since 22b52dd462#11501, log_path_init is called in log_init, so it is
now called at a deterministic time. So the "just in time" complexity of
log_path_init is no longer needed.
Solution:
Remove logic intended to try to "heal" partial initialization.
Problem: input() does not handle composing characters properly.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
(closesvim/vim#10527)
e3a529bc87
Cherry-pick all of Test_input_func() from patch 8.2.0316.
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.
> 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.
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]),
})