summary refs log tree commit diff
path: root/.vim/lua/plugins.lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-02-08 23:53:34 +0100
committerRobert Günzler <r@gnzler.io>2022-02-08 23:53:34 +0100
commitb15791fab0283685eebeb9b4f2398dd69d7127c5 (patch)
treef4a7315382c8d02f49ef2ca8c76fb1896db05ee9 /.vim/lua/plugins.lua
parenteea1ce9750503c2b1a3c0aaf8e4c3fcb12cfd559 (diff)
vim: use tree-sitter for markdown
Diffstat (limited to '.vim/lua/plugins.lua')
-rw-r--r--.vim/lua/plugins.lua20
1 files changed, 18 insertions, 2 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua
index 369f61e..544b644 100644
--- a/.vim/lua/plugins.lua
+++ b/.vim/lua/plugins.lua
@@ -227,7 +227,6 @@ return require('packer').startup({function()
         'jsonc',
         'ledger',
         'lua',
-        'org',
         'regex',
         'rust',
         'scss',
@@ -237,9 +236,18 @@ return require('packer').startup({function()
         'yaml',
         'zig',
 
+        'org',
+        'markdown',
       }
 
       local tsconf = require('nvim-treesitter.parsers').get_parser_configs()
+      tsconf.markdown = {
+        install_info = {
+          url = 'https://github.com/MDeiml/tree-sitter-markdown',
+          files = {'src/parser.c', 'src/scanner.cc'},
+          revision = 'main',
+        }
+      }
       tsconf.org = {
         install_info = {
           url = 'https://github.com/milisims/tree-sitter-org',
@@ -252,6 +260,7 @@ return require('packer').startup({function()
         ensure_installed = enabled,
         highlight = {
           enable = true,
+          disable = {'markdown'},
 
           additional_vim_regex_highlighting = {'org'},
         },
@@ -625,10 +634,13 @@ return require('packer').startup({function()
 
   -- polyglot: multi-language support with lazy loading {{{
   -- NOTE: put language specific plugs before this to avoid conflicsts
+  --       should be kept in sync with tree-sitter, I guess...
   g.polyglot_disabled = {
     'bash',
     'c',
     'c_sharp',
+    'comment',
+    'css',
     'dockerfile',
     'go',
     'gomod',
@@ -638,13 +650,17 @@ return require('packer').startup({function()
     'jsonc',
     'ledger',
     'lua',
+    'regex',
     'rust',
     'scss',
-    'sh',
     'toml',
     'typescript',
     'vim',
     'yaml',
+    'zig',
+
+    'org',
+    -- 'markdown',
   }
   use {'sheerun/vim-polyglot'} -- }}}