2023-05-04 12:39:25 +01:00
|
|
|
vim.g.mapleader = " "
|
2023-05-23 21:11:16 +01:00
|
|
|
vim.g.maplocalleader = ","
|
2023-05-17 14:57:53 +01:00
|
|
|
vim.opt.termguicolors = true
|
2023-05-18 10:16:40 +01:00
|
|
|
require "ui.fillchars"
|
2023-05-04 12:39:25 +01:00
|
|
|
|
|
|
|
-- 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)
|
2023-05-16 09:24:01 +01:00
|
|
|
require("lazy").setup {
|
|
|
|
spec = "plugins",
|
2023-05-17 14:57:53 +01:00
|
|
|
install = { colorscheme = { "tokyonight" } },
|
2023-05-16 09:24:01 +01:00
|
|
|
ui = {
|
|
|
|
border = "rounded",
|
|
|
|
icons = { lazy = " " },
|
|
|
|
},
|
|
|
|
diff = { cmd = "diffview.nvim" },
|
|
|
|
checker = { enabled = true, frequency = 3600 },
|
|
|
|
performance = {
|
|
|
|
rtp = {
|
|
|
|
disabled_plugins = {
|
|
|
|
"gzip",
|
|
|
|
"matchit",
|
|
|
|
"matchparen",
|
|
|
|
"netrwPlugin",
|
|
|
|
"tarPlugin",
|
|
|
|
"tohtml",
|
|
|
|
"tutor",
|
|
|
|
"zipPlugin",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2023-05-04 12:39:25 +01:00
|
|
|
|
|
|
|
-- Set vim options
|
2023-05-17 17:06:16 +01:00
|
|
|
vim.cmd [[colorscheme tokyonight]]
|
2023-05-16 09:24:01 +01:00
|
|
|
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
|
2023-05-22 08:39:41 +01:00
|
|
|
vim.opt.foldlevelstart = 99
|
2023-05-16 09:24:01 +01:00
|
|
|
|
|
|
|
-- Global
|
|
|
|
vim.g.loaded_perl_provider = 0
|
|
|
|
|
|
|
|
-- Common keymaps
|
|
|
|
vim.keymap.set("i", "jk", "<esc>")
|
|
|
|
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
|
|
|
|
|
2023-05-31 16:47:30 +01:00
|
|
|
-- GUI settings
|
|
|
|
if vim.g.neovide then
|
|
|
|
require "ui.neovide"
|
|
|
|
elseif vim.g.vscode then
|
|
|
|
require "ui.vscode"
|
|
|
|
end
|