From 47fab5a70d50520eb5c3061241a6892e0abe7571 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Fri, 15 Sep 2023 08:17:48 +0200 Subject: [PATCH] markdown: remove the pandoc plugins - Removes the pandoc plugins, as there is (only on my laptop), a conflict between the vim-pandoc* plugins and treesitter. - Configure the folding feature for markdown files based on treesitter. - Add in the configuration some markdown modules to be installed by treesitter. Co-Authored-by: iGor milhit --- after/ftplugin/markdown.lua | 7 +++++++ init.lua | 2 +- lua/custom/plugins/{pandoc.lua => pandoc.lua.save} | 0 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 after/ftplugin/markdown.lua rename lua/custom/plugins/{pandoc.lua => pandoc.lua.save} (100%) diff --git a/after/ftplugin/markdown.lua b/after/ftplugin/markdown.lua new file mode 100644 index 0000000..da01af3 --- /dev/null +++ b/after/ftplugin/markdown.lua @@ -0,0 +1,7 @@ +-- Specific settings for markdown files +-- Use treesitter for folding +-- Disable the color column + +vim.opt.foldmethod="expr" +vim.opt.foldexpr="nvim_treesitter#foldexpr()" +vim.opt.foldlevel=0 diff --git a/init.lua b/init.lua index 47c6f97..11c7d28 100644 --- a/init.lua +++ b/init.lua @@ -362,7 +362,7 @@ vim.keymap.set('n', 'ss', require'telescope'.extensions.luasnip.luasnip -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'json' }, + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'markdown', 'markdown_inline', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'json' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, diff --git a/lua/custom/plugins/pandoc.lua b/lua/custom/plugins/pandoc.lua.save similarity index 100% rename from lua/custom/plugins/pandoc.lua rename to lua/custom/plugins/pandoc.lua.save