Neorg configuration

This commit is contained in:
Fabrice Mouhartem 2023-12-24 12:32:39 +01:00
parent b420fa2111
commit 0e8587b461
2 changed files with 49 additions and 0 deletions

View File

@ -59,6 +59,9 @@ require('lsp')
-- [[ Configure nvim-cmp ]]
require('complete')
-- [[ Configure neorg ]]
require('neorg-configure')
-- Customizations
require('bepo')
require('restore-position')

46
lua/neorg-configure.lua Normal file
View File

@ -0,0 +1,46 @@
--vim.api.nvim_set_keymap('', 'à', '<Nop>', { noremap = true, silent = true })
vim.g.maplocalleader=','
vim.o.conceallevel=2
vim.api.nvim_set_keymap("n", "<Leader>ni", ":Neorg index<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>nm", ":Neorg inject-metadata<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>nj", ":Neorg journal toc open<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>nt", ":Neorg journal today<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>ns", ":Neorg journal tomorrow<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>ny", ":Neorg journal yesterday<CR>", {noremap = true, silent = true})
local neorg = require('neorg')
neorg.setup {
load = {
["core.defaults"] = {},
["core.concealer"] = {
config = {
icon_preset = "diamond",
}
},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/Sync/neorg",
},
default_workspace = "notes",
}
},
["core.export"] = {
config = {
export_dir = "<export-dir>/<language>",
},
},
["core.esupports.metagen"] = {
config = {
type = "empty",
},
},
}
}
-- Use custom name for the author field in metadata instead of the system
-- username
neorg.utils.get_username = function()
return "Chouhartem"
end