Skip to content

feat: Markdown / custom processing support #6

@Picalines

Description

@Picalines

Hi, great plugin!

It'd be nice if this plugin could wrap TS types in a markdown symbols, like:

Type

```ts
  {
    field: number
  }
```

Is not assignable to `number`

So other plugins like noice.nvim could highlight the diagnostic popup using treesitter for example

I think there're two ways to implement it:

  1. Direct option like format = 'markdown', while the current behaviour is format = 'plain' or something
  2. Two generic functions for formatting blocks and inlines, line:
format = {
  inline = function (text) return '`' .. text .. '`',
  block = function (text)
    return '```ts\n' .. text .. '\n```'
  return
}

Second approach is more difficult, because we'd need to choose what data to pass in function parameters (is text already prettified? How to handle nested indentation?)

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions