-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathneorg.lua
More file actions
108 lines (101 loc) · 3.06 KB
/
neorg.lua
File metadata and controls
108 lines (101 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
vim.api.nvim_create_autocmd("FileType", { -- {{{
once = true,
pattern = { "norg" },
callback = function()
vim.api.nvim_create_user_command("Journal", ":Neorg journal", {})
vim.keymap.set("n", "<localleader>nr", ":Neorg return<CR>", { buffer = true })
require("arshlib.quick").command("NG", function(args)
require("neorg.modules.core.neorgcmd.module").public.function_callback(unpack(args.fargs))
end, { nargs = "*", complete = "customlist,v:lua._neorgcmd_generate_completions" })
vim.keymap.set(
"n",
"<localleader>nm",
":Neorg keybind norg core.looking-glass.magnify-code-block<CR>",
{ buffer = true }
)
local parser_configs = require("nvim-treesitter.parsers").get_parser_configs()
parser_configs.norg_meta = {
install_info = {
url = "https://github.com/nvim-neorg/tree-sitter-norg-meta",
files = { "src/parser.c" },
branch = "main",
},
}
parser_configs.norg_table = {
install_info = {
url = "https://github.com/nvim-neorg/tree-sitter-norg-table",
files = { "src/parser.c" },
branch = "main",
},
}
end,
}) -- }}}
return {
"nvim-neorg/neorg",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"neovim/nvim-lspconfig",
"hrsh7th/nvim-cmp",
"fzfmania.nvim",
},
build = ":Neorg sync-parsers",
cmd = { "Neorg" },
keys = {
{ mode = "n", "<leader>nh", ":Neorg workspace home<CR>" },
{ mode = "n", "<leader>nw", ":Neorg workspace <TAB>" },
{ mode = "n", "<leader>nj", ":Neorg journal<CR>" },
{ mode = "n", "<leader>ni", ":Neorg index<CR>" },
},
opts = {
lazy_loading = false,
load = {
["core.defaults"] = {},
["core.dirman"] = { --{{{
config = {
autochdir = false,
autodetect = false,
autochdetect = true,
workspaces = {
home = "~/Dropbox/Notes",
work = "~/Dropbox/Notes/blokur",
},
default_workspace = "home",
},
}, --}}}
["core.concealer"] = { --{{{
config = {
markup_preset = "brave",
icon_preset = "diamond",
},
}, --}}}
["core.integrations.nvim-cmp"] = {},
["core.completion"] = { --{{{
config = {
engine = "nvim-cmp",
name = "[Norg]",
},
}, --}}}
["core.keybinds"] = { --{{{
config = {
hook = function(keybinds)
keybinds.remap_event("norg", "n", "]]", "core.integrations.treesitter.next.heading")
keybinds.remap_event("norg", "n", "[[", "core.integrations.treesitter.previous.heading")
end,
},
}, --}}}
["core.journal"] = { --{{{
config = {
workspace = "home",
strategy = "flat",
},
}, --}}}
["core.export"] = {},
["core.export.markdown"] = {},
["core.qol.toc"] = {},
["core.qol.todo_items"] = {},
["core.integrations.treesitter"] = {},
},
},
enabled = require("config.util").is_enabled("nvim-neorg/neorg"),
}
-- vim: fdm=marker fdl=0