change some neorg.nix settings
This commit is contained in:
parent
2edeb7f2b9
commit
ff1052cd36
1 changed files with 49 additions and 49 deletions
|
|
@ -32,57 +32,57 @@
|
||||||
default_workspace = "m";
|
default_workspace = "m";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"core.keybinds" = {
|
# "core.keybinds" = {
|
||||||
config = {
|
# config = {
|
||||||
hook = {
|
# hook = {
|
||||||
__raw = ''function(keybinds)
|
# __raw = ''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;
|
# end;
|
||||||
'';
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
# extraConfigLua = ''
|
||||||
};
|
# ----------------------------------------------------
|
||||||
};
|
# -- START Neorg config
|
||||||
extraConfigLua = ''
|
# ----------------------------------------------------
|
||||||
----------------------------------------------------
|
# -- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
||||||
-- START Neorg config
|
# -- pattern = '*.norg',
|
||||||
----------------------------------------------------
|
# vim.api.nvim_create_autocmd('FileType', {
|
||||||
-- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
# pattern = 'norg',
|
||||||
-- pattern = '*.norg',
|
# callback = function()
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
# vim.opt.formatoptions:remove('r')
|
||||||
pattern = 'norg',
|
# vim.opt.formatoptions:remove('o')
|
||||||
callback = function()
|
#
|
||||||
vim.opt.formatoptions:remove('r')
|
# -- https://github.com/nvim-neorg/neorg/discussions/1066
|
||||||
vim.opt.formatoptions:remove('o')
|
# vim.opt.conceallevel = 2
|
||||||
|
# vim.keymap.set( 'n', '<leader>Nt', function()
|
||||||
-- https://github.com/nvim-neorg/neorg/discussions/1066
|
# if vim.opt.conceallevel:get() == 2 then
|
||||||
vim.opt.conceallevel = 2
|
# vim.opt.conceallevel = 0
|
||||||
vim.keymap.set( 'n', '<leader>Nt', function()
|
# elseif vim.opt.conceallevel:get() == 0 then
|
||||||
if vim.opt.conceallevel:get() == 2 then
|
# vim.opt.conceallevel = 2
|
||||||
vim.opt.conceallevel = 0
|
# end
|
||||||
elseif vim.opt.conceallevel:get() == 0 then
|
# vim.cmd('Neorg toggle-concealer')
|
||||||
vim.opt.conceallevel = 2
|
# end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
||||||
end
|
# -- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
||||||
vim.cmd('Neorg toggle-concealer')
|
# -- vim.opt.foldlevelstart = 99
|
||||||
end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
# vim.keymap.set( 'n', '<leader>Ng', function() vim.cmd.Neorg('generate-workspace-summary') end, { desc = 'generate-workspace-summary' })
|
||||||
-- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
# vim.keymap.set( 'n', '<leader>NT', function() vim.cmd.Neorg('toc') end, { desc = 'Table of Content' })
|
||||||
-- vim.opt.foldlevelstart = 99
|
# end,
|
||||||
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' })
|
# vim.keymap.set( 'n', '<leader>Nw', function() vim.api.nvim_feedkeys(':Neorg workspace ', 'n', true) end, { desc = 'Neorg workspace <fill>' })
|
||||||
end,
|
# 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>Nw', function() vim.api.nvim_feedkeys(':Neorg workspace ', 'n', true) end, { desc = 'Neorg workspace <fill>' })
|
# vim.keymap.set( 'n', '<leader>Ne', function() vim.cmd('Neorg workspace e') end, { desc = 'Neorg workspace e (neorg-english)' })
|
||||||
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' })
|
# -- END Neorg config
|
||||||
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