81 lines
2.2 KiB
Lua
81 lines
2.2 KiB
Lua
return {
|
|
"nvim-neorg/neorg",
|
|
lazy = false,
|
|
version = "*",
|
|
dependencies = { { "nvim-lua/plenary.nvim" }, { "nvim-neorg/neorg-telescope" }, { "benlubas/neorg-interim-ls" } },
|
|
config = function()
|
|
require("neorg").setup({
|
|
load = {
|
|
["core.defaults"] = {},
|
|
["core.concealer"] = {},
|
|
["core.qol.toc"] = {
|
|
config = {
|
|
close_after_use = true,
|
|
},
|
|
},
|
|
["core.integrations.treesitter"] = {},
|
|
["core.looking-glass"] = {},
|
|
["core.itero"] = {
|
|
config = {
|
|
iterables = {
|
|
"unordered_list%d",
|
|
"ordered_list%d",
|
|
"quote%d",
|
|
},
|
|
},
|
|
},
|
|
["core.completion"] = {
|
|
config = { engine = { module_name = "external.lsp-completion" } },
|
|
},
|
|
["core.dirman"] = {
|
|
config = {
|
|
workspaces = {
|
|
notes = "~/Notes",
|
|
},
|
|
default_workspace = "notes",
|
|
},
|
|
},
|
|
["core.integrations.telescope"] = {
|
|
config = {
|
|
insert_file_link = {
|
|
-- Whether to show the title preview in telescope. Affects performance with a large
|
|
-- number of files.
|
|
show_title_preview = true,
|
|
},
|
|
},
|
|
},
|
|
["external.interim-ls"] = {
|
|
config = {
|
|
-- default config shown
|
|
completion_provider = {
|
|
-- Enable or disable the completion provider
|
|
enable = true,
|
|
|
|
-- Show file contents as documentation when you complete a file name
|
|
documentation = true,
|
|
|
|
-- Try to complete categories provided by Neorg Query. Requires `benlubas/neorg-query`
|
|
categories = false,
|
|
|
|
-- suggest heading completions from the given file for `{@x|}` where `|` is your cursor
|
|
-- and `x` is an alphanumeric character. `{@name}` expands to `[name]{:$/people:# name}`
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|
|
vim.wo.foldlevel = 99
|
|
vim.wo.conceallevel = 2
|
|
|
|
vim.api.nvim_create_autocmd("Filetype", {
|
|
pattern = "norg",
|
|
callback = function()
|
|
vim.keymap.set("n", "<CR>", "<Plug>(neorg.esupports.hop.hop-link.vsplit)", { buffer = true })
|
|
vim.keymap.set("i", "<CR>", "<Plug>(neorg.itero.next-iteration)", { buffer = true })
|
|
vim.keymap.set("n", "<localleader>m", "<cmd>Neorg inject-metadata<CR>", { buffer = true })
|
|
vim.keymap.set("n", "<localleader>f", "<cmd>Telescope neorg insert_link<CR>", { buffer = true })
|
|
end,
|
|
})
|
|
end,
|
|
}
|