|
26 | 26 |
|
27 | 27 | Use your favourite package manager:
|
28 | 28 |
|
29 |
| -<details> |
30 |
| - <summary><a href="https://github.com/kristijanhusak/vim-packager"><b>vim-packager</b></a></summary> |
| 29 | +<details open> |
| 30 | + <summary><b><a href="https://github.com/folke/lazy.nvim">lazy.nvim</a> (recommended)</b></summary> |
31 | 31 | </br>
|
32 | 32 |
|
33 | 33 | ```lua
|
34 |
| -packager.add('nvim-treesitter/nvim-treesitter') |
35 |
| -packager.add('nvim-orgmode/orgmode') |
| 34 | +{ |
| 35 | + 'nvim-orgmode/orgmode', |
| 36 | + dependencies = { |
| 37 | + { 'nvim-treesitter/nvim-treesitter', lazy = true }, |
| 38 | + }, |
| 39 | + event = 'VeryLazy', |
| 40 | + config = function() |
| 41 | + -- Load treesitter grammar for org |
| 42 | + require('orgmode').setup_ts_grammar() |
| 43 | + |
| 44 | + -- Setup treesitter |
| 45 | + require('nvim-treesitter.configs').setup({ |
| 46 | + highlight = { |
| 47 | + enable = true, |
| 48 | + additional_vim_regex_highlighting = { 'org' }, |
| 49 | + }, |
| 50 | + ensure_installed = { 'org' }, |
| 51 | + }) |
| 52 | + |
| 53 | + -- Setup orgmode |
| 54 | + require('orgmode').setup({ |
| 55 | + org_agenda_files = '~/orgfiles/**/*', |
| 56 | + org_default_notes_file = '~/orgfiles/refile.org', |
| 57 | + }) |
| 58 | + end, |
| 59 | +} |
36 | 60 | ```
|
37 | 61 |
|
38 | 62 | </details>
|
39 | 63 |
|
40 | 64 | <details open>
|
41 |
| - <summary><b><a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a> (recommended)</b></summary> |
| 65 | + <summary><b><a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a></b></summary> |
42 | 66 | </br>
|
43 | 67 |
|
44 | 68 | ```lua
|
@@ -96,6 +120,7 @@ use {'nvim-orgmode/orgmode',
|
96 | 120 |
|
97 | 121 | ```lua
|
98 | 122 | -- init.lua
|
| 123 | +-- NOTE: this is not needed for lazy.nvim if above instructions were used |
99 | 124 |
|
100 | 125 | -- Load custom treesitter grammar for org filetype
|
101 | 126 | require('orgmode').setup_ts_grammar()
|
|
0 commit comments