Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mskelton/hoverdown.nvim
Improves support for LSP hover documentation by properly parsing and highlighting markdown.
https://github.com/mskelton/hoverdown.nvim
hover lsp markdown neovim
Last synced: about 1 month ago
JSON representation
Improves support for LSP hover documentation by properly parsing and highlighting markdown.
- Host: GitHub
- URL: https://github.com/mskelton/hoverdown.nvim
- Owner: mskelton
- License: isc
- Created: 2023-07-16T13:18:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-18T00:55:18.000Z (over 1 year ago)
- Last Synced: 2024-10-07T14:57:45.501Z (about 1 month ago)
- Topics: hover, lsp, markdown, neovim
- Language: Lua
- Homepage:
- Size: 7.81 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hoverdown
Improves support for LSP hover documentation by properly parsing and
highlighting markdown.## Installation
Install with your favorite package manager (e.g.
[lazy.nvim](https://github.com/folke/lazy.nvim)).```lua
{
"mskelton/hoverdown.nvim"
config = function()
require('hoverdown').setup()
end
}
```## Overrides
You can apply overrides to the parsed text blocks if you would like to perform
custom replacements. You can provide an `overrides` table which maps to file
types that you would like to perform overrides for. The example below shows how
to perform a basic override for Go files.```lua
require('hoverdown').setup({
overrides = {
go = function(blocks)
for _, block in ipairs(blocks) do
if block.type == "line" then
block.value = block.value:gsub(" on pkg.go.dev", "")
end
endreturn blocks
end,
},
})
```You can also use the `*` override to apply overrides to all file types.
```lua
require('hoverdown').setup({
overrides = {
['*'] = function(blocks) end,
},
})
```## Acknowledgements
Thanks to [folke](https://github.com/folke) and
[noice.nvim](https://github.com/folke/noice.nvim) for the original work from
which this project was based on!