summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/plugin/tohtml_spec.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-02-16feat(defaults): per-platform 'guifont' default #37175Rahul Yedida1
Problem: Font rendering and kerning are subpar in GUIs. Solution: Set default 'guifont' based on common CSS fonts per: https://github.com/system-fonts/modern-font-stacks#monospace-code
2025-12-31test(tohtml): test syntax, not just treesitter #37181altermo1
2025-12-31build(deps): bump tree-sitter-lua to v0.4.1Christian Clason1
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.
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
2024-09-21test: support upvalues in exec_luaLewis Russell1
2024-09-08test(tohtml): simplify font testJustin M. Keyes1
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-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-04-23test: improve test conventionsdundargoc1
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-03-08test(tohtml_spec): don't use hard-coded sleeping time (#27770)zeertzjq1
Instead cause some changes to screen state and use screen:expect().
2024-03-04fix(tohtml): replace hex escape with digit escape (#27728)altermo1
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>