From ac00b911458bab65397e2e8468ab8cb27dadeeca Mon Sep 17 00:00:00 2001 From: qwjyh Date: Wed, 18 Oct 2023 15:01:55 +0900 Subject: [PATCH] new: nvim: adding orgmode plugin --- dotfiles/neovim/init.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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