From 112b646bd474fa8b2baae04de9eba5dd87abf1f5 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 27 Aug 2024 22:10:47 +0200 Subject: [PATCH] nvim: lsp: make sure to install a markdown renderer. --- nvim/lua/user/plugins/lsp.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/nvim/lua/user/plugins/lsp.lua b/nvim/lua/user/plugins/lsp.lua index 8678fb3..2e4ab87 100644 --- a/nvim/lua/user/plugins/lsp.lua +++ b/nvim/lua/user/plugins/lsp.lua @@ -10,6 +10,30 @@ return { "hrsh7th/cmp-nvim-lsp-signature-help" }, }, + -- LSP often return markdown that neovim parses. + -- make sure we have a plugin that can render markdown to nicer text + { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { + 'nvim-tree/nvim-web-devicons', + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { "markdown", "markdown_inline" } + } + } + }, + opts = { + overrides = { + buftype = { + -- LSP Hover = "nofile" + nofile = { + code = { left_pad = 0, right_pad = 0 }, + }, + }, + }, + } + } }, opts = { document_highlight = {