From 1ec6aee79783e84e5b84ff4e309fe6f52c4136c9 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 16 May 2024 20:10:42 +0530 Subject: [PATCH] nvim: after/ftplugin/markdown: Set conceallevel to 2 neovim 0.10 introduces experimental support for hyperlinks using OSC 8 sequence. By default, this is used in Markdown for links of the form [example](https://example.com). If terminal supports the OSC 8 escape sequence, then the text example in the neovim buffer will contain a hyperlink that can be clicked and it will open in web browser. This means markdown files with conceallevel=2 look much closer to the rendered output. --- nvim/.config/nvim/after/ftplugin/markdown.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/after/ftplugin/markdown.lua b/nvim/.config/nvim/after/ftplugin/markdown.lua index a56c875..250f60a 100644 --- a/nvim/.config/nvim/after/ftplugin/markdown.lua +++ b/nvim/.config/nvim/after/ftplugin/markdown.lua @@ -1,4 +1,5 @@ -vim.bo.textwidth = 0 +vim.bo.textwidth = 0 +vim.wo.conceallevel = 2 vim.api.nvim_create_autocmd({ "BufWritePost" }, { buffer = 0,