Marty Oehme
f33b4c9c37
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.
22 lines
554 B
Lua
22 lines
554 B
Lua
-- many ideas for this config come from
|
|
-- https://github.com/elianiva/dotfiles/ - with much gratitude
|
|
local api = vim.api
|
|
|
|
api.nvim_exec2("runtime abbrev.vim", {})
|
|
|
|
for _, source in ipairs({
|
|
"core.settings",
|
|
"core.lazy",
|
|
"core.autocmds",
|
|
"core.mappings",
|
|
"core.look",
|
|
"personal",
|
|
}) do
|
|
local status_ok, fault = pcall(require, source)
|
|
if not status_ok then
|
|
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
|
|
end
|
|
end
|
|
|
|
-- to include e.g. the spell dictionaries for vim
|
|
vim.opt.rtp:append(vim.fn.stdpath("data") .. "/site")
|