Refactor
This commit is contained in:
52
lua/_notes.lua
Normal file
52
lua/_notes.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
-- plugin({
|
||||
-- "rebelot/kanagawa.nvim", -- neorg needs a colorscheme with treesitter support
|
||||
-- config = function()
|
||||
-- vim.cmd.colorscheme("kanagawa")
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
plugin({
|
||||
"nvim-neorg/neorg",
|
||||
lazy = false,
|
||||
version = "*",
|
||||
config = function()
|
||||
require("neorg").setup({
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.concealer"] = {},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
notes = "~/notes/general",
|
||||
quikserve = "~/notes/quikserve",
|
||||
personal = "~/notes/personal",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.wo.foldlevel = 99
|
||||
vim.wo.conceallevel = 2
|
||||
end,
|
||||
})
|
||||
|
||||
map("n", "<leader>n", "<cmd>:Neorg index<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nn", "<cmd>:Neorg<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nj", "<cmd>:Neorg journal<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nt", "<cmd>:Neorg journal today<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>ni", "<cmd>:Neorg index<cr>", { desc = "Neorg index" })
|
||||
map("n", "<leader>nr", "<cmd>:Neorg return<cr>", { desc = "Neorg return" })
|
||||
map("n", "<leader>nw", function()
|
||||
neorg = require("neorg")
|
||||
local workspaces = {}
|
||||
for k, v in pairs(neorg.config.modules["core.dirman"].workspaces) do
|
||||
table.insert(workspaces, k) -- Inserts the key 'k' into the list
|
||||
end
|
||||
vim.ui.select(workspaces, {}, function(item)
|
||||
if item ~= nil then
|
||||
neorg.modules.loaded_modules["core.dirman"].public.open_workspace(item)
|
||||
end
|
||||
end)
|
||||
end, { desc = "Neorg index" })
|
||||
Reference in New Issue
Block a user