| Commit message (Collapse) | Author | Age |
... | |
| | |
|
| |
| |
| |
| |
| |
| | |
:checkhealth now respects :vertical and :horizontal.
For example:
:vertical checkhealth foo bar
will open the healthcheck buffer in a vertical split.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
A region managed by an injected parser may shrink after re-running the
injection query. If the updated region goes out of the range to be
parsed, then the corresponding tree will remain outdated, possibly
retaining the nodes that shouldn't exist anymore. This results in
outdated highlights.
Solution:
Re-parse an invalid tree if its region intersects the range to be
parsed.
|
| |
| |
| |
| |
| |
| |
| | |
Use the get_language_id client option to resolve the filetype when
matching the document selector in a dynamic capability.
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
|
| |
| |
| |
| |
| |
| |
| |
| | |
refactor(lsp): move glob parsing to vim.glob
Moving the logic for using vim.lpeg to create a match pattern from a
glob into `vim.glob`. There are several places in the LSP spec that
use globs, and it's very useful to have glob matching as a
generally-available utility.
|
| |
| |
| |
| | |
Problem: luals reported many warnings
Solution: Add type annotations
|
| |
| |
| |
| |
| | |
Also consistently remove leading colons in examples
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Maximum callback depth is not configurable.
Solution: Revert patch 9.0.2103. Set 'maxfuncdepth' in test.
fixes: vim/vim#13732
closes: vim/vim#13736
https://github.com/vim/vim/commit/fe583b1e5987fbfdb5f2141c133dbff9665ed301
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The data to be written can be very long, so use nvim_chan_send() instead
of io.stdout:write() as the latter doesn't handle EAGAIN.
A difference of these two approaches is that nvim_chan_send() writes to
stderr, not stdout, so it won't work if client stderr is redirected.
|
| |
| |
| |
| |
| |
| | |
Problem: Not all default highlight groups show their actual colors.
Solution: Refactor `vimhelp.lua` and apply it to all relevant lists (UI
groups, syntax groups, treesitter groups, LSP groups, diagnostic groups).
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove some unused fields
- Prefix classes with `vim.`
- Move around some functions so the query stuff is at the top.
- Improve type hints
- Rework how hl_cache is implemented
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: no filetype detection for execline scripts
Solution: Add filetype detection for execline
as a prior to adding syntax support for execline (see
https://github.com/djpohly/vim-execline/issues/2), i went ahead and made
the filetype detection for execline scripts.
closes: vim/vim#13689
Signed-Off-By: Mazunki Hoksaas <rolferen@gmail.com>
https://github.com/vim/vim/commit/63210c214afa6589b6132bd060908a8711f4567f
Co-authored-by: Mazunki Hoksaas <rolferen@gmail.com>
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Jordan Mandel <jordan.mandel@live.com>
|
| | |
|
| |
| |
| |
| |
| | |
Diagnostic signs should now be configured with vim.diagnostic.config(),
but "legacy" sign definitions should go through the standard deprecation
process to minimize the impact from breaking changes.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Treesitter highlighter's on_line was iterating all the parsed trees,
which can be quite a lot when injection is used. This may slow down
scrolling and cursor movement in big files with many comment injections
(e.g., lsp/_meta/protocol.lua).
Solution:
In on_win, collect trees inside the visible range, and use them in
on_line.
NOTE:
This optimization depends on the correctness of on_win's botline_guess
parameter (i.e., it's always greater than or equal to the line numbers
passed to on_line). The documentation does not guarantee this, but I
have never noticed a problem so far.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* refactor(lsp): move changetracking to separate file
- Prefixed changetracking types with `vim.lsp.`
* fixup!: make _reset_timer a local function
* fixup!: remove @private annotations
* fixup!: changetracking.lua -> _changetracking.lua
* fixup! types
* fixup! add send_changes_for_group
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, setting &bg at all re-initializes highlights and reloads
the active colorscheme, even if the actual value of &bg has not changed.
With https://github.com/neovim/neovim/pull/26595 this causes a
regression since &bg is set unconditionally based on the value detected
from the terminal.
Instead, only reload the colorscheme if the actual value of &bg has
changed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
runtime(doc): remove deprecation warning for gdefault
Deprecated can be misunderstood as being slated for removal; slightly
change wording to be clearer.
https://github.com/vim/vim/commit/82f19734bfcbddbaee8d5d837f7b7a7119366020
Co-authored-by: dundargoc <gocdundar@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Comparing against the old value before setting matched the original
C implementation, but there is no reason to use this restriction. In
particular, this inhibits using OptionSet to determine when the option
was set. If users need to handle a case where the option _changed_, it
is easy to do so in an OptionSet autocommand using v:option_new and
v:option_old (and friends).
|
| |\
| | |
| | | |
refactor(defaults): defer setting 'termguicolors' until after VimEnter
|
| | |
| | |
| | |
| | |
| | | |
This ensures that any OptionSet autocommands will fire when the value is
changed.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
runtime(doc): grammar & typo fixes
closes: vim/vim#13654
https://github.com/vim/vim/commit/17dca3cb97cdd7835e334b990565c8c0b93b1284
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
|
| |
| |
| |
| |
| | |
Anonymous namespaces are more difficult to extend or hook into since
they do not appear in the output of nvim_get_namespaces(). Use named
namespaces instead.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Unlike termopen(), nvim_open_term() PTYs do not carriage-return the
cursor on newline ("\n") input.
nvim --clean
:let chan_id = nvim_open_term(1, {})
:call chansend(chan_id, ["here", "are", "some", "lines"])
Actual behavior:
here
are
some
lines
Expected behaviour:
here
are
some
lines
Solution:
Add `force_crlf` option, and enable it by default.
|
| |
| |
| | |
Wrap the query with passthrough sequence
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
after sign implementation refactor by using extmark, we can use
`nvim_buf_set_extmark` to set diagnostic sign instead use `sign_define`
|
| |
| |
| |
| |
| |
| |
| | |
If multiple XTGETTCAP requests are active at once (for example, for
requesting the Ms capability and truecolor capabilities), then the
TermResponse autocommand may fire for capabilities that were not
requested. Instead, make sure that the provided callback is only called
for capabilities that were actually requested.
|
| | |
|
| |\
| | |
| | | |
fix(treesitter): improve vim.treesitter.foldexpr
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Collect on_bytes and flush at the invocation of the scheduled callback
to take account of commands that triggers multiple on_bytes.
* More accurately track movement of folds so that foldexpr returns
reasonable values even when the scheduled computation is not run yet.
* Start computing folds from the line above (+ foldminlines) the changed
lines to handle the folds that are removed due to the size limit.
* Shrink folds that end at the line at which another fold starts to
assign proper level to that line.
* Use level '=' for lines that are not computed yet.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
- Improve CLI argument parsing, rejects invalid argument and commands as
early as possible. Also prints USAGE in the command line.
- No longer allows `--<outfile>`, use `--out <outfile>` instead.
- Print a little bit of verbose messages to better know what's going on
rather than remaining silent at all times.
- Add type annotation `gen_lsp._opt` to avoid type warnings.
|
| | |
|
| |\
| | |
| | | |
feat(defaults): enable 'termguicolors' by default when supported by terminal
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Enable 'termguicolors' automatically when Nvim can detect that truecolor
is supported by the host terminal.
If $COLORTERM is set to "truecolor" or "24bit", or the terminal's
terminfo entry contains capabilities for Tc, RGB, or setrgbf and
setrgbb, then we assume that the terminal supports truecolor. Otherwise,
the terminal is queried (using both XTGETTCAP and SGR + DECRQSS). If the
terminal's response to these queries (if any) indicates that it supports
truecolor, then 'termguicolors' is enabled.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Empty string is a valid JSON key, but json_decode() treats an object
with empty key as ":help msgpack-special-dict". #20757
:echo json_decode('{"": "1"}')
{'_TYPE': [], '_VAL': [['', '1']]}
Note: vim returns `{'': '1'}`.
Solution:
Allow empty string as an object key.
Note that we still (currently) disallow empty keys in object_to_vim() (since 7c01d5ff9286d262097484c680e3a4eab49e2911):
https://github.com/neovim/neovim/blob/f64e4b43e1191ff30d902730f752875aa55682ce/src/nvim/api/private/converter.c#L333-L334
Fix #20757
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| | |
|
| | |
|