| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
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'.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sourcing buffer lines may lead to errors for conflicts.
Solution: Add the ++clear argument. (Yegappan Lakshmanan, closes vim/vim#9991)
https://github.com/vim/vim/commit/35dc17634dd6da5b90bd1b0160c4ed9e394f4b87
Documentation changes only. Vim9script is N/A.
Cherry-pick another documentation change for :source from latest Vim.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sourcing buffer lines is too complicated.
Solution: Simplify the code. Make it possible to source Vim9 script lines.
(Yegappan Lakshmanan, closes vim/vim#9974)
https://github.com/vim/vim/commit/85b43c6cb7d56919e245622f4e42db6d8bee4194
This commit changes the behavior of sourcing buffer lines to always have
a script ID, although sourcing the same buffer always produces the same
script ID.
vim-patch:9.1.0372: Calling CLEAR_FIELD() on the same struct twice
Problem: Calling CLEAR_FIELD() on the same struct twice.
Solution: Remove the second CLEAR_FIELD(). Move the assignment of
cookie.sourceing_lnum (zeertzjq).
closes: vim/vim#14627
https://github.com/vim/vim/commit/f68517c1671dfedcc1555da50bc0b3de6d2842f6
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Need to write script to a file to be able to source them.
Solution: Make ":source" use lines from the current buffer. (Yegappan
Lakshmanan et al., closes vim/vim#9967)
https://github.com/vim/vim/commit/36a5b6867bb6c0bd69c8da7d788000ab8a0b0ab0
Most code and test changes are reverted or modified again in patch
8.2.4603, so only port parts that are untouched in patch 8.2.4603.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
|
|
|
|
|
|
|
|
| |
closes: vim/vim#16749
https://github.com/vim/vim/commit/3d75ec7401850e8a80ae7ab5ad1b84f47bc32095
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(#32671)
closes: vim/vim#16743
https://github.com/vim/vim/commit/85a50fe825ba11a35ce654f7313b4350e3ba4b52
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calls after "|" (#32670)
Match Vim9 function calls after ex-bar. These are also currently
matched but invalid syntax for legacy script.
fixes: vim/vim#16721
closes: vim/vim#16747
https://github.com/vim/vim/commit/60bd140256be4f567c28c60eb84be72c19a164bd
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
| |
- Move all generator Lua scripts to the `src/gen/`
- Add a `.luarc.json` to `src/gen/`
- Add a `preload.lua` to `src/gen/`
- Add `src` to `package.path` so it aligns with `.luarc.json'
- Fix all `require` statements in `src/gen/` so they are consistent:
- `require('scripts.foo')` -> `require('gen.foo')`
- `require('src.nvim.options')` -> `require('nvim.options')`
- `require('api.dispatch_deprecated')` -> `require('nvim.api.dispatch_deprecated')`
|
|
|
|
|
|
|
|
| |
closes: vim/vim#16729
https://github.com/vim/vim/commit/580e457a2a5fa63b9be0bf5f2c81434e157bcc0a
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- let keywordprg in vim filetype handle context-sensitive help calls by
detecting the syntax group of the word under the cursor
- reformat whitespace
- add modeline
related: vim/vim#16677
closes: vim/vim#16680
https://github.com/vim/vim/commit/094494bf2eef8d788944b2b00b3361feb545d3ae
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Co-authored-by: Andrew Radev <andrey.radev@gmail.com>
Co-authored-by: "D. Ben Knoble" <ben.knoble+github@gmail.com>
Co-authored-by: Gary Johnson <garyjohn@spocom.com>
Co-authored-by: Tim Pope <code@tpope.net>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
:SynMenu commands (#32605)
closes: vim/vim#16713
https://github.com/vim/vim/commit/025dc48e88790133ef0da583b2ce5b9c2232ea9e
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
|
|
|
|
|
| |
Problem: there is no way to distinguish between user's explicit
completion stop/cancel and other automated reasons.
Solution: update "cancel" reason to be set only on explicit CTRL-e, and
set intentionally vague "discard" otherwise.
|
| |
|
|
|
|
|
| |
#32597
This reverts commit f398e3a61abbf802b49867d2f533be1b0725c0d7.
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Lua coroutines can yield across non-coroutine function boundaries,
meaning that we don't need to wrap each helper function in a coroutine
and resume it within `_parse()`. If we just have them yield when
appropriate, this will be caught by the top level `_parse()` coroutine,
and resuming the `_parse()` will resume from the position in the helper
function where we yielded last.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
- Many other ftplugin have defined 'omnifunc', but the Lua one doesn't
define one, even though there is `vim.lua_omnifunc()`
- Users may want "stupid" completion to fix Lua config with
`nvim --clean` in case they breaks it
Solution:
Set 'omnifunc' to 'v:lua.vim.lua_omnifunc' in ftplugin/lua.lua
|
| |
| |
| |
| |
| |
| |
| | |
Problem:
vim.log.levels.* and vim.opt_local are marked `@private` but they should be `@nodoc`.
Solution:
Fix the annotation.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: Guile init file not recognized
Solution: detect '.guile' file as scheme filetype
(David Mandelberg)
References:
https://www.gnu.org/software/guile/manual/html_node/Init-File.html
> When run interactively, Guile will load a local initialization file
> from ~/.guile. This file should contain Scheme expressions for
> evaluation.
closes: vim/vim#16683
https://github.com/vim/vim/commit/41a6026f007facb1ada3ff2a63a054913432860c
Co-authored-by: David Mandelberg <david@mandelberg.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: xkb files not recognized everywhere
Solution: detect xkb files in more places
(David Mandelberg)
References:
https://xkbcommon.org/doc/current/user-configuration.html#user-config-locations
closes: vim/vim#16684
https://github.com/vim/vim/commit/b62bf814886185cb8607ce15051aa7017b8c88ba
Co-authored-by: David Mandelberg <david@mandelberg.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#16698
https://github.com/vim/vim/commit/61af587f26f56be7d6b55f77e42cc89504942cc0
Co-authored-by: David Mandelberg <david@mandelberg.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#16704
https://github.com/vim/vim/commit/d15114c148e615b0c244e94bf91548299f6af047
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
|
| |
| |
| | |
fix: twice nunmap in ftplugin
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: It's difficult to navigate large structured text files (vim
help, checkhealth, Markdown).
Solution: Support `gO` for table of contents and `]]`/`[[` for moving
between headings for all these filetypes using treesitter queries.
Refactor: colorization of highlight groups is moved to the `help` ftplugin
while headings-related functionality is implemented in a private
`vim.treesitter` module for possible future use for other filetypes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
After https://github.com/neovim/neovim/pull/32377 selecting snippets
provided by luals inserted the multi-line text before accepting the
candidates. That's inconsistent with servers who provide `textEdit`
instead of `insertText` and having lines shift up/down while cycling
through the completion candidates is a bit irritating.
Solution:
Use the logic used for `textEdit` snippets also for `insertText`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** Currently, parsing is asynchronous, but it involves a
(sometimes lengthy) step which finds all injection ranges for a tree by
iterating over that language's injection queries. This causes edits in
large files to be extremely slow, and also causes a long stutter during
the initial parse of a large file.
**Solution:** Break up the injection query iteration over multiple event
loop iterations.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
References:
https://datatracker.ietf.org/doc/html/rfc5228#section-2.2
closes: vim/vim#16685
https://github.com/vim/vim/commit/3cb41489dc8856959c1d586217f141ce057dc373
Co-authored-by: David Mandelberg <david@mandelberg.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The new native commenting functionality is currently not used when
editing mail. One could reasonably expect it to change the "quote" state
of any given line in the mail (i.e. the preceding ">"), which would be
very handy and feel natural when editing mail. Especially since the
current file already uses "setlocal comments+=n:>".
Solution: Add commentstring to `> %s` to be used in files of type mail.
closes: vim/vim#16669
https://github.com/vim/vim/commit/27f51367613a150877e88d2379409bebdf32052b
Co-authored-by: Lucas Eekhof <105216949+eekhof@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#16671
https://github.com/vim/vim/commit/106899eb21ac0adfa0e31229d921a5f81e6a7e22
Co-authored-by: dringsim <dringsim@qq.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
runtime/syntax/dosini.vim supports both ; and # as comments, and I think
a bunch of the files detected as dosini do too, so add support for # to
the ftplugin.
closes: vim/vim#16681
https://github.com/vim/vim/commit/911742a975caf69c1e35a866288f58450eb476cd
Co-authored-by: David Mandelberg <david@mandelberg.org>
|
| |
| |
| |
| | |
Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Messages preceding a `cmdline_show->prompt` event can not be
distinguished as such when receiving the event. (But since
`msg_show` handlers should be scheduled, one can already check
whether a prompt is active when displaying the message.)
Solution: Rather than add a new kind again, use the `confirm` kind.
Could be seen as slightly misleading where it is more of
a choice rather than a confirmation, but that already applies
to `confirm()` as well...
|
| |
| |
| |
| | |
Add a new field `virt_lines_overflow` that enables horizontal scrolling
for virtual lines when set to "scroll".
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PuTTY sets TERM=xterm, but sends ESC[1~ and ESC[4~ for Home/End keys,
which does not match what the 'xterm' terminfo has for khome/kend, so
libtermkeys instead reports them as the original DEC VT220 names.
The VT220 came with a DEC LK201 keyboard which had the following keys in
the area above arrow keys (where PCs now have Ins/Del/Home/End/etc):
┌────────┬────────┬────────┐
│ Find │ Insert │ Re- │
│ │ Here │ move │
├────────┼────────┼────────┤
│ Select │ Prev │ Next │
│ │ Screen │ Screen │
└────────┴────────┴────────┘
These would send ESC[x~ sequences in the expected order:
┌────────┬────────┬────────┐
│ ESC[1~ │ ESC[2~ │ ESC[3~ │
├────────┼────────┼────────┤
│ ESC[4~ │ ESC[5~ │ ESC[6~ │
└────────┴────────┴────────┘
Modern terminals continue to use the same sequences for Ins/Del as well
as PageUp/PageDn. But the VT220 keyboard apparently had no Home/End, and
PuTTY apparently chose to re-purpose the Find/Select key sequences for
Home/End (even though it claims to emulate Xterm and this doesn't match
what actual Xterm does).
So when Home/End are used in Neovim through PuTTY with TERM=xterm (the
default setting), libtermkey finds no match for the received sequences
in the terminfo database and defaults to reporting them as <Find> and
<Select> respectively.
PuTTY is not unique here -- tmux *also* sends ESC[1~ and ESC[4~ after
its internal translation -- but the difference is that 'tmux' terminfo
correctly maps them to Home/End so Neovim recognizes them as such, while
PuTTY defaults to using 'xterm' which uses a different mapping.
This initial patch only allows Neovim to recognize <Find> and <Select>
key codes as themselves, so that the user could manually map them e.g.
using ":imap <Find> <Home>".
Alternatives:
- Using TERM=putty(-256color) would of course be the most correct
solution, but in practice it leads to other minor issues, e.g. the
need to have different PuTTY config profiles for older or non-Linux
systems that lack that terminfo, or tmux's insistence on rendering
italics as reverse.
- Using Neovim through tmux avoids the problem (as tmux recognizes
ESC[1~ on input), but is something that needs to be manually run
every time.
The keycodes.h constants are slightly misnamed because K_SELECT was
already taken for a different purpose.
|
| |
| |
| |
| |
| |
| |
| |
| | |
from netrw (#32506)
closes: vim/vim#16494
fixes: #vim/vim#16486
https://github.com/vim/vim/commit/c729d6d154e097b439ff264b9736604824f4a5f4
|
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** An erroneous query in the treesitter highlighter gives a
deluge of errors that makes the editor almost unusable.
**Solution:** Detach the highlighter after an error is detected, so that
it only gets displayed once (per highlighter instance).
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Computing fold levels for an empty buffer (somehow) breaks the
parser state, resulting in a broken highlighter and foldexpr.
Cached foldexpr parser is invalid after filetype has changed.
Solution: Avoid computing fold levels for empty buffer.
Clear cached foldinfos upon `FileType`.
|