nvim/init.lua

71 lines
1.7 KiB
Lua

vim.g.mapleader = " "
vim.g.maplocalleader = ","
vim.opt.termguicolors = true
vim.diagnostic.config {
virtual_text = true,
float = { border = "rounded" },
}
require "ui.fillchars"
-- bootstrap lazy.nvim
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup {
spec = "plugins",
install = { colorscheme = { "tokyonight" } },
ui = {
border = "rounded",
icons = { lazy = " " },
},
diff = { cmd = "diffview.nvim" },
checker = { enabled = false },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}
-- Set vim options
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.listchars = { lead = ".", trail = ".", tab = ">-" }
vim.opt.list = true
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.foldlevelstart = 99
vim.g.loaded_perl_provider = 0
vim.notify = require "notify"
require "dressing"
-- Common keymaps
vim.keymap.set("i", "jk", "<esc>")
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
-- GUI settings
if vim.g.neovide then require "ui.neovide" end
-- Colorscheme
vim.cmd [[colorscheme tokyonight]]