From ceb38d09b02c2191c6a1a0f6fe173c78a2e10c63 Mon Sep 17 00:00:00 2001 From: Marc Talcott Date: Mon, 10 Jun 2024 20:45:36 -0400 Subject: [PATCH] add neogit and orgmode --- init.lua | 2 -- lua/plugins/markdown-preview-nvim.lua | 8 +++++++ lua/plugins/neogit.lua | 12 +++++++++++ lua/plugins/orgmode.lua | 30 +++++++++++++++++++++++++++ lua/plugins/plugins.lua | 1 + 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/markdown-preview-nvim.lua create mode 100644 lua/plugins/neogit.lua create mode 100644 lua/plugins/orgmode.lua diff --git a/init.lua b/init.lua index dabe08fb..5ed865c9 100644 --- a/init.lua +++ b/init.lua @@ -196,8 +196,6 @@ vim.keymap.set('n', 'wc', 'c', { desc = '[C]lose window' }) vim.keymap.set('n', 'w+', '+', { desc = 'Increase size' }) vim.keymap.set('n', 'w-', '-', { desc = 'Decrease size' }) -vim.keymap.set('n', 'n', ':Neotree', { desc = 'Open Neotree' }) - -- vim.keymap.set('n', 'wh', '', { desc = 'Move focus to the left window' }) -- vim.keymap.set('n', 'wl', '', { desc = 'Move focus to the right window' }) -- vim.keymap.set('n', 'wj', '', { desc = 'Move focus to the lower window' }) diff --git a/lua/plugins/markdown-preview-nvim.lua b/lua/plugins/markdown-preview-nvim.lua new file mode 100644 index 00000000..b1591c3d --- /dev/null +++ b/lua/plugins/markdown-preview-nvim.lua @@ -0,0 +1,8 @@ +return { + 'iamcco/markdown-preview.nvim', + cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, + ft = { 'markdown' }, + build = function() + vim.fn['mkdp#util#install']() + end, +} diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua new file mode 100644 index 00000000..357f3036 --- /dev/null +++ b/lua/plugins/neogit.lua @@ -0,0 +1,12 @@ +return { + 'NeogitOrg/neogit', + dependencies = { + 'nvim-lua/plenary.nvim', -- required + 'sindrets/diffview.nvim', -- optional - Diff integration + + -- Only one of these is needed, not both. + 'nvim-telescope/telescope.nvim', -- optional + 'ibhagwan/fzf-lua', -- optional + }, + config = true, +} diff --git a/lua/plugins/orgmode.lua b/lua/plugins/orgmode.lua new file mode 100644 index 00000000..d39bb60a --- /dev/null +++ b/lua/plugins/orgmode.lua @@ -0,0 +1,30 @@ +return { + 'nvim-orgmode/orgmode', + event = 'VeryLazy', + ft = { 'org' }, + config = function() + -- Setup orgmode + require('orgmode').setup { + org_agenda_files = '~/orgfiles/**/*', + org_default_notes_file = '~/orgfiles/refile.org', + org_capture_templates = { + t = { description = 'Task', template = '* TODO %?\n %u' }, + j = { + description = 'Journal', + datetree = { + tree_type = 'day', + }, + template = '\n**** %?\n%U\n', + target = '~/orgfiles/journal.org', + }, + }, + } + + -- NOTE: If you are using nvim-treesitter with ~ensure_installed = "all"~ option + -- add ~org~ to ignore_install + -- require('nvim-treesitter.configs').setup({ + -- ensure_installed = 'all', + -- ignore_install = { 'org' }, + -- }) + end, +} diff --git a/lua/plugins/plugins.lua b/lua/plugins/plugins.lua index 380b342e..842ee0d8 100644 --- a/lua/plugins/plugins.lua +++ b/lua/plugins/plugins.lua @@ -562,6 +562,7 @@ return { 'catppuccin/nvim', name = 'catppuccin', priority = 1000, + flavour = 'mocha', init = function() vim.cmd.colorscheme 'catppuccin' end,