| Commit message (Collapse) | Author | Age |
| |
|
|\
| |
| | |
refactor: remove long
|
|/
|
|
|
| |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
|\
| |
| | |
fix(ui): propagate line flags on grid_line events
|
| |
| |
| |
| |
| |
| | |
This fixes the TUI's line-wrapping behavior, which was broken with the
migration to the msgpack-based UI protocol (see
https://github.com/neovim/neovim/issues/7369#issuecomment-1571812273).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
perf(treesitter): cache vim.treesitter.query.get
Problem:
vim.treesitter.query.get searches and reads query files every time it's
called, if user hasn't overridden the query. So this can incur slowdown
when called frequently.
This can happen when using treesitter foldexpr. For example, when using
`:h :range!` in markdown file to format fenced codeblock, on_changedtree
in _fold.lua is triggered many times despite that the tree doesn't have
syntactic changes (might be a bug in LanguageTree). (Incidentally, the
resulting fold is incorrect due to a bug in `:h range!`.) on_changedtree
calls vim.treesitter.query.get for each tree changes. In addition, it
may request folds queries for injected languages without fold queries,
such as markdown_inline.
Solution:
* Cache the result of vim.treesitter.query.get.
* If query file was not found, fail quickly at later calls.
|
| |
| |
| | |
https://github.com/luvit/luv/releases/tag/1.45.0-0
|
| | |
|
| |
| |
| | |
Follow-up to #24195.
|
| |
| |
| |
| |
| |
| |
| |
| | |
label (#24223)
Problem: Tabline highlight wrong after truncated double width label.
Solution: Fill up half a double width character later. (closes vim/vim#12614)
https://github.com/vim/vim/commit/d392a74c5a8af8271a33a20d37ae1a8ea422cb4b
|
| |
| |
| | |
Close #24180
|
|\ \
| | |
| | | |
feat(treesitter): add python, bash parser and queries
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
nvim_parse_cmd() in pcall() may show an error message (side-effect):
:lua pcall(vim.api.nvim_parse_cmd, vim.fn.getcmdline(), {})
E16: Invalid range
Solution:
Avoid emsg() in the nvim_parse_cmd() codepath.
- refactor(api): add error message output parameter to get_address()
- fix: null check emsg() parameter
- refactor: remove emsg_off workaround from do_incsearch_highlighting()
- refactor: remove emsg_off workaround from cmdpreview_may_show()
- refactor: remove remaining calls to emsg() from parse_cmd_address() and get_address()
- (refactor): lint set_cmd_dflall_range()
- refactor: addr_error() - move output parameter to return value
Fix #20339
TODO:
These are the functions called by `get_address()`:
```
nvim_parse_cmd() -> parse_cmdline() -> parse_cmd_address() -> get_address()
skipwhite()
addr_error()
qf_get_cur_idx()
qf_get_cur_valid_idx()
qf_get_size()
qf_get_valid_size()
mark_get()
mark_check()
assert()
skip_regexp()
magic_isset()
> do_search()
> searchit()
ascii_isdigit()
getdigits()
getdigits_int32()
compute_buffer_local_count()
hasFolding()
```
From these functions, I found at least two that call emsg directly:
- do_search()
- seems to be simple to refactor
- searchit()
- will be more challenging because it may generate multiple error messages,
which can't be handled by the current `errormsg` out-parameter.
For example, it makes multiple calls to `vim_regexec_multi()` in a loop that
possibly generate error messages, and later `searchit()` itself may generate
another one:
- https://github.com/neovim/neovim/blob/c194acbfc479d8e5839fa629363f93f6550d035c/src/nvim/search.c#L631-L647
- https://github.com/neovim/neovim/blob/c194acbfc479d8e5839fa629363f93f6550d035c/src/nvim/search.c#L939-L954
---------
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
`nvim -v` and `:version` prints system vimrc, fallback files, and compilation
info by default, which most people don't care about and just clutters up the
output.
Solution:
Omit extra info unless 'verbose' is set.
|
|/ /
| |
| |
| |
| | |
- fix lint / analysis warnings
- locations_to_items(): get default offset_encoding from active client
- character_offset(): get default offset_encoding from active client
|
| |
| |
| |
| |
| |
| |
| | |
* bundle split Markdown parser from https://github.com/MDeiml/tree-sitter-markdown
* add queries from https://github.com/nvim-treesitter/nvim-treesitter/tree/main
* upstream `#trim!` and `#inject-language!` directives
Co-authored-by: dundargoc <gocdundar@gmail.com>
|
| |
| |
| | |
https://github.com/libuv/libuv/releases/tag/v1.46.0
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 37079fc moved inlay_hint to vim.lsp() but in the process did
missed converting a call to disable/enable which are now local.
Fixes the below error when trying to toggle inlay hints.
E5108: Error executing lua /usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:248: attempt to call field 'disable' (a nil value)
stack traceback:
/usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:248: in function 'toggle'
/usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:310: in function 'inlay_hint'
[string ":lua"]:1: in main chunk
|
|\ \
| | |
| | | |
fix(ftplugin): respect runtimepath ordering
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: bundled `ftplugin/foo/*.vim` are sourced before user
`ftplugin/foo.vim`.
Solution: call `runtime!` once on all patterns to be sourced.
Followup to #23801. Fixes #24003.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Allows to keep more functions hidden and gives a path forward for
further inlay_hint related functions - like applying textEdits.
See https://github.com/neovim/neovim/pull/23984#pullrequestreview-1486624668
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
netrw uses a bespoke window to show messages.
Solution:
change the default so that netrw uses normal vim :echoerr
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
vim_lsp_inlayhint: Error executing lua: .../lsp/_inlay_hint.lua:249: attempt to index field 'applied' (a nil value)
Solution:
Assign {} to bufstates.applied in on_reload
fixes #24172
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Termdebug: error with more than 99 breakpoints.
Solution: Use a different sign for breakpoint 100 and over. (closes vim/vim#12589,
closes vim/vim#12588)
https://github.com/vim/vim/commit/e7d9ca2b3bf99b0b759be8952e02c77110a354c1
Co-authored-by: skywind3000 <skywind3000@163.com>
|
| | |
| | |
| | |
| | | |
Use the actual width of the 'statuscolumn' to allocate and fill its click definition array.
The returned width of the built statuscolumn string may be shorter (and is padded later).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
`:lua vim.cmd.win_getid(30,10)` is interpreted as `:win[size] 30 10`.
User intention was to call `vim.fn.win_getid(30,10)`.
Solution:
Check that the `cmd` actually matches the resolved command.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(#24185)
Problem: Resetting local option to global value is inconsistent.
Solution: Handle "<" specifically for 'scrolloff' and 'sidescrolloff'.
(closes vim/vim#12594)
https://github.com/vim/vim/commit/bf5f189e449d6517239b79804d7a422a46946838
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Treesitter fold is not updated if treesitter hightlight is not
active. More precisely, updating folds requires `LanguageTree:parse()`.
Solution: Call `parse()` before computing folds and compute folds when
lines are added/removed.
This doesn't guarantee correctness of the folds, because some changes
that don't add/remove line won't update the folds even if they should
(e.g. adding pair of braces). But it is good enough for most cases,
while not introducing big overhead.
Also, if highlighting is active, it is likely that
`TSHighlighter._on_buf` already ran `parse()` (or vice versa).
|
| | |
| | |
| | | |
Regex bug in scripts/gen_help_html.lua:ignore_invalid()
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: PEM files are not recognized.
Solution: Add patterns to match PEM files. (closes vim/vim#12582)
https://github.com/vim/vim/commit/0256d76a3392aef270b38d1cf7633008e45c2003
|
|\ \ \
| | | |
| | | | |
vim-patch:9.0.{1664,1667}: divide by zero when scrolling with 'smoothscroll' set
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Regression test doesn't fail when fix is reverted.
Solution: Add "n" to 'cpoptions' instead of using :winsize. (closes vim/vim#12587,
issue vim/vim#12528)
https://github.com/vim/vim/commit/e42989374144a63d986b878618aeac328e35ac3b
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Divide by zero when scrolling with 'smoothscroll' set.
Solution: Avoid using a negative width. (closes vim/vim#12540, closes vim/vim#12528)
https://github.com/vim/vim/commit/8154e642aa476e1a5d3de66c34e8289845b2b797
Co-authored-by: fullwaywang <fullwaywang@tencent.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Not all cabal config files are recognized.
Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463)
https://github.com/vim/vim/commit/166cd7b801ebe4aa042a9bbd6007d1951800aaa9
Also:
- Do not expand Lua patterns in environment variables used in file patterns.
- Test $XDG_CONFIG_HOME on Windows, as it can be used by Nvim (and the runner
sets it).
Co-authored-by: Marcin Szamotulski <coot@coot.me>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Prepare for https://github.com/neovim/tree-sitter-vimdoc/pull/108 which improves
`{arg}` highlighting in many common cases:
vim.foo({bar})
vim.foo( {bar})
nvim_foo({bar})
nvim_foo({bar},{baz})
nvim_foo({bar}, {baz})
foo[{buf}]
The tradeoff is that things like `"[{"` are flagged as parse errors.
We could avoid if we drop support for `foo[{buf}]`, but that is rather common
(see `builtin.txt`).
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
Using "nvim -l args.lua" without passing extra script args, does not set `_G.arg[0]`.
Steps to reproduce:
```
cat > args.lua<<EOF
vim.print(_G.arg, '')
vim.print(vim.v.argv, '')
EOF
nvim --clean -l args.lua
```
Solution:
Fix condition in command_line_scan.
|