modified neorg config
This commit is contained in:
parent
ff1052cd36
commit
d053356b56
1 changed files with 51 additions and 56 deletions
|
|
@ -1,16 +1,13 @@
|
||||||
|
{
|
||||||
|
helpers
|
||||||
|
, ... }:
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
neorg = {
|
neorg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
modules = {
|
modules = {
|
||||||
# "core.defaults" = { __empty = null; }; # -- Loads default behaviour
|
|
||||||
# "core.summary" = { __empty = null; };
|
|
||||||
# "core.defaults" = { __empty = null; };
|
|
||||||
# "core.export" = { __empty = null; };
|
|
||||||
# "core.export.markdown" = { __empty = null; };
|
|
||||||
"core.defaults" = {}; # -- Loads default behaviour
|
"core.defaults" = {}; # -- Loads default behaviour
|
||||||
"core.summary" = {};
|
"core.summary" = {};
|
||||||
"core.defaults" = {};
|
|
||||||
"core.export" = {};
|
"core.export" = {};
|
||||||
"core.export.markdown" = {};
|
"core.export.markdown" = {};
|
||||||
"core.concealer" = {
|
"core.concealer" = {
|
||||||
|
|
@ -32,57 +29,55 @@
|
||||||
default_workspace = "m";
|
default_workspace = "m";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# "core.keybinds" = {
|
"core.keybinds" = {
|
||||||
# config = {
|
# config = {
|
||||||
# hook = {
|
# hook.__raw = ''
|
||||||
# __raw = ''function(keybinds)
|
# function(keybinds)
|
||||||
# -- unmap Alt-Enter to "core.itero.next-iteration", "<CR>"
|
# -- unmap Alt-Enter to "core.itero.next-iteration", "<CR>"
|
||||||
# keybinds.unmap("norg", "i", "<M-CR>")
|
# keybinds.unmap("norg", "i", "<M-CR>")
|
||||||
# -- map Shift-Enter to "core.itero.next-iteration", "<CR>"
|
# -- map Shift-Enter to "core.itero.next-iteration", "<CR>"
|
||||||
# keybinds.remap_event("norg", "i", "<S-CR>", "core.itero.next-iteration", "<CR>")
|
# keybinds.remap_event("norg", "i", "<S-CR>", "core.itero.next-iteration", "<CR>")
|
||||||
# end;
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# extraConfigLua = ''
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# -- START Neorg config
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# -- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
|
||||||
# -- pattern = '*.norg',
|
|
||||||
# vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
# pattern = 'norg',
|
|
||||||
# callback = function()
|
|
||||||
# vim.opt.formatoptions:remove('r')
|
|
||||||
# vim.opt.formatoptions:remove('o')
|
|
||||||
#
|
|
||||||
# -- https://github.com/nvim-neorg/neorg/discussions/1066
|
|
||||||
# vim.opt.conceallevel = 2
|
|
||||||
# vim.keymap.set( 'n', '<leader>Nt', function()
|
|
||||||
# if vim.opt.conceallevel:get() == 2 then
|
|
||||||
# vim.opt.conceallevel = 0
|
|
||||||
# elseif vim.opt.conceallevel:get() == 0 then
|
|
||||||
# vim.opt.conceallevel = 2
|
|
||||||
# end
|
|
||||||
# vim.cmd('Neorg toggle-concealer')
|
|
||||||
# end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
|
||||||
# -- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
|
||||||
# -- vim.opt.foldlevelstart = 99
|
|
||||||
# vim.keymap.set( 'n', '<leader>Ng', function() vim.cmd.Neorg('generate-workspace-summary') end, { desc = 'generate-workspace-summary' })
|
|
||||||
# vim.keymap.set( 'n', '<leader>NT', function() vim.cmd.Neorg('toc') end, { desc = 'Table of Content' })
|
|
||||||
# end,
|
# end,
|
||||||
# })
|
|
||||||
# vim.keymap.set( 'n', '<leader>Nw', function() vim.api.nvim_feedkeys(':Neorg workspace ', 'n', true) end, { desc = 'Neorg workspace <fill>' })
|
|
||||||
# vim.keymap.set( 'n', '<leader>Ni', function() vim.cmd('Neorg index') end, { desc = 'Neorg index' })
|
|
||||||
# vim.keymap.set( 'n', '<leader>Nr', function() vim.cmd('Neorg return') end, { desc = 'Neorg return' })
|
|
||||||
# vim.keymap.set( 'n', '<leader>Ne', function() vim.cmd('Neorg workspace e') end, { desc = 'Neorg workspace e (neorg-english)' })
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# -- END Neorg config
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# '';
|
# '';
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfigLua = ''
|
||||||
|
----------------------------------------------------
|
||||||
|
-- START Neorg config
|
||||||
|
----------------------------------------------------
|
||||||
|
-- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
||||||
|
-- pattern = '*.norg',
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = 'norg',
|
||||||
|
callback = function()
|
||||||
|
vim.opt.formatoptions:remove('r')
|
||||||
|
vim.opt.formatoptions:remove('o')
|
||||||
|
|
||||||
|
-- https://github.com/nvim-neorg/neorg/discussions/1066
|
||||||
|
vim.opt.conceallevel = 2
|
||||||
|
vim.keymap.set( 'n', '<leader>Nt', function()
|
||||||
|
if vim.opt.conceallevel:get() == 2 then
|
||||||
|
vim.opt.conceallevel = 0
|
||||||
|
elseif vim.opt.conceallevel:get() == 0 then
|
||||||
|
vim.opt.conceallevel = 2
|
||||||
|
end
|
||||||
|
vim.cmd('Neorg toggle-concealer')
|
||||||
|
end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
||||||
|
-- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
||||||
|
-- vim.opt.foldlevelstart = 99
|
||||||
|
vim.keymap.set( 'n', '<leader>Ng', function() vim.cmd.Neorg('generate-workspace-summary') end, { desc = 'generate-workspace-summary' })
|
||||||
|
vim.keymap.set( 'n', '<leader>NT', function() vim.cmd.Neorg('toc') end, { desc = 'Table of Content' })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.keymap.set( 'n', '<leader>Nw', function() vim.api.nvim_feedkeys(':Neorg workspace ', 'n', true) end, { desc = 'Neorg workspace <fill>' })
|
||||||
|
vim.keymap.set( 'n', '<leader>Ni', function() vim.cmd('Neorg index') end, { desc = 'Neorg index' })
|
||||||
|
vim.keymap.set( 'n', '<leader>Nr', function() vim.cmd('Neorg return') end, { desc = 'Neorg return' })
|
||||||
|
vim.keymap.set( 'n', '<leader>Ne', function() vim.cmd('Neorg workspace e') end, { desc = 'Neorg workspace e (neorg-english)' })
|
||||||
|
----------------------------------------------------
|
||||||
|
-- END Neorg config
|
||||||
|
----------------------------------------------------
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue