| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
This matches the `iter_captures` functionality to the `iter_matches`
functionality, allowing it to specify a match limit and start depth for
the query iterator.
|
| |
|
|
|
|
|
|
|
|
|
| |
(#32845)
fixes: vim/vim#16849
https://github.com/vim/vim/commit/0a336ccb57003c44ba303ccc50cf50cb640c2309
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
| |
* fix(lsp): rename `on_publish_diagnostics` parameter: result->params
* fix(colors): specify local var type to address lint failure
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot disable individual captures and patterns in treesitter queries.
Solution:
* Expose the corresponding tree-sitter API functions for `TSQuery` object.
* Add documentation for `TSQuery`.
* Return the pattern ID from `get_captures_at_pos()` (and hence `:Inspect!`).
|
|
|
|
|
| |
Problem: `InspectTree` error on buffer without ts parser attached.
Solution: show a more correct warning.
|
|
|
|
|
| |
Problem: The current implementation creates a unique autocommand group for each floating preview window, which is inefficient and can lead to numerous autocommand groups.
Solution: Use a single shared autocommand group with improved window validation to properly clean up LSP floating preview windows.
|
|
|
|
|
| |
Problem: ctx is passed directly to M.trigger. In fact, it is a field of opts.
Solution: wrapped in a table and passed to M.trigger.
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: false positive help filetype detection
Solution: Only detect a file as help if modeline appears either at start
of line or is preceded by whitespace (zeertzjq).
closes: vim/vim#16845
https://github.com/vim/vim/commit/6763b0ee95e7e66ab7992653fbba48691e803e70
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: help files in git repos are not detected
Solution: detect */doc/*.txt files as help if they end with a help
modeline, even if 'modeline' is off
Here's how I checked that this would still detect vim's own help files
correctly:
$ find . -type f -path '*/doc/*.txt' \
> -exec awk '{ } ENDFILE { print FILENAME ":" $0; }' '{}' + |
> grep -v 'vim:.*\<\(ft\|filetype\)=help\>'
./src/libvterm/doc/seqs.txt: 23 DECSM 42 = DECNRCM, national/multinational character
closes: vim/vim#16817
https://github.com/vim/vim/commit/16d6fff98ed3a9dfd34a41696b005b0c4c7800f8
Split the pattern into a Lua pattern for the first part and a Vim regex
pattern for the second part, so that if the first part doesn't match
there is no need to use the Vim regex.
Co-authored-by: David Mandelberg <david@mandelberg.org>
|
|
|
|
|
|
|
|
|
| |
Problem:
:checkhealth vim.treesitter sorts parser entries solely by path,
splitting duplicates and reducing clarity.
Solution:
Sort entries first by name, then by path, so that duplicates are grouped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The root dir function is not passed any context and can only assume the
current buffer is the one being attached.
The main use case is for getting the path of the buffer using
`nvim_buf_get_name`.
Solution:
Pass the buffer number as the first argument.
|
|
|
|
|
|
|
|
|
| |
Problem:
vim.lsp.completion with "autotrigger" enabled, does not send
completion context, even though it has all the necessary info.
Solution:
Include the context for "autotrigger".
trigger() also optionally accepts context when manually invoked.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
"make lintdoc" is not validating vimdoc (:help) tags.
Solution:
- Call `lang_tree:parse()` to init the parser.
- Load netrw 🤢 explicitly, since it was moved to `pack/dist/opt/`.
- Fix invalid help tags.
|
|
|
|
|
| |
These functions are allowed to be used downstream, they are just not API
stable.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: tera files not detected
Solution: detect '*.tera' files as tera filetype,
include a simple filetype plugin
(MuntasirSZN)
closes: vim/vim#16806
https://github.com/vim/vim/commit/5daaf2326800ff0683a5be9a7f475667a4fc09db
Co-authored-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: ABNF files are not detected
Solution: detect '.abnf' file as abnf filetype and
include an abnf syntax plugin (A4-Tacks).
References:
- RFC5234
- RFC7405
closes: vim/vim#16802
https://github.com/vim/vim/commit/9f827ec58728c4ea55a8d71d40a283ca2ce5b058
Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
|
|
|
|
|
| |
* fix(lsp): don't call codeAction_resolve with commands
* feat(lsp): support for resolving code action command
|
|
|
|
| |
Per https://github.com/tmux/tmux/issues/4386, tmux does not support DCS
responses, even if the initial request was escaped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a plugin registers a TermRequest handler there is currently no way
for the handler to know where the terminal's cursor position was when
the sequence was received. This is often useful information, e.g. for
OSC 133 sequences which are used to annotate shell prompts.
Modify the event data for the TermRequest autocommand to be a table
instead of just a string. The "sequence" field of the table contains the
sequence string and the "cursor" field contains the cursor
position when the sequence was received.
To maintain consistency between TermRequest and TermResponse (and to
future proof the latter), TermResponse's event data is also updated to
be a table with a "sequence" field.
BREAKING CHANGE: event data for TermRequest and TermResponse is now a
table
|
|
|
|
|
|
|
| |
Problem: After 47aaddfa the max_height option is no longer respected.
Hover documentation and Signature help windows take up the
entire text height.
Solution: Compare to window's current height and only modify the height
if it would reduce the height, not enlarge it.
|
|
|
|
|
| |
When multiple diagnostics appear on a single line, the virtual lines for
all diagnostics except the first were rendered with progressively fewer
columns.
|
|
|
|
|
| |
closes: vim/vim#16773
https://github.com/vim/vim/commit/659cb28c25b756e59c712c337f8b4650e85f8bcd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: command-line auto-completion hard with wildmenu
Solution: implement "noselect" wildoption value (Girish Palya)
When `noselect` is present in `wildmode` and 'wildmenu' is enabled, the
completion menu appears without pre-selecting the first item.
This change makes it easier to implement command-line auto-completion,
where the menu dynamically appears as characters are typed, and `<Tab>`
can be used to manually select an item. This can be achieved by
leveraging the `CmdlineChanged` event to insert `wildchar(m)`,
triggering completion menu.
Without this change, auto-completion using the 'wildmenu' mechanism is
not feasible, as it automatically inserts the first match, preventing
dynamic selection.
The following Vimscript snippet demonstrates how to configure
auto-completion using `noselect`:
```vim
vim9script
set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu
autocmd CmdlineChanged : timer_start(0, function(CmdComplete, [getcmdline()]))
def CmdComplete(cur_cmdline: string, timer: number)
var [cmdline, curpos] = [getcmdline(), getcmdpos()]
if cur_cmdline ==# cmdline # Avoid completing each character in keymaps and pasted text
&& !pumvisible() && curpos == cmdline->len() + 1
if cmdline[curpos - 2] =~ '[\w*/:]' # Reduce noise by completing only selected characters
feedkeys("\<C-@>", "ti")
set eventignore+=CmdlineChanged # Suppress redundant completion attempts
timer_start(0, (_) => {
getcmdline()->substitute('\%x00$', '', '')->setcmdline() # Remove <C-@> if no completion items exist
set eventignore-=CmdlineChanged
})
endif
endif
enddef
```
fixes: vim/vim#16551
closes: vim/vim#16759
https://github.com/vim/vim/commit/2bacc3e5fb3569e0fd98e129cb1e422ca18b80a6
Cherry-pick Wildmode_Tests() change from patch 9.0.0418.
Co-authored-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
**Problem:** Some weird languages have different comment syntax
depending on the location in the code, and we do not have a way to
determine the correct `commentstring` for these special cases.
**Solution:** Allow queries to specify `commentstring` values in
metadata, allowing users/`nvim-treesitter` to provide a better
commenting experience without hugely increasing the scope of the code in
core.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: preinsert requires bot "menu" and "menuone" to be set,
but "menu" is redundant (after v9.1.1160)
Solution: preinsert only requires menuone (glepnir)
closes: vim/vim#16763
https://github.com/vim/vim/commit/94a045ed56d7616c0cd0080d3f308d6cf9fbe64c
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
completing items
Problem: The 'preinsert' feature requires Ctrl-Y to confirm insertion,
but Ctrl-Y only works when the popup menu (pum) is displayed.
Without enforcing this dependency, it could lead to confusing
behavior or non-functional features.
Solution: Modify ins_compl_has_preinsert() to check for both 'menu' and
'menuone' flags when 'preinsert' is set. Update documentation
to clarify this requirement. This avoids adding complex
conditional behaviors. (glepnir)
fixes: vim/vim#16728
closes: vim/vim#16753
https://github.com/vim/vim/commit/a2c5559f297a18dc1ce3c4f1f9fd6204aed321c9
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: No way to check the version of a treesitter parser.
Solution: Add version metadata (ABI 15 parsers only) as well as parser state count and supertype information (ABI 15) in `vim.treesitter.language.inspect()`. Also graduate the `abi_version` field, as this is now the official upstream name.
---------
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
|
| |
|
|
|
|
|
|
|
| |
Problem: _on_conceal_line callbacks are not invoked if callback has not
let Nvim know it wants to receive them. But this may change on
factors other than what is currently checked (changed buffer).
Solution: Forego this optimization, callback is still guarded behind
'conceallevel'.
|
| |
|
|
|
|
|
|
|
| |
(#32671)
closes: vim/vim#16743
https://github.com/vim/vim/commit/85a50fe825ba11a35ce654f7313b4350e3ba4b52
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Descriptions are somewhat vague. nvim_set_current_line modifies contents
but nvim_set_current_buf does not, etc.
Solution:
- Make it clear that these functions accept or return a winid/tabid by
linking to that concept in help.
- Only these few files use the term "handles", so replace them with the
more conventional terminology.
- Add a new help section for tab-ID. This concept is unique to neovim
because vim exposes tabnr, but not tab handles. This section is
modelled after `:h winid`.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Indenting text is a common task in plugins/scripts for
presentation/formatting, yet vim has no way of doing it (especially
"dedent", and especially non-buffer text).
Solution:
Introduce `vim.text.indent()`. It sets the *exact* indentation because
that's a more difficult (and thus more useful) task than merely
"increasing the current indent" (which is somewhat easy with a `gsub()`
one-liner).
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Height of a (markdown) `vim.lsp.util.open_floating_preview()`
window can be reduced to account for concealed lines (after #31324).
Solution: Set the window height to the text height of the preview window.
Set 'concealcursor' to avoid unconcealing the cursorline when
entering the hover window.
|
|
|
|
|
|
|
|
| |
TSHighlighter now places marks for conceal_lines metadata. A new
internal decor provider callback _on_conceal_line was added that
instructs the highlighter to place conceal_lines marks whenever the
editor needs to know whether a line is concealed. The bundled markdown
queries use conceal_lines metadata to conceal code block fence lines.
|
|
|
|
| |
Implement an extmark property that conceals lines vertically.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: m17ndb files are not detected
Solution: detect m17ndb files as m17ndb filetype,
include filetype, syntax and indent files for the
new filetype (David Mandelberg).
References:
https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
format. https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/ has
examples of the files.
closes: vim/vim#16696
https://github.com/vim/vim/commit/ed7d8e55ac232758fc14fd132994b4a09b19350b
Also adjust the xkb parent pattern according to dev_vimpatch.txt.
Co-authored-by: David Mandelberg <david@mandelberg.org>
|
| |
|
|\ |
|
| | |
|