summary refs log tree commit diff
path: root/.vim/lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-02-09 00:01:59 +0100
committerRobert Günzler <r@gnzler.io>2022-02-09 00:01:59 +0100
commit5f0f4bae5fc55b38f01bc970d2760e18057ceae1 (patch)
tree146ef2c81c0d2eb0df0cc796d630e148f5d6b4b4 /.vim/lua
parentee0df2ec4271b5ab658dd095255ad93af61fe8fd (diff)
vim: add neorg
Diffstat (limited to '.vim/lua')
-rw-r--r--.vim/lua/plugins.lua69
1 files changed, 69 insertions, 0 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua
index 36f2eff..7ff36ef 100644
--- a/.vim/lua/plugins.lua
+++ b/.vim/lua/plugins.lua
@@ -225,6 +225,7 @@ return require('packer').startup({function()
         'jsonc',
         'ledger',
         'lua',
+        'norg',
         'regex',
         'rust',
         'scss',
@@ -236,6 +237,8 @@ return require('packer').startup({function()
 
         'org',
         'markdown',
+        'norg_meta',
+        'norg_table',
       }
 
       local tsconf = require('nvim-treesitter.parsers').get_parser_configs()
@@ -253,6 +256,20 @@ return require('packer').startup({function()
           revision = 'main',
         }
       }
+      tsconf.norg_meta = {
+        install_info = {
+          url = 'https://github.com/nvim-neorg/tree-sitter-norg-meta',
+          files = {'src/parser.c'},
+          branch = 'main'
+        }
+      }
+      tsconf.norg_table = {
+        install_info = {
+          url = 'https://github.com/nvim-neorg/tree-sitter-norg-table',
+          files = {'src/parser.c'},
+          branch = 'main'
+        }
+      }
 
       require('nvim-treesitter.configs').setup {
         ensure_installed = enabled,
@@ -620,6 +637,55 @@ return require('packer').startup({function()
       -- vim.cmd [[ command! OrgmodeArchive lua require('orgmode').action('org_mappings.toggle_archive_tag') ]]
     end} -- }}}
 
+  use {'nvim-neorg/neorg', ft = {'norg'}, module = {'neorg'}, cmd = {'Neorg'}, -- {{{
+    requires = {
+      'nvim-lua/plenary.nvim',
+      'nvim-neorg/neorg-telescope',
+    },
+    setup = vim.cmd [[autocmd BufRead,BufNewFile *.norg setlocal filetype=norg]],
+    after = {'nvim-treesitter'},
+    config = function()
+      require('neorg').setup {
+        load = {
+          ['core.defaults'] = {},
+          ['core.keybinds'] = {
+            config = {
+              default_keybinds = true,
+              -- NOTE: neorg uses localleader by default, see init.lua:6
+              -- neorg_leader = '<leader>n',
+            }
+          },
+          ['core.norg.concealer'] = {
+            config = {
+              icons = {
+                todo = { enabled = true }
+              },
+            }
+          },
+          ['core.norg.dirman'] = {
+            config = {
+              workspaces = {
+                default = '$HOME/Documents/neorg/default',
+                work = '$HOME/Documents/neorg/work',
+                gtd = '$HOME/Documents/neorg/gtd',
+              }
+            }
+          },
+          ['core.norg.completion'] = {
+            config = { engine = 'nvim-cmp' }
+          },
+          ['core.integrations.telescope'] = {},
+          ['core.norg.qol.todo_items'] = {},
+          ['core.presenter'] = {},
+          ['core.gtd.base'] = {
+            config = {
+              workspace = 'gtd'
+            }
+          },
+        },
+      }
+    end} -- }}}
+
   use {'mickael-menu/zk-nvim', module = {'zk', 'telescope._extensions.zk'}, -- {{{
     config = function()
       local lsp = require('lsp')
@@ -697,6 +763,7 @@ return require('packer').startup({function()
     'jsonc',
     'ledger',
     'lua',
+    'norg',
     'regex',
     'rust',
     'scss',
@@ -708,6 +775,8 @@ return require('packer').startup({function()
 
     'org',
     -- 'markdown',
+    'norg_meta',
+    'norg_table',
   }
   use {'sheerun/vim-polyglot'} -- }}}