2022-04-02 04:02:22 +00:00
|
|
|
-- vim: shiftwidth=2
|
2021-11-16 11:55:36 +00:00
|
|
|
|
2023-10-27 11:29:23 +00:00
|
|
|
-- Bootstrapping for the package manager
|
|
|
|
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("plugins")
|
2022-04-04 14:00:31 +00:00
|
|
|
require("lsp-user-config").setup()
|
2021-07-15 08:28:28 +00:00
|
|
|
|
2023-09-05 22:55:12 +00:00
|
|
|
vim.g["mapleader"] = " "
|
|
|
|
vim.g["maplocalleader"] = ","
|
|
|
|
vim.g["syntax"] = true
|
2021-07-15 08:28:28 +00:00
|
|
|
|
|
|
|
-- Editor configuration
|
2022-01-21 09:00:52 +00:00
|
|
|
vim.opt.completeopt = "menuone,noselect"
|
|
|
|
vim.opt.termguicolors = true
|
|
|
|
vim.opt.encoding = "utf-8"
|
|
|
|
vim.opt.number = true
|
|
|
|
vim.opt.relativenumber = true
|
|
|
|
vim.opt.cursorline = true
|
|
|
|
vim.opt.expandtab = true
|
|
|
|
vim.opt.shiftwidth = 4
|
|
|
|
vim.opt.tabstop = 4
|
|
|
|
vim.opt.conceallevel = 1
|
|
|
|
vim.opt.list = true
|
|
|
|
vim.opt.listchars = { tab = " ", trail = "·" }
|
|
|
|
vim.opt_local.spell = true
|
|
|
|
vim.opt.smartindent = true
|
2021-07-15 08:28:28 +00:00
|
|
|
|
|
|
|
-- I have yet to solve how to do the following in Lua, lmao
|
2023-09-05 22:55:12 +00:00
|
|
|
vim.cmd("highlight clear SpellBad")
|
|
|
|
vim.cmd("highlight clear SpellLocal")
|
|
|
|
vim.cmd("highlight clear SpellCap")
|
|
|
|
vim.cmd("highlight clear SpellRare")
|
|
|
|
vim.cmd("highlight Visual term=reverse cterm=reverse")
|
|
|
|
vim.cmd("colorscheme fds-theme")
|
2021-07-15 08:28:28 +00:00
|
|
|
|
|
|
|
-- Keybindings
|
2023-09-05 22:55:12 +00:00
|
|
|
vim.keymap.set("n", "<leader>bd", ":bd<cr>", {})
|
|
|
|
vim.keymap.set("i", "jk", "<Esc>", {})
|
|
|
|
vim.keymap.set("n", "<leader>hr", "<cmd>source $MYVIMRC<cr>", {})
|