1. Use the new "u" action to update the quickfix list so we don't lose
our position in the quickfix list when updating it.
2. Rather than creating a new quickfix list each time, update the
exiting one if we've already created one.
Problem: filetype: Conda configuration files are not recognized
Solution: detect '.condarc' and 'condarc' files as yaml filetype.
(zeertzjq)
closes: vim/vim#16162876de275cb
In order to run the marktree unit test in release mode, the test functions need to be available even when NDEBUG is defined.
Keep the body of marktree_check a nop during release builds, which limits the usefulness of the testing, but at least lets the tests run.
In release builds, the Compilation: line is omitted so the build is reproducible. Since the "fall-back for $VIM" line is always present, check for that instead.
Tests should not rely on being run inside a git clone, so the Linux
builds cover this use case. The macOS builds will continue running with
the .git directory so there's still unix-ish coverage within a git
clone.
This ensures that no tests fail due to differences between release and debug builds.
The release build-type check is now unnecessary, too, so remove it.
In order to run unittests with a release build, we need the test
functions to be accessible when NDEBUG is defined. Moving the functions
into the test fixture ensures they are available and only available for
use by the unit tests.
Using the "supports_method" function with a client capability inside of
an LspAttach autocommand is the preferred method to do this, so we
should be showing users how to do it.
Problem:
- nvim_subscribe, nvim_unsubscribe were deprecated in
aec4938a21 but this wasn't set in the
API metadata.
- The function annotations
```
FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY FUNC_API_DEPRECATED_SINCE(13)
```
cause this test to fail:
```
RUN T3 api metadata functions are compatible with old metadata or have new level: 3.00 ms ERR
test/functional/api/version_spec.lua:135: function vim_subscribe was removed but exists in level 0 which nvim should be compatible with
stack traceback:
test/functional/api/version_spec.lua:135: in function <test/functional/api/version_spec.lua:128>
```
Solution:
- Set the API metadata.
- Rearrange the annotations so that FUNC_API_DEPRECATED_SINCE is 2nd:
```
FUNC_API_SINCE(1) FUNC_API_DEPRECATED_SINCE(13) FUNC_API_REMOTE_ONLY
```
In particular, make the distinction and interaction between "noinsert"
and "noselect" clearer as it was very confusing before.
closes: vim/vim#16148768728b487
Co-authored-by: dundargoc <gocdundar@gmail.com>
Problem: default for 'backspace' can be set in C code
Solution: promote the default for 'backspace' from defaults.vim to the C
code (Luca Saccarola)
closes: vim/vim#16143959ef61430
N/A patches:
vim-patch:9.1.0895: default history value is too small
vim-patch:075aeea: runtime(doc): document changed default value for 'history'
Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
Problem: runtime(compiler): pytest compiler not included
Solution: include pytest compiler, update the compiler completion test
(Konfekt)
closes: vim/vim#161303c2596a9e9
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Problem: completion list wrong after v9.1.0891
Solution: update compl_mach_array after leader change
(glepnir)
compl_shown_match update not correct after refactoring in v9.1.0891
Unfortunately, this regressed what item is selected after leader change.
So generate compl_match_array before updating compl_shown_match range,
and split generate compl_match_array into range match_head
fixes: https://github.com/vim/vim/issues/16128
closes: https://github.com/vim/vim/pull/16129a49c077a88
Problem: building the completion list array is inefficient
Solution: refactor and improve ins_compl_build_pum() func
(glepnir)
current time complexity is O(n^2). I guess garray is not used here to save memory and avoid efficiency
is caused by heap memory allocation. A simple way is to add an extra pointer as a single linked list
to store the matching compl_T, and traverse this single linked list to generate compl_match_array.
The time complexity is O(n x m). The worst case is m=n, but we can still get a little improvement.
Because the if condition does not need to be run at one time. This should be a good solution for now.
Later we may be able to complete it in O(lgn) time. But this requires more reconstruction. So this is
the first step.
closes: #1612580b662009c
compact formatter is no longer distributed with eslint, so:
- switch to '--format stylish' in makeprg
- update 'errorformat' for the 'stylish' format output
fixes: vim/vim#16126closes: vim/vim#16137dd21c89626
Co-authored-by: Romain Lafourcade <romainlafourcade@gmail.com>
Problem:
gen_declarations.lua is complex and has duplicate logic with
c_grammar.lua
Solution:
Move all lpeg logic to c_grammar.lua and refactor gen_declarations.lua.
* refactor(shared): extract `vim._list_insert` and `vim._list_remove`
* feat(lsp): add `vim.lsp.foldexpr()`
* docs(lsp): add a todo for state management
* feat(lsp): add `vim.lsp.folding_range.foldclose()`
* feat(lsp): schedule `foldclose()` if the buffer is not up-to-date
* feat(lsp): add `vim.lsp.foldtext()`
* feat(lsp): support multiple folding range providers
* refactor(lsp): expose all folding related functions under `vim.lsp.*`
* perf(lsp): add `lsp.MultiHandler` for do `foldupdate()` only once
Problem: the max value of 'cmdheight' is limited by other tabpages
Solution: Limit the maximum value of 'cmdheight' to the current tabpage only.
(Milly)
The Help says that cmdheight is local to the tab page, but says nothing
about the maximum value depending on the state of all tab pages. Users
may wonder why they can't increase cmdheight when there are still rows
available on the current tab page. This PR changes the behavior of
cmdheight so that its maximum value depends only on the state of the
current tab page.
Also, since magic numbers were embedded in various places with the
minimum value of cmdheight being 1, we defined a constant to make it
easier to understand.
closes: vim/vim#161312cddf0e85a
Cherry-pick Test_cmdheight_not_changed() from patch 9.0.0187.
Co-authored-by: Milly <milly.ca@gmail.com>
Problem: 'fileencodings' default value should depend on 'encoding'. (Gary
Johnson)
Solution: When 'encoding' is "utf-8" use a different default value for
'fileencodings'.
5ffefbb35a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No test for what the spotbug compiler parses
(after commit: 65311c6f472de67b368)
Solution: Test &makeprg for the SpotBugs compiler plugin
(Aliaksei Budavei)
closes: vim/vim#1609660ddb1a140
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>