This option, when set, stops nvim_open_win() from potentially firing
buffer-related autocmd events
(BufEnter, BufLeave and BufWinEnter in the case of nvim_open_win()).
Iterating over PARAM_COUNT is wrong as PARAM_COUNT also counts the last
element of the options array, which has a NULL fullname in order to
signal the end of the array.
Problem: Problem restoring 'packpath' in session.
Solution: Let "skiprtp" also apply to 'packpath'.
d23b714d8b
Port Test_mksession_skiprtp() to lua functional test.
For the case of Clojure and other Lisp syntax highlighting, it is
necessary to create huge regexps consisting of hundreds of symbols with
the pipe (|) character. To make things more difficult, these Lisp
symbols sometimes consists of special characters that are themselves
part of special regexp characters like '*'. In addition to being
difficult to maintain, it's performance is suboptimal.
This patch introduces a new predicate to perform 'source' matching in
amortized constant time. This is accomplished by compiling a hash table
on the first use.
Problem: Delete() can not handle a file name that looks like a pattern.
Solution: Use readdir() instead of appending "/*" and expanding wildcards.
(Ken Takata, closesvim/vim#4424, closesvim/vim#696)
701ff0a3e5
Since the providers are ordered by ns_id, inserting a new provider may
require shifting existing providers around to maintain this ordering.
When this happens, we need to allocate a new element at the end of the
vector and then shift the larger elements to the right. Rather than
iterating (incorrectly) with a loop and copying each item, use memmove
to copy the entire block.
This commit prevents two things regarding the tagstack and jumping to
locations:
- Pushing the same item twice in a row
- Pushing an item where the destination is the same as the source
Both prevent having to press CTRL-T additional times just to pop items
that don't make the cursor move.
There were a couple of reports of "Buffer X newer than edits" problems.
We first assumed that it is incorrect for a server to send 0 as a
version - and stated that they should send a `null` instead, given that
in the specification the `textDocument` of a `TextDocumentEdit` is a
`OptionalVersionedTextDocumentIdentifier`.
But it turns out that this was a change in 3.16, and in 3.15 and earlier
versions of the specification it was a `VersionedTextDocumentIdentifier`
and language servers didn't have a better option than sending `0` if
they don't keep track of the version numbers.
So this changes the version check to always accept `0` values.
See
- https://github.com/neovim/neovim/issues/12970
- https://github.com/neovim/neovim/issues/14256
- https://github.com/haskell/haskell-language-server/pull/1727
It looks solid with the default `FloatBorder` group.
If you set the bgcolor of FloatBorder to the same color as for FloatNormal, you
effectively get an "1-cell padding".
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.
Use v:_null_string, not non-existent env var, for null string tests.
Mention v:_null_string in id() because id(v:_null_string) returns (nil).
Problem: Highlighting for :s wrong when using different separator.
Solution: Use separat argument for search direction and separator. (Rob
Pilling, closesvim/vim#5665)
c036e87bd7
Problem: Status line is not updated when going to cmdline mode.
Solution: Redraw status lines if 'statusline' is set and going to status
line mode. (based on patch from Justin M. Keyes et al.,
closesvim/vim#8044)
ce0b75711a
Problem: Setting 'winminheight' may cause 'lines' to change.
Solution: Also take minimal height of other tabpages into account. (vim/vim#7899)
9e813b3dea
before, calling vim.schedule() from inside an event would execute
the scheduled callback immediately after this event without
checking for user input in between. Break event processing
whenever user input or an interrupt is available.
* Fix click on foldcolumn if it has tabline
* Fixes to correctly determine if tablie was clicked when multigrid is enabled
* Separate foldcolumn checks into functions
* Add test case for click on foldcolumn with split window
* Fix foldcolumn click used nvim_input() on multigrid enabled
New versions of neovim will not read undofiles written by nvim before this merge (there will be an error message about incopmatible version). Nvim 0.4 (or an master up to bda12927be ) can be used to recover older undofiles, so if you worried about unsaved changes lurking around in undofiles it would make sense to keep such version around somewhere to recover them.
This is a necessary change to keep tree-sitter and plugins dependent on byte-level buffer change events fully working with undo states from a undofile. If there is a clear demand we might implement reading of the old format. Such recovered buffers will not be be fully functional with plugins relying on buffer updates or tree-sitter, however.
Problem: 'scroll' option can change when setting the statusline or tabline
but the option context is not updated.
Solution: Update the script context when the scroll option is changed as a
side effect. (Christian Brabandt, closesvim/vim#7533)
746670604a
Problem: Setting 'winminheigt' does not take tabline into account.
Solution: Subtract the tabline from the available height. (closesvim/vim#7899)
39d4cab494
N/A patches for version.c:
vim-patch:8.1.0680: not easy to see what features are unavailable
Problem: Not easy to see what features are unavailable.
Solution: Highlight disabled features in the :version output. (Nazri Ramliy,
closesvim/vim#3756)
c85ffc9dab
vim-patch:8.2.2196: :version output has extra spaces in compile and link command
Problem: :version output has extra spaces in compile and link command.
Solution: Adjust QUOTESED. (closesvim/vim#7505)
abcbb0e9ad
vim-patch:8.2.2551: MS-Windows: colors test file is not installed
Problem: MS-Windows: colors test file is not installed.
Solution: Also copy runtime/colors/tools. (Ken Takata, closesvim/vim#7902)
d0bce504ec
vim-patch:8.2.2559: MS-Windows: guifont test fails on Windows XP
Problem: MS-Windows: guifont test fails on Windows XP.
Solution: Check windowsversion().
3650fd7098
* lsp: client stop cleanups
* Add diagnostic clearing to client.stop() method used by nvim-lspconfig
* Clear diagnostic cache to prevent stale diagnostics on client restart
* lsp: Add test for vim.lsp.diagnostic.reset
The `workspace/configuration` handler could fail with the following
error if `config.settings` is nil:
runtime/lua/vim/lsp/util.lua:1432: attempt to index local 'settings' (a nil value)"
This ensures that `config.settings` is always initialized to an empty
table.
Add support for default start and end row when omitted in the
query:iter_captures and query:iter_matches functions.
When the start and end row values are omitted, the values of the given
node is used. The end row value is incremented by 1 to include the node end
row in the match.
Updated tests and docs accordingly.
while there is some controversy, stdpath('cache') looks like a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
Porting it to test/functional/legacy/backspace_opt_spec.lua
was a mistake.
Tests pass after commenting out some lines for Vi compatibility.
File is copied from Vim as of patch v8.2.0540.
Patch v8.2.0540 cannot be fully ported yet.
This file is a prequisite for future v8.2.x patches.
This test can fail on any of the Windows builds
because Github Actions does not provide enough stability
and enough memory for all runners..
Check test requirements before running any test cases
to avoid duplicate checks.
removing pending virtcol tests
Allow passing in empty array as a shorthand for array with empty string; add more documentation
add check for start_row as well
fix double free because intermediary lines weren't xmemdup'd.
NL-for-NUL dance.
Normalize row indices and perform more validation.
Adjust the cursor position if it's on the right side of the replacement.
Tests and documentation.
before the behaviour of 'mouse' was inconsistent in external UI,
as some remapping logic would check has_mouse() and others don't
(no difference in TUI or vim classic). With this change, the behaviour
is consistently up to the UI decide (see ui.txt edit)
Behaviour of tui.c is unaffected by this change.
Problem: Mode is not cleared when leaving Insert mode with mapped Esc.
Solution: Clear the mode when redraw_cmdline is set. (closesvim/vim#4269)
4c25bd785a
Problem: Peeking and flushing output slows down execution.
Solution: Do not update the mode message when global_busy is set. Do not
flush when only peeking for a character. (Ken Takata)
cb574f4154
Problem: Cannot see the selection type in :reg output. (Ayberk Aydın)
Solution: Add c/l/b. (Christian Brabandt, closesvim/vim#5110, closesvim/vim#4546)
3691f1ee72
Patch v8.1.0999 is not ported so ":registers" does not omit register 1.
"set foldcolumn=auto" is documented but not supported.
Support it by making it behave as "auto:1", similar to "signcolumn".
Close https://github.com/neovim/neovim/pull/13561
When create tab, win_hide sent to new tab and new tab's previous tab.
So, if created tab that not next tab (eg. $tabnew cmd),
send win_hide to not current tab, and fixed this.
The following keeps happening in my local environment
because the timeout is too short.
[ FAILED ] test/functional/eval/timer_spec.lua @ 208: timers do not crash when processing events in the handler
test/functional/eval/timer_spec.lua:219: retry() attempts: 1
test/helpers.lua:73: Expected objects to be the same.
Passed in:
(number) 0
Expected:
(number) 1
Problem: Using :wqa exits even if a job runs in a terminal window. (Jason
Felice)
Solution: Check if a terminal has a running job. (closesvim/vim#2654)
7a76092a51
Opt in to this secret world using
set wildchar=0
" already the default, but remove if non-zero existing config:
set wildcharm=0
now you can map 'wildmode' just like any mode:
cnoremap <tab> <c-z>
function! Spacey()
return getcmdline()[-1:] == "/" ? "\<bs>" : ""
endfunc
cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/"
Possibly asked questions:
What about backwards compatibility?
====
Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working.
Doesn't `<c-z>` mean suspend?
====
Not in cmdline mode. If it would then the recommended wildcharm would not
have been `<c-z>` to start with.
My config relies on `:<c-z>` being a synonym to `:<nop>`!
====
just no.
Implement the LanguageTree structure to enable language injection.
This is done be removing the old Parser metatable and replacing by the
new structure, with the same API (almost).
Some noticeable differences :
- `parser:parse()` now returns a table of trees
- There is no incremental parsing for child (injected) languages
Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
Quoting the existing docs:
Packages are loaded. These are plugins, as above [&runtimepath], but
found in the "start" directory of each entry in 'packpath'. Every
plugin directory found is added in 'runtimepath' and then the plugins
are sourced.
Also tj didn't think I could do it.
* lsp: Remove duplicate `diagnostics` fallback in diagnostic.display
* lsp: Expose all diagnostics
Before the changes in #12655 it was possible to retrieve all diagnostics
via `vim.lsp.util.diagnostics_by_buf`.
This adds a `diagnostic.get_all()` to enable users to retrieve all
diagnostics.
Use cases for that could include loading all diagnostics into the
quickfix list, or to build an enhanced goto_next that can move across
buffers.
Breaking Changes:
- Deprecated all `vim.lsp.util.{*diagnostics*}()` functions.
- Instead, all functions must be found in vim.lsp.diagnostic
- For now, they issue a warning ONCE per neovim session. In a
"little while" we will remove them completely.
- `vim.lsp.callbacks` has moved to `vim.lsp.handlers`.
- For a "little while" we will just redirect `vim.lsp.callbacks` to
`vim.lsp.handlers`. However, we will remove this at some point, so
it is recommended that you change all of your references to
`callbacks` into `handlers`.
- This also means that for functions like |vim.lsp.start_client()|
and similar, keyword style arguments have moved from "callbacks"
to "handlers". Once again, these are currently being forward, but
will cease to be forwarded in a "little while".
- Changed the highlight groups for LspDiagnostic highlight as they were
inconsistently named.
- For more information, see |lsp-highlight-diagnostics|
- Changed the sign group names as well, to be consistent with
|lsp-highlight-diagnostics|
General Enhancements:
- Rewrote much of the getting started help document for lsp. It also
provides a much nicer configuration strategy, so as to not recommend
globally overwriting builtin neovim mappings.
LSP Enhancements:
- Introduced the concept of |lsp-handlers| which will allow much better
customization for users without having to copy & paste entire files /
functions / etc.
Diagnostic Enhancements:
- "goto next diagnostic" |vim.lsp.diagnostic.goto_next()|
- "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()|
- For each of the gotos, auto open diagnostics is available as a
configuration option
- Configurable diagnostic handling:
- See |vim.lsp.diagnostic.on_publish_diagnostics()|
- Delay display until after insert mode
- Configure signs
- Configure virtual text
- Configure underline
- Set the location list with the buffers diagnostics.
- See |vim.lsp.diagnostic.set_loclist()|
- Better performance for getting counts and line diagnostics
- They are now cached on save, to enhance lookups.
- Particularly useful for checking in statusline, etc.
- Actual testing :)
- See ./test/functional/plugin/lsp/diagnostic_spec.lua
- Added `guisp` for underline highlighting
NOTE: "a little while" means enough time to feel like most plugins and
plugin authors have had a chance to refactor their code to use the
updated calls. Then we will remove them completely. There is no need to
keep them, because we don't have any released version of neovim that
exposes these APIs. I'm trying to be nice to people following HEAD :)
Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
Problem: List/dict test fails.
Solution: Correct expected exception.
6d967125ad
Cherry-pick e_dictkey[] change from patch 8.2.1924.
N/A patches for version.c:
vim-patch:8.2.1929: MS-Windows: problem loading Perl 5.32
Problem: MS-Windows: problem loading Perl 5.32.
Solution: Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closesvim/vim#7234)
0289065e41
vim-patch:8.2.1932: compiler warnings when building with Athena GUI
Problem: Compiler warnings when building with Athena GUI.
Solution: Fix function signatures.
963734e316