Problem: Contents of terminal buffer are not reflown when Nvim is
resized.
Solution: Enable reflow in libvterm by default. Now that libvterm is
vendored, also fix "TUI rapid resize" test failures there.
Note: Neovim's scrollback buffer does not support reflow (yet), so lines
vanishing into the buffer due to a too small window will be restored
without reflow.
Problem: Adding support for modern Nvim features (reflow, OSC 8, full
utf8/emoji support) requires coupling libvterm to Nvim internals
(e.g., utf8proc).
Solution: Vendor libvterm at v0.3.3.
According to :h win32-PATH, "the same directory as Vim" means the same
directory as the Vim executable, not Vim's current directory. In patch
8.2.4860 these two concepts were mixed up.
closes: vim/vim#154510cc5dce578
Problem: When preparing the parameters for a code actions LSP request,
the code set `context.diagnostics` when processing the first LSP client,
and then reused those `context.diagnostics` for subsequent LSP clients.
This meant that the second and next LSP clients got diagnostics that
did not originate from them, and they did not get the diagnostics that
they sent.
Solution: Avoid setting `context.diagnostics` (which is referenced by
all clients). Instead, set `params.context.diagnostics` directly, which
is specific to a single client.
Fixes#30001
Caused by #29501
Problem: RestoreOpts() plugin called too often
Solution: use :defer to have the RestoreOpts() function
called when the function returns automatically
afea6b9468
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: the zip plugin duplicates a lot of code for displaying
warnings/errors
Solution: refactor common code into a generic Mess() function
8d52926857
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin has no way to set/restore option values
Solution: Add the SetSaneOpts() and RestoreOpts() functions,
so options that cause issues are set to sane values
and restored back to their initial values later on.
(this affects the 'shellslash' option on windows, which also
changes how the shellescape() function works)
19636be55e
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin tests for fnameescape() function
Solution: Remove the check, fnameescape() has been available since
7.1.299, it should nowadays always be available
33836d38b8
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin uses :echo which does not store messages
Solution: use :echomsg instead of :echo so that messages are stored in
the message history
120c0dd815
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin contains a lot of comments from the decho plugin
Solution: Clean up and remove un-used comments
a63f66e953
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Cannot browse zipfiles with the unzip program found
on FreeBSD.
Solution: Adjust command arguments.
Unzip found on FreeBSD complain about missing argument with the
zipinfo modifier '-Z -1'. Joining arguments seems to work
for both implementations.
Also change `:sil!` to `:sil` so that error messages are properly
reported (per review of Christian Brabandt).
related: vim/vim#15411f0e9b72c8f
Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
* do not capitalize after a double colon when introducing a list
* Capitalize a header line
closes: vim/vim#15433217d3c17c6
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem:
- Current lua indentexpr does not indent for '(' ')'.
- Missing indent test for lua.
Solution:
- Match '(', ')' in `function GetLuaIndentIntern`.
- Add an indent test for lua.
closes: vim/vim#15364c0f7505ede
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Problem: After 6f1cbfc9ab fnameescape()
is no longer called on the name of the file to be extracted.
However, while spaces indeed don't need to be escaped, unzip
treats '[' as a wildcard character, so it need to be escaped.
Solution: Escape '[' on both MS-Windows and Unix.
From the docs it seems '*' and '?' also need escaping, but they seem to
actually work without escaping.
fixes: neovim/neovim#29977closes: vim/vim#15427c5bdd66558
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Magenta background Todo is too bright and might interfere with DiffText.
Make it less strong, without background, bold.
closes: vim/vim#154236228481b8e
Co-authored-by: Maxim Kim <habamax@gmail.com>
Problem: some patterns are used as a replacement for several explicit
extension matches (like '%.[Ss][Yy][Ss]$', '%.php%d$', etc.).
They usually correspond to Vim's "ignore case" regexes (like
'*.sys\c') and "convenience" patterns to not define many of them (like
'*.php\d').
As matching extension directly is faster and more explicit, it should
be preferred.
Solution: move all such patterns to direct extension match.
Problem: some patterns are used as a replacement for one-two explicit
file matches (like '^[mM]akefile$'). As matching file name directly is
faster and more explicit, it should be preferred.
Solution: move those patterns to direct file name match.
NOTE: this is not strictly backwards compatible, because exact file
name matching is done *before* pattern matching. If user has
conflicting `vim.filetype.add()` call with high priority (like with
`pattern='file$'` and `priority=100`), after this change it will be
ignored (i.e. 'makefile' will match exactly).
Judging by converted cases, it seems reasonable to prefer exact
matches there.
Problem: filetype: goaccess config file not recognized
Solution: detect 'goaccess.conf' as goaccess filetype, also
include a basic syntax and ftplugin (Adam Monsen)
Add syntax highlighting for GoAccess configuration file.
GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal in *nix systems or through your browser.
GoAccess home page: https://goaccess.iocloses: vim/vim#154140aa65b48fb
Co-authored-by: Adam Monsen <haircut@gmail.com>
Make `:Sexplore` / `:Hexplore` / `:Vexplore` commands honor the user
`&split{right,below}` settings (or netrw-specific `g:netrw_alt{o,v}`)
instead of hardcoding a split direction. Similarly, update banged
variants of the two latter commands to follow the inverted preference.
closes: vim/vim#15417c527d90fae
Co-authored-by: Ivan Shapovalov <intelfx@intelfx.name>
Problem: Calling a function from an "expr" option has too much overhead.
Solution: Add call_simple_func() and use it for 'foldexpr'
87b4e5c5db
Cherry-pick a call_func() change from patch 8.2.1343.
Add expr-option-function docs to options.txt.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: using a script-local function requires using "s:" when
setting 'completefunc'.
Solution: Do not require "s:" in Vim9 script. (closesvim/vim#9796)
1fca5f3e86
vim-patch:8.2.4417: using NULL pointer
Problem: Using NULL pointer.
Solution: Set offset after checking for NULL pointer.
e89bfd212b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
`buf.code_action` always included diagnostics on a given line from all
clients. Servers should only receive diagnostics they published, and in
the exact same format they sent it.
Should fix https://github.com/neovim/neovim/issues/29500
inotifywait man page specifies:
The file must be specified with a relative or absolute path according to whether a relative or absolute path is given for watched directories.
So it would only work this way in case the path is relative (which at least for gopls it is not)
- Prefix all global variables with "g:".
- Add spaces around each variable assignment operator.
- Remove extraneous whitespace characters.
- Remove a spurious _serializable_ Java keyword (since v1.1,
java.io.Serializable and java.io.Externalizable interfaces
provide an API for object serialization; see vim-6-0j).
- Normalise the syntax definition argument order by making
_contained_ the first argument of each such definition.
- Normalise the argument tabulation for highlighting group
definitions.
Reference:
https://web.archive.org/web/20010821025330/java.sun.com/docs/books/jls/first_edition/html/1.1Update.html
related: vim/vim#153999aabcef1c8
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
- Reword a few sentences and reformat a few paragraphs.
- Supply absent capitalisation and punctuation.
- Make listed highlighting groups and code stand out.
- Prefix all Java-related global variables with "g:".
- Add spaces around each variable assignment operator.
- Acknowledge that some Javadoc variables are maintained in
the HTML syntax file.
Also, move the overridable _default_ HTML group links before
the HTML syntax file inclusion in order to implement the
documented diverged settings.
related: vim/vim#153993749dff093
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
- Make diff colors more accessible, Green for added, Red for deleted, Blue for Changed
- Change Search to blue to be visible with Diff colors
- Change Todo to bright magenta
closes: vim/vim#15400d88ebcbd9f
Co-authored-by: Maxim Kim <habamax@gmail.com>
- Add PmenuMatch and PmenuMatchSel to all colorschemes
- Add contrast to habamax Type, String, Constant and PreProc
- Change habamax PmenuSel to neutral gray to make PmenuMatchSel more visible
- Change habamax Tabline and VertSplit
- Make Conceal less visible for zellner, torte, shine, ron, peachpuff,
pablo, morning, koehler, evening, delek, blue, darkblue, lunaperche,
retrobox
- Add Added/Changed/Removed highlights
- Fix retrobox Terminal background
- Other minor fixes and improvements
closes: vim/vim#15267fcc53461d4
Co-authored-by: Maxim Kim <habamax@gmail.com>
Problem:
Some language servers (e.g., rust-analyzer, texlab) are desynced when
the user deletes the entire contents of the buffer. This is due to the
discrepancy between how nvim computes diff and how nvim treats empty
buffer.
* diff: If the buffer became empty, then the diff includes the last
line's eol.
* empty buffer: Even if the buffer is empty, nvim regards it as having
a single empty line with eol.
Solution:
Add special case for diff computation when the buffer becomes empty so
that it does not include the eol of the last line.
Problem: CompletionItem in lsp spec mentioned the deprecated attribute
Solution: when item has deprecated attribute set hl_group to DiagnosticDeprecated
in complete function
Problem:
`'scrollbind'` does not work properly if the window being scrolled
automatically contains any filler/virtual lines (except for diff filler
lines).
This is because when the scrollbind check is done, the logic only
considers changes to topline which are represented as line numbers.
Solution:
Write the logic for determine the scroll amount to take into account
filler/virtual lines.
Fixes#29751