summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/tohtml.lua
AgeCommit message (Collapse)AuthorFiles
2026-03-23fix(runtime)!: move "tohtml" to pack/dist/opt/ #34557Justin M. Keyes1
Problem: The "tohtml" plugin is loaded by default. Solution: - Move it to `pack/dist/opt/nvim.tohtml/`, it is an "opt-in" plugin now. - Document guidelines. - Also revert the `plugin/` locations of `spellfile.lua` and `net.lua`. That idea was not worth the trouble, it will be too much re-education for too little gain.
2026-03-13refactor: rename _ensure_integer => _assert_integerJustin M. Keyes1
2026-03-12refactor: integer functions, optimize asserts #34112Lewis Russell1
refactor(lua): add integer coercion helpers Add vim._tointeger() and vim._ensure_integer(), including optional base support, and switch integer-only tonumber()/assert call sites in the Lua runtime to use them. This also cleans up related integer parsing in LSP, health, loader, URI, tohtml, and Treesitter code. supported by AI
2026-03-12docs: use "ev" convention in event-handlersJustin M. Keyes1
Problem: In autocmd examples, using "args" as the event-object name is vague and may be confused with a user-command. Solution: Use "ev" as the conventional event-object name.
2026-03-07refactor(lua): adapt to Stylua 2.4.0Christian Clason1
2025-08-22feat(tui): add nvim_ui_send (#35406)Gregory Anders1
This function allows the Nvim core to write arbitrary data to a TTY connected to a UI's stdout.
2025-06-06fix: type fixesLewis Russell1
Type fixes caught by emmylua
2025-03-10fix(tohtml): disable modeline #32822altermo1
Problem: Running :TOhtml with a file containing modeline may generate an invalid modeline in the output. Solution: Add `<!-- vim: set nomodeline: -->` to the output. Use vi-compatible modeline format ("set foo:"), to avoid the trailing `-->` being treated as part of the modeline.
2025-03-05feat(terminal)!: include cursor position in TermRequest event data (#31609)Gregory Anders1
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
2025-01-27fix: resolve all remaining LuaLS diagnosticsLewis Russell1
2025-01-22fix(inspector): update semantic token namespace (#32157)jdrouhard1
This updates the extmark namespace to search for when filtering out semantic tokens to match the new namespace style recently introduced.
2024-09-08fix(tohtml): enclose font-family names in quotation marksyayoyuyu1
Font-family names must be enclosed in quotation marks to ensure that fonts are applied correctly when there are spaces in the name. Fix an issue where multiple fonts specified in `vim.o.guifont` are inserted as a single element, treating them as a single font. Support for escaping commas with backslash and ignoring spaces after a comma. ref `:help 'guifont'`
2024-08-29fix(tohtml): apply sp color if present #30110Riley Bruins1
Problem: Things like underlines are always given a default foreground highlight regardless of the value of `sp`. Solution: Check for `sp` first, and apply that color to the text decoration color if it exists. Limitations: If there is no value of `sp`, vim applies a text decoration color that matches the foreground of the text. This is still not implemented (and seems like a much more complex problem): in TOhtml, the underline will still be given a default foreground highlight.
2024-07-16fix(tohtml): support ranges againaltermo1
2024-07-16fix(tohtml): extmark text may be out of boundsaltermo1
2024-06-28refactor: use `vim._with` where possibledundargoc1
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with `vim._with`.
2024-06-04refactor(lua): use tuple syntax everywhere #29111Ilia Choly1
2024-05-27refactor: fix luals type warningsdundargoc1
2024-05-26fix(tohtml): properly handle multiple hl groups #29012Riley Bruins1
Problem: :TOhtml doesn't properly handle virtual text when it has multiple highlight groups. It also improperly calculates position offset for multi-byte virt_text characters. Solution: Apply the `vim.api.nvim_strwidth` broadly to properly calculate character offset, and handle the cases where the `hl` argument can be a table of multiple hl groups.
2024-05-26fix(tohtml): show how many warnings are hiddenaltermo1
2024-05-26fix(tohtml): ignore lsp inlay hintsaltermo1
2024-05-26fix(tohtml): replace ipairs with pairsaltermo1
2024-03-07feat(lua): deprecate vim.tbl_add_reverse_lookupMaria José Solano1
2024-03-06refactor(types): more fixes (2)Lewis Russell1
2024-03-04fix(tohtml): replace hex escape with digit escape (#27728)altermo1
2024-03-01docs: improve/add documentation of Lua typesLewis Russell1
- Added `@inlinedoc` so single use Lua types can be inlined into the functions docs. E.g. ```lua --- @class myopts --- @inlinedoc --- --- Documentation for some field --- @field somefield integer --- @param opts myOpts function foo(opts) end ``` Will be rendered as ``` foo(opts) Parameters: - {opts} (table) Object with the fields: - somefield (integer) Documentation for some field ``` - Marked many classes with with `@nodoc` or `(private)`. We can eventually introduce these when we want to.
2024-02-28feat!: rewrite TOhtml in luaaltermo1
Co-authored-by: wookayin <wookayin@gmail.com> Co-authored-by: clason <c.clason@uni-graz.at> Co-authored-by: Lewis Russell <me@lewisr.dev>