Skip to content

Commit 4c81018

Browse files
docs: Add install instructions for lazy.nvim
1 parent d26d52b commit 4c81018

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,43 @@
2626

2727
Use your favourite package manager:
2828

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>
3131
</br>
3232

3333
```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+
}
3660
```
3761

3862
</details>
3963

4064
<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>
4266
</br>
4367

4468
```lua
@@ -96,6 +120,7 @@ use {'nvim-orgmode/orgmode',
96120

97121
```lua
98122
-- init.lua
123+
-- NOTE: this is not needed for lazy.nvim if above instructions were used
99124

100125
-- Load custom treesitter grammar for org filetype
101126
require('orgmode').setup_ts_grammar()

0 commit comments

Comments
 (0)