Commit Graph

9 Commits

Author SHA1 Message Date
Riley Bruins
eb37241d38
fix(tohtml): properly handle multiple hl groups #29012
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-26 10:27:12 -07:00
altermo
88c7997503 fix(tohtml): show how many warnings are hidden 2024-05-26 13:57:30 +02:00
altermo
8cd9feb501 fix(tohtml): ignore lsp inlay hints 2024-05-26 13:14:40 +02:00
altermo
2ed6423c7e fix(tohtml): replace ipairs with pairs 2024-05-26 12:56:32 +02:00
Maria José Solano
e52c25b761 feat(lua): deprecate vim.tbl_add_reverse_lookup 2024-03-07 10:24:34 +01:00
Lewis Russell
85b13751a5 refactor(types): more fixes (2) 2024-03-06 16:03:33 +00:00
altermo
a8131aee9e
fix(tohtml): replace hex escape with digit escape (#27728) 2024-03-04 19:08:23 +08:00
Lewis Russell
a5fe8f59d9 docs: improve/add documentation of Lua types
- 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-03-01 23:02:18 +00:00
altermo
2f85bbe615 feat!: rewrite TOhtml in lua
Co-authored-by: wookayin <wookayin@gmail.com>
Co-authored-by: clason <c.clason@uni-graz.at>
Co-authored-by: Lewis Russell <me@lewisr.dev>
2024-02-28 16:26:00 +00:00