From 76e05f928cd325615b35adcaf5b2f18984d6a327 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sun, 31 Jul 2022 20:43:31 +0100 Subject: [PATCH] fix(vim): treesitter highlighting to org files The treesitter plugin for org files was getting setup after the org plugin was loading, this is throwing errors when trying to view or edit org files. Now the plugin order has been changed so it all works correctly --- site-modules/core/files/vim/plugin/org.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site-modules/core/files/vim/plugin/org.lua b/site-modules/core/files/vim/plugin/org.lua index a44408a..e69a9f2 100644 --- a/site-modules/core/files/vim/plugin/org.lua +++ b/site-modules/core/files/vim/plugin/org.lua @@ -1,6 +1,9 @@ -- TODO(ade): Set up org capture into the website node dir -- See https://github.com/AdeAttwood/Dotfiles/blob/86bf86d2010d7ec7b579e7b1c06632d5955f0a3c/site-modules/core/files/emacs/src/org.el#L107 +-- Needs to go before the orgmode.setup or tree sitter will start throwing errors +require('orgmode').setup_ts_grammar() + require('orgmode').setup({ org_agenda_files = {'~/Code/src/github.com/AdeAttwood/Website/data/*'}, }) @@ -8,4 +11,3 @@ require('orgmode').setup({ -- Dont folt heading on load. vim.cmd[[autocmd FileType org setlocal nofoldenable]] -require('orgmode').setup_ts_grammar()