diff --git a/lua/custom/plugins/cmp.lua b/lua/custom/plugins/cmp.lua index b94ce5e..89a6d55 100644 --- a/lua/custom/plugins/cmp.lua +++ b/lua/custom/plugins/cmp.lua @@ -67,6 +67,7 @@ return { }, sources = { { name = 'nvim_lsp_signature_help', group_index = 1 }, + { name = 'orgmode' }, { name = 'luasnip', max_item_count = 5, group_index = 1 }, { name = 'nvim_lsp', max_item_count = 20, group_index = 1 }, { name = 'nvim_lua', group_index = 1 }, diff --git a/lua/custom/plugins/orgmode.lua b/lua/custom/plugins/orgmode.lua index 87e01c3..ba9f678 100644 --- a/lua/custom/plugins/orgmode.lua +++ b/lua/custom/plugins/orgmode.lua @@ -1,22 +1,24 @@ return { 'nvim-orgmode/orgmode', - dependencies = { 'akinsho/org-bullets.nvim', opts = {} }, - lazy = false, + dependencies = { + { 'nvim-treesitter/nvim-treesitter', lazy = true }, + { 'akinsho/org-bullets.nvim', opts = {} }, + }, + event = 'VeryLazy', config = function() + -- Load treesitter grammar for org require('orgmode').setup_ts_grammar() + -- Setup treesitter require('nvim-treesitter.configs').setup { - -- If TS highlights are not enabled at all, or disabled via `disable` prop, - -- highlighting will fallback to default Vim syntax highlighting highlight = { enable = true, - -- Required for spellcheck, some LaTex highlights and - -- code block highlights that do not have ts grammar additional_vim_regex_highlighting = { 'org' }, }, - ensure_installed = { 'org' }, -- Or run :TSUpdate org + ensure_installed = { 'org' }, } + -- Setup orgmode require('orgmode').setup { org_agenda_files = { '~/org/**/*' }, org_default_notes_file = '~/org/refile.org',