nvim: Restructure lua dir

Moved plugins into individual component module files which are
automatically required by lazy.nvim. Should make everything a tiny bit
more modular, or at least prepare the way for true modularity if I ever
have the time on my hands to ensure everything works with missing
modules.

Moved core settings into their own directory (`core`), and created a
`personal` folder which contains functions/plugins I wrote that do not
necessarily have to be their own imported plugin yet.

Finally, extended the utility functions a little, so we can detect if a
plugin exists and change e.g. key maps based on that (once again,
extending modularity a little more). Some simple attempts have been made
at that in the `mappings.lua` file, though it is nowhere near extensive
yet - most keymaps are still set regardless of plugin availability.

However, with this slimmer base to work off of, I feel more confident in
changing future things about this setup a little more ad-hoc without
having as many ripple repercussions as before.
This commit is contained in:
Marty Oehme 2023-06-15 15:45:21 +02:00
parent f343b1a76d
commit f33b4c9c37
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
38 changed files with 1221 additions and 908 deletions

View file

@ -0,0 +1,56 @@
local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
return {
-- UI improvements
-- provide distraction free writing
{ "folke/zen-mode.nvim", config = true, event = "VeryLazy" },
-- provide even distraction free-er writing (lowlight paragraphs)
{ "folke/twilight.nvim", event = "VeryLazy" },
-- enable 'speed-reading' mode (bionic reading)
{
"JellyApple102/easyread.nvim",
config = true,
ft = writing_ft,
cmd = "EasyreadToggle",
},
{
"andrewferrier/wrapping.nvim",
config = function()
require("wrapping").setup({
create_keymappings = false,
notify_on_switch = false,
})
end,
},
-- generate an auto-updating html preview for md files
{
"iamcco/markdown-preview.nvim",
build = function()
vim.fn["mkdp#util#install"]()
end,
ft = writing_ft,
},
-- bring zettelkasten commands
{
"mickael-menu/zk-nvim",
config = function()
require("zk").setup({ picker = "telescope" })
end,
},
-- simple static markdown linking and link following using zettel IDs
{ "marty-oehme/zettelkasten.nvim", ft = writing_ft, event = "VeryLazy" },
-- syntax highlighting for markdown criticmarkup (comments, additions, ...)
{ "vim-pandoc/vim-criticmarkup", ft = writing_ft },
-- inline display of latex formulas
-- TODO always demands latex treesitter to be installed even if it is
-- TODO always turns softwrapped lines off on exiting insert mode
--{
--"jbyuki/nabla.nvim",
--ft = writing_ft,
--config = function()
--require("nabla").enable_virt({ autogen = true, silent = true })
--end,
--},
}