Neovim/init.lua

28 lines
603 B
Lua

-- load options
local options = require("options")
-- set neovim options
for k, v in pairs(options.vim) do
vim.opt[k] = v
end
-- set global vim options
for k, v in pairs(options.g) do
vim.g[k] = v
end
require("bootstrap")
-- apply color theme
local status, _ = pcall(vim.cmd, "colorscheme " .. options.ui.theme)
if not status then
print("Colorscheme not found: " .. options.ui.theme) -- Print an error message if the colorscheme is not installed
return
end
-- apply keymap
local keymap = require("keymap")
for _, v in pairs(keymap) do
vim.keymap.set(v[1], v[2], v[3], v[4])
end