| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Work towards enabling ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
in all `:help` files.
Problem:
The final boss of vimdoc pseudo-structure: Vim's quasi-headings on
function signatures and excmd docs is visually distinctive but too
inconsistent for a nice parse rule.
Solution:
- Define the quasi-heading format as an "h4" variant, specified at
`:help help-tag-heading`.
- For simplicity and predictability, it is defined as any line that
ends with a help tag(s) preceded by 2 or more spaces (or 1 tab).
- Update existing docs.
- This one-time update has a lot of changes, but is very unlikely to
conflict with ported Vim-patches because (1) Vim rarely adds new
*excmds* that we want, and (2) *function* docs are auto-generated.
ref https://github.com/neovim/tree-sitter-vimdoc/issues/110
|
| |
|
|
|
|
|
|
| |
Problem:
By default, 'termpastefilter' removes TAB chars when pasting to a :terminal.
Very annoying, and does not improve "security".
Solution:
Drop "HT" from the 'termpastefilter' default.
|
| |
|
|
|
|
|
|
|
| |
Problem:
No "spec" for various :help format (vimdoc) conventions, including the
new "table" support.
Solution:
Introduce `:help help-spec`.
Also, bump the vimdoc parser.
|
| |
|
|
|
|
|
|
|
|
| |
Work towards enabling "flow" layout in most `:help` files.
Since [tables are supported in help](https://github.com/neovim/tree-sitter-vimdoc#tables),
it's now possible to render most help files as ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
instead of the legacy fixed-width layout. Besides [improved HTML rendering](https://github.com/neovim/neovim/pull/42381#discussion_r4285705739),
flow layout will allow `:help` presentation-mode to un-hardwrap text
blocks.
|
| |
|
|
|
|
|
|
|
|
| |
Work towards enabling "flow" layout in most `:help` files.
Since [tables are supported in help](https://github.com/neovim/tree-sitter-vimdoc#tables),
it's now possible to render most help files as ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
instead of the legacy fixed-width layout. Besides [improved HTML rendering](https://github.com/neovim/neovim/pull/42381#discussion_r4285705739),
flow layout will allow `:help` presentation-mode to un-hardwrap text
blocks.
|
| |
|
|
|
|
|
|
|
|
| |
Work towards enabling "flow" layout in most `:help` files.
Since [tables are supported in
help](https://github.com/neovim/tree-sitter-vimdoc#tables), it's now possible to
render most help files as ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
instead of the legacy fixed-width layout. Besides [improved HTML rendering](https://github.com/neovim/neovim/pull/42381#discussion_r4285705739),
flow layout will allow `:help` presentation-mode to un-hardwrap text blocks.
https://github.com/neovim/neovim/issues/31825
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Highlight inspection is limited to a single position, and its
result types do not document the fields shared by different highlight
sources.
Solution: Accept end_row/end_col in vim.inspect_pos to inspect a range.
Keep range ends exclusive and retain the existing single-position
behavior.
Support Ex line ranges in :Inspect, including Visual selections.
Document named result types, expose shared highlight fields, and keep
the existing extmark details and buffer field for compatibility.
AI-assisted
|
| |
|
| |
highlights.scm: `#match` is slow, prefer `#lua-match`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
vim.diagnostic.Opts.VirtualText has a `source` option to prefix
diagnostic messages with their source (`'if_many'` or always), but the
newer virtual_lines handler never got the same option, even though the
shared helpers it needs (diagnostic_shared.prefix_source/count_sources)
are already render-target-agnostic and used by virtual_text as-is.
Add the same `source` field to vim.diagnostic.Opts.VirtualLines and
apply it in the virtual_lines handler right after message formatting,
mirroring virtual_text's own ordering (format first, then prefix the
source onto the already-formatted message).
|
| |
|
|
|
| |
Generate PDF using `chrome`.
TODO: we probably don't need the `typst` codepath.
|
| |
|
|
|
|
| |
Render tables in both `:help` and generated HTML.
Use NBSP (nonbreaking space) char in empty table cells.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
- `<` before a listitem (`< - foo`) is not concealed.
- Codeblock HTML has extra blank lines.
- Codeblock in a listitem ends the listitem, so HTML docs drop the rest
of the item and its nesting. Example from `:h nvim_open_win()`:
```
• border: … the double-box style can be specified as: >
[ "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" ].
<
If fewer than eight chars are given, they will be repeated.
• bufpos: …
tree-sitter-vimdoc v4.1.0:
(block
(line_li (prefix) (line) (codeblock (code (line)))))
(block
(line) ; "If fewer…"
(line_li (prefix) (line) (line))) ; "bufpos"
tree-sitter-vimdoc v4.2.0:
(block
(line_li (prefix) (line) (codeblock (code (line)))
(line)) ; "If fewer…"
(line_li (prefix) (line) (line))) ; "bufpos"
```
Solution:
- Bump tree-sitter-vimdoc to v4.2.0. https://github.com/neovim/tree-sitter-vimdoc/pull/174
- gen_help_html: get listitem indent from its first line
- gen_help_html: don't double codeblock newlines.
- highlight query: conceal `<` in `line_li`.
- docs: fix doc sources where a blank line was missing after listitems
followed by non-listitem text.
|
| |
|
|
|
|
|
|
|
|
|
| |
via filename
While at it, also fix E716 when calling gnat.Get_Command('Find')
by renaming the key from 'Find_Program' to the expected 'Find_Command'.
https://github.com/vim/vim/commit/26d8c851889df19e93dde2a3572e1e356b3a84e3
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
| |
|
|
|
| |
Fixes some vimdoc CI errors: https://github.com/neovim/tree-sitter-vimdoc/blob/0c53e5be84a62cee1e583b15febf2b90720e52c9/.github/workflows/main.yml#L41-L47
The other errors are "lone backtick" cases, which will be fixed by https://github.com/neovim/tree-sitter-vimdoc/pull/171
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`nvim_set_option_value('fo', {'c','r','o'}, {operation='remove'})` does
nothing on "jcqrol": the items are joined into one `:set-=` value, which
only matches a contiguous substring. Removing map keys, e.g. {'eol','space'}
from 'listchars', never matches. `vim.opt:remove{…}` inherits this.
(Regression from f34ee3da80e8; 429338e74bf4 fixed the case where the
flags are adjacent and in order.)
Solution:
Remove each item separately.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
After clearing cursors, "]C" "[C" do nothing, although the previous
cursor positions ("gQ") may still be useful as marks.
Solution:
If multicursor is not active, "]C" "[C" iterate the
"nvim.multicursor.last" extmarks. They also work as an operator motion
("d]C"), since there is no cascade.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
- `v:cascading` is false during the Insert-mode live-preview.
- `vim.on_key()` sees the internal keys of the Visual-selection preview
and "zq" steps.
Solution:
- Set `v:cascading` during the Insert-mode preview.
- Don't send internal keys to `on_key` callbacks.
- Use `v:cascading` as the source of truth for `mc_replaying()`.
|
| |
|
|
|
| |
Problem: No way to check if cascade is in action.
Solution: Add `v:cascading` variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
With multicursors, an Insert-mode edit by a Lua/`<Cmd>` mapping or API
(nvim_put(), …) is live-previewed at the other cursors, but dropped at
ESC: the cascade replays _redo_, which does not contain such edits.
Solution:
When `<Cmd>`/Lua/RPC changes the buffer during Insert-mode, sync the
previews and restart the capture (like a non-captured cursor-move). The
edit stays as text.
- The mapping runs only at the primary. Its text is mirrored as-is
(similar to insert-completion). Re-running it per cursor would require
a "partial-remap" span replay, and breaks single-session plugins
(vim.snippet).
- Not during completion; redo already captures the pre-inserted
candidate on accept.
- Text typed before the edit is kept as mirrored, not replayed, so
per-cursor effects ('textwidth' wrapping, …) don't apply to it.
Known issues:
- "o"/"O"/"cc" with 'autoindent' followed by the mapping: the per-cursor
insert-entry replay is still pending, so the edit is lost.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`nvim --embed --listen addr` always treats stdin as an RPC channel. If
stdin is /dev/null (e.g. backgrounded over ssh), the channel closes
before a UI can attach, so Nvim exits (detach=false behavior). If stdin
is a tty, keystrokes are read as RPC.
Solution:
With `--embed --listen`, open the stdio RPC channel only if stdin is
a pipe or socket. Else wait for a UI at the `--listen` address.
$ nvim --embed --listen ./nvim.sock
Nvim server (pid: 71984) waiting for UI, listening on: "./nvim.sock"
Note:
- No change when stdin is a pipe. So the test harness, TUI, and :restart
all behave exactly as before.
- The #29634 use-case of configuring a UI that attaches *after* startup
(a second UI, or reattach) still requires #25377 (reliable UIEnter).
Not affected by this change.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Only the stdio channel can "own" a server (self-exit on close). After
:restart the TUI reconnects over a socket, so the restarted server does
not have "self-exit" behavior when the channel closes (e.g. by UI
disconnect, host-terminal close, etc.), which leaves a dangling server.
Solution:
- Introduce `nvim_chan_set`. (`nvim_set_client_info` doesn't fit:
exposing it to Lua would require a `channel` param, which is not
backwards-compatible, plus it's awkward because it doesn't merge info.)
- Broadcast per-channel properties in the "restart" UI event as an
opaque dict (a potentially useful pattern for other UI-events in the
future).
- UIs are expected to restore the channel properties on restart.
- `nvim_get_chan_info()` reports "detach".
- Remove `nvim__chan_set_detach()`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
'isident' decides how env var names are parsed, which is more
"confusing" than "useful":
- Changing 'isident' (for 'define' or "\i") can break `$NAME` expansion.
- Its default byte ranges let multibyte names work on Windows (`$aあ`)
but not Unix (`$é`).
Solution:
Ignore 'isident' when parsing env var names.
|
| |
|
|
|
|
|
|
|
| |
Problem:
`vim.fs.find()` checks `type` against the symlink itself, so
`{ type='file', follow=true }` skips symlinked files (e.g. `:helptags`).
Solution:
With `follow=true`, a symlink has the type of its target. Thus
`type='link'` only matches broken symlinks (like `find -L -type l`).
|
| |\
| |
| | |
fix(tabline): make TabLineFill base highlight group of default 'tabline'
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow-up to #41196
Problem: since #29976, the custom 'tabline' has a base highlight group
TabLineFill that all %# highlights are automatically combined with.
But the default C implementation still uses the TabLine and TabLineSel
highlight groups uncombined, or rather effectively combined with Normal.
Therefore, themes cannot depend on the base highlighting if they want to
support both the default and custom tab lines.
Solution: automatically combine TabLine and TabLineSel with TabLineFill
in the default C implementation.
fix https://github.com/neovim/neovim/issues/41173
ref https://github.com/neovim/neovim/pull/41196
ref https://github.com/neovim/neovim/pull/29976
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: A DiffUpdated autococmd wiping the current buffer
can cause a use-after-free (Evaopo).
Solution: Disallow changing the window layout while DiffUpdated
autocommand runs.
closes: vim/vim#21177
https://github.com/vim/vim/commit/d81720e01a7ce79afa2c55aff5270d9f394ccbbe
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |/
|
|
|
|
|
|
|
| |
Problem:
vim.lsp.completion.get() always asks every client that has completion
enabled in the buffer, so a mapping cannot ask just some of them.
Solution:
Add a "client_id" option that limits the request to the given client,
or clients if it is a list.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
- At session end, `'< '>` revert to the session-start snapshot, which
drops a selection made during the session. And the snapshot may be
from another buffer.
- `zqgj` skips screen rows: `zq` tries the motion before the steps, and
those trial runs advance `w_curswant`.
Solution:
- Keep the primary's `'< '>` at session-end.
- Restore `w_curswant` after the trial runs and after each run of steps.
|
| |
|
|
|
|
|
|
|
| |
Problem: End-of-line virtual text is drawn directly after a displayed
listchars eol character.
Solution: Preserve the normal one-cell separator after the eol
character.
AI-assisted
|
| |
|
|
|
|
|
|
|
|
|
| |
Most syntax files currently use String or Normal for highlighting
regular expression literals; these should have a dedicated group.
closes: vim/vim#21141
https://github.com/vim/vim/commit/5cbadec2e63b0e38c7c1fe4ae9c07b07123299b8
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: need a few more default highlight groups
Solution: Add Bold, Italic and BoldItalic default highlight groups
(Maxim Kim).
related: https://github.com/vim/vim/pull/17598#issuecomment-3007320523
closes: vim/vim#17804
https://github.com/vim/vim/commit/16f7098e68951ce421512c34d03810bdd1efbaed
Co-authored-by: Maxim Kim <habamax@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
consider the following test_script.lua :
print 'hello\n' -- TWO new lines
print 'this is \027[31mRED FOR AN AMAZING REASON\027[0m'
print 'foo'
print '' -- newline despite empty!
print 'bar'
-- a bit later:
os.execute 'sleep 2' -- CPU goes BRR, cursor in column zero
print 'more bar'
before this PR, `nvim -l test_script.lua` had some weird behaviors
compared to `lua test_script.lua` or the now removed `nvim -ll
test_script.lua`.
- one extra '\n' at the end of a print is ignored, one would need
TWO '\n' for a single extra '\n'
- an empty print'' is supposed to print an empty line
- print'\027[31mRED' is being escaped so it does not work
- the cursor gets stuck at the end of a message, instead of after
emitting the new line, this looks like the CPU lag has something
to do with the _last_ printed message which is likely not the case.
I consider these behaviors to be unintentional (a consequence of
stragglig through the message.c meta-machine, which is optimized
for message handling in _an interative text editor_) and getting
closer to plain lua behavior would be better.
An alternative would be to restore the builtin print(), but our
implemenation still has some benefits, like try
`print(setmetatable({}, {__tostring=error})` in plain lua..
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as commands (#42196)
Problem: In a block that is not executed, the text lines of :append,
:insert and :change are parsed as commands, so e.g. a text
line "endif" ends the block
Solution: Read and discard the text up to "." while skipping. Add the
commands to the ":help :bar" list.
closes: vim/vim#21331
https://github.com/vim/vim/commit/ae8837c19d33801426cb2dfa1cdbd7be7c1cf8e2
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem 1: many status line sections are automatically hidden when they
currently aren't relevant. When such a section contains highlights, the
exact pre-section highlighting needs to be reset at the end, otherwise
the highlighting of unrelated sections to the right depend on whether
the section is hidden or not. And in case of auto-hiding item groups,
it might even refuse to hide.
Problem 2: when only a part in the middle of a section should deviate
from the surrounding highlighting, the section needs knowledge of the
highlighting outside in order to reset it, which makes it hard to create
self-contained, reusable modules.
Problem 3: with nested sections of progressively stacked highlighting
changes, the last %$-modifications effectively have to be subtracted
when ending a subsection. This can only be done by replaying all the
pre-subsection changes from the last %#.
Solution: Introduce highlight scopes %#(...%#) that automatically reset
pre-scope highlighting at the end.
ref #26037
ref #29976
ref #29980
ref #35806
ref #36685
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
- annotation-usage-error and code-style-check are disabled.
- vim.inspect relies on a dummy self-assignment for docgen, and its help
omits parameter and option details.
- LuaLS fallback types obscure iterator inference.
- Docgen hardcodes public function names and appends separately sorted
files, leaving shared helpers under the inspector heading.
Solution:
- Enable annotation-usage-error and code-style-check, and fix misplaced
annotations.
- Document vim.inspect's callable module directly, removing the dummy
assignment. Describe its parameters, option defaults and process
callback.
- Remove LuaLS iterator fallbacks, correct iterator signatures and check
values that the improved inference identifies as optional.
- Parse callable modules, require bindings and parent module references.
Derive public names and inherited function docs from these links,
including missing help for vim.async.semaphore() and vim.version().
- Export vim.lsp.tagfunc directly with lazy loading and document its
implementation instead of maintaining a wrapper.
- Group files in section_order, replacing append_only and merge_files.
Merge declarations before sorting each section, placing shared helpers
in the main vim section and keeping vim.inspect in alphabetical order.
- Add basic parser coverage for callable modules and module links.
AI-assisted
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- `{Visual}Q` / `{Visual}zqj`: for linewise motion ("j"), every line
gets a cursor.
- `zq`: handle 3-key motions (`g'a`), don't scroll the view, preserve
the search direction, update existing cursors `gv` target.
- Disallow `zq` in macros.
- Abort `zq` on non-motion ("zqx").
- Classify `g'x` classify like `'x`.
- Classify `'(` `'{` etc. as `type=motion` (they are cursor-relative).
- Perf: skip save/restore of marks when cascading motions ('follow').
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`nvim_mcursor` is not fully baked, and not strongly motivated,
currently. The main programmatic interface for cursors is the
"nvim.multicursor" extmarks namespace.
Solution:
Drop `nvim_mcursor`. Add an internal hook so that multicursor can react
when extmarks are added to the "nvim.multicursor" namespace.
TODO:
If extmarks/namespaces are clumsy to work with, we should _fix that_
rather than adding wrappers.
|
| |\ \
| | |
| | | |
fix(lua): enable param-type-mismatch diagnostic
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Argument type mismatches are excluded from EmmyLua checks.
Solution: Correct runtime annotations and calls, document local checker
workarounds, and enable the diagnostic.
AI-assisted
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Command inputs and parsed modifiers have different optional
fields, and completion window IDs are annotated as floating-point
values.
Solution: Separate modifier input and return types, correct integer IDs,
and update the metadata generators and their output.
AI-assisted
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: A child root=false masks a parent root=true during merging.
Solution: Return the search boundary separately from string properties.
Exclude root from property callbacks and |