| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Error when calling vim.treesitter.start() and vim.treesitter.stop() in
init.lua.
Solution:
Ensure syntaxset augroup exists after loading synload.vim.
|
| |
| |
| |
| | |
(#29522)
|
| |
| |
| |
| | |
Problem: Cannot opt out of removing unloaded buffers from the jumplist.
Solution: Only enable that with "unload" flag in 'jumpoptions'.
|
| |
| |
| |
| |
| | |
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with
`vim._with`.
|
| |\
| | |
| | | |
refactor(typval)!: remove binary distinction of binary and nonbinary strings
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a breaking change which will make refactor of typval and shada
code a lot easier. In particular, code that would use or check for
v:msgpack_types.binary in the wild would be broken. This appears to be
rarely used in existing plugins.
Also some cases where v:msgpack_type.string would be used to represent a
binary string of "string" type, we use a BLOB instead, which is
vimscripts native type for binary blobs, and already was used for BIN
formats when necessary.
msgpackdump(msgpackparse(data)) no longer preserves the distinction
of BIN and STR strings. This is very common behavior for
language-specific msgpack bindings. Nvim uses msgpack as a tool to
serialize its data. Nvim is not a tool to bit-perfectly manipulate
arbitrary msgpack data out in the wild.
The changed tests should indicate how behavior changes in various edge
cases.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Although the built-in pum completion mechanism will filter anyway on the
next input it is odd if the initial popup shows entries which don't
match the current prefix.
Using fuzzy match on the label/prefix is compatible with
`completeopt+=fuzzy` and also doesn't seem to break postfix snippet
cases
Closes https://github.com/neovim/neovim/issues/29287
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: with a single `context.options` there is no way for user to
force which scope (local, global, both) is being temporarily set and
later restored.
Solution: replace single `options` context with `bo`, `go`, `wo`, and
`o`. Naming and implementation follows how options can be set directly
with `vim.*` (like `vim.bo`, etc.).
Options are set for possible target `win` or `buf` context.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: `vim._with()` has many different use cases which are not
covered with tests.
Solution: cover with tests. Some (many) test cases are intentionally
marked as "pending" because they cover cases which don't work as
expected at the moment (and fixing them requires specific knowledge of
C codebase). Use them as a reference for future fixes.
Also some of "can be nested" tests currently might pass only because
the tested context doesn't work.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While this relies on a proposed LSP 3.18 feature, it's fully backwards
compatible, so IMO there's no harm in adding this already.
Looks like some servers already support for this e.g.
- gopls: https://go-review.googlesource.com/c/tools/+/510235
- clangd: https://github.com/llvm/llvm-project/pull/80180
Fixes #27293
|
| |
| |
| | |
Ref #29468
|
| |
| |
| |
| |
| |
| | |
Instead of looping over all captured nodes, just take the end range from
the last node in the list. This uses the fact that nodes returned by
iter_matches are ordered by their range (earlier to later).
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Treesitter highlighter clears the already populated highlight
state when performing spell checking while drawing a
smoothscrolled topline.
Solution: Save and restore the highlight state in the highlighter's
_on_spell_nav callback.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: .envrc & .prettierignore not recognized
Solution: Detect '.envrc' as shell and '.prettierignore' as gitignore
filetype (Tyler Miller)
Support ft detection for `.envrc` files used by direnv, and
`.prettierignore` files used by prettier.
closes: vim/vim#15053
resolves: neovim/neovim#29405
https://github.com/vim/vim/commit/49012cd8c2fb0452847e5d213b07aa8a978f4762
Co-authored-by: Tyler Miller <tmillr@proton.me>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`o`-ing on a folded line opens the fold, because the new line gets the
fold level from the above line (level '='), which extends the fold to
the new line. `O` has a similar problem when run on the line below a
fold.
Solution:
Use -1 for the added line to get the lower level from the above/below
line.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: Faust files are not recognized
Solution: Detect '*.lib' files as Faust filetype, add detection for
'*.dsp' files (Faust or Make), remove '*.lib' from Cobol
filetype (PowerUser64)
closes: vim/vim#14894
https://github.com/vim/vim/commit/aa61b8a9087e9cd999ef07e0d87b60f43d68f2c6
Co-authored-by: PowerUser64 <blake@blakenorth.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
If there are errors in the last line of a buffer, something like `Gdk` or
`G2k3J` will produce an error (at least with `lua_ls`):
Error executing vim.schedule lua callback:
.../neovim/share/nvim/runtime/lua/vim/diagnostic.lua:1446: Invalid 'line': out of range
Solution:
Only set extmarks if the target buffer line still exists
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- update tags to detect djangohtml based on
https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#built-in-tag-reference
- increase the lines to inspect to 40 lines
10 lines is too few and might result in high false negative.
Increasing it to 40 lines should reduce the false negative.
closes: vim/vim#15037
https://github.com/vim/vim/commit/9718ed7ab989c0a0be88a0d749f24321eb0e6af1
Co-authored-by: Afiq Nazrie <afnazrie@gmail.com>
|
| | |
|
| |\
| | |
| | | |
feat(column)!: rework 'statuscolumn' %r/l items
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: A custom 'statuscolumn' needs to check a bunch of options and
placed signs to replicate the default number column.
Solution: Rework %l item to include the necessary logic to mimic the
default number column. Remove now redundant %r item.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Vim-script files may not be recognised
Solution: Add shebang line detection (Doug Kearns)
closes: vim/vim#15012
https://github.com/vim/vim/commit/0d4d23dac0a5a77ccb0ebf1dcf646afe0c6886bf
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: Snakemake files are not recognized
Solution: Detect '*.smk' and Snakefile files as snakemake filetype
(Riley Bruins)
See:
https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility
closes: vim/vim#14992
https://github.com/vim/vim/commit/82a579e15ad78f4b99d2957300da3076ccc7d378
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
When 'ignorecase' is set, the default keymap Q and Q would exit visual
mode.
This issue was raised in #28287 and a fix was applied in #28289.
However, `==` operator is subject to user `ignorecase` setting.
Solution:
Switching to `==#` operator would guarantee case sensitive comparison
between visual mode and linewise visual mode.
Co-authored-by: Kuanju Chen <kuanju.chen@mksinst.com>
|
| |
| |
| |
| |
| |
| | |
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
Co-authored-by: Jose Pedro Oliveira <jose.p.oliveira.oss@gmail.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| | |
https://github.com/vim/vim/commit/c509c009bbc07eff678a9239a5813398e180f019
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
meaning
related: vim/vim#14991
https://github.com/vim/vim/commit/d6d4e1333659c0d2acee3133819498d014df47de
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
For snippets lsp.completion prefers the label if it is shorter than the
insertText or textEdit to support postfix completion cases but clangd
adds decoration characters to labels. E.g.: `•INT16_C(c)`
Solution:
Use parse_snippet on insertText/textEdit before checking if it is
shorter than the label.
Fixes https://github.com/neovim/neovim/issues/29301
|
| |
| |
| |
| |
| |
| | |
This reduces the number of nil checks around buf_versions usage
Test changes were lifted from 5c33815
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
|
| |
| |
| |
| |
| |
| |
| |
| | |
this only changes the error message, so that it is clear that
the error is with the LSP server, rather than being a crash inside
nvim runtime scripts. We are already doing a lot of validation,
it's just that nil was being overlooked here.
This fixes issue #27395
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
virtcol() (vim/vim#14981)
These are different from line() and getpos().
https://github.com/vim/vim/commit/d353d2782032b91498601afefee4256592f48074
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the main description to getpos() and link to that from the other
functions.
closes: vim/vim#14970
https://github.com/vim/vim/commit/02f3ebacfbfa1f892347d7532278f24620e68300
|
| |\
| | |
| | | |
test: do not set termguicolors in test runner
|
| | |
| | |
| | |
| | | |
Instead, return nil plus an error message if the input is invalid.
|
| |\ \
| | | |
| | | | |
fix(vim.wo): never allow non-zero bufnr
|
| | | | |
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
line() (#29296)
Problem: the previous documentation falsely states that "v" always
refers to the start of a visual area. In fact, the reference of "v" and
"." complement each other. If the cursor is at the start of
a (characterwise) visual area, then "v" refers to the end of the area.
Solution: be more verbose and explicit about the connection between "."
and "v" and also refer to |v_o| which many vim users will be familiar
with for visual areas.
https://github.com/vim/vim/commit/210b39c2d686d875e2464ca1f42131453dc6bd41
Co-authored-by: Peter Aronoff <peter@aronoff.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Some vim.fn have no type annotations.
Solution: Add type annotations.
|
| | |
| | |
| | |
| | | |
build(types): allow vararg returns in function types
|
| | | |
|
| | | |
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Creating the table of contents for `gO` is complicated.
Solution: Use treesitter instead.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change fixes an issue where glob patterns like `{a,ab}` would not
match `ab` because the first option `a` matches, then the end of the
string is expected but `b` is found, and LPeg does not backtrack to try
the next option `ab` which would match. The fix here is to also append
the rest of the pattern to the generated LPeg pattern for each option.
This changes a glob `{a,ab}` from being parsed as
("a" or "ab") "end of string"
to
("a" "end of string" or "ab" "end of string")
Here, matching against `ab` would try the first option, fail to match,
then proceed to the next option, and match.
The sacrifice this change makes is dropping support for nested `{}`
conditions, which VSCode doesn't seem to support or test AFAICT.
Fixes #28931
Co-authored-by: Sergey Slipchenko <faergeek@gmail.com>
|
| | | | |
|