diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index a6a46b1..c4fa5e5 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -130,6 +130,32 @@ require('lazy').setup({ 'folke/trouble.nvim', -- config = function }, + { + 'nvim-orgmode/orgmode', + dependencies = { + { 'nvim-treesitter/nvim-treesitter', lazy = true }, + }, + event = 'VeryLazy', + config = function() + -- Load treesitter grammer for orgmode + require('orgmode').setup_ts_grammar() + + -- Setup treesitter + require('nvim-treesitter.configs').setup({ + highlight = { + enable = true, + additional_vim_regex_highlighting = { 'org' }, + }, + ensure_installed = { 'org' }, + }) + + -- Setup orgmode + require('orgmode').setup({ + org_agenda_files = '~/orgfiles/**/*', + org_default_notes_file = '~/orgfiles/refile.org', + }) + end, + }, }) ----------------------------------------------------------- @@ -606,6 +632,7 @@ cmp.setup { { name = 'path' }, { name = 'nvim_lua' }, { name = 'luasnip' }, + { name = 'orgmode' }, }, } -- cmdline completions