2024-05-07 12:47:00 +00:00
|
|
|
-- enable 24-bit color for nvim-notify
|
|
|
|
vim.o.termguicolors = true
|
|
|
|
|
2023-12-14 09:45:05 +00:00
|
|
|
-- Disable intro message on startup, or many other plugins will
|
|
|
|
-- close this message on load, which may cause a flash of intro message.
|
|
|
|
vim.opt.shortmess:append({ I = true })
|
|
|
|
|
2023-05-21 14:02:07 +00:00
|
|
|
vim.o.tabstop = 4
|
|
|
|
vim.o.shiftwidth = 0
|
|
|
|
vim.o.softtabstop = -1
|
|
|
|
vim.o.shiftround = true
|
|
|
|
|
|
|
|
vim.o.expandtab = true
|
|
|
|
vim.o.autoindent = true
|
|
|
|
vim.o.smartindent = true
|
|
|
|
|
2023-12-14 09:45:05 +00:00
|
|
|
vim.o.list = true
|
|
|
|
vim.o.relativenumber = true
|
|
|
|
vim.o.number = true
|
|
|
|
|
2023-12-15 13:15:46 +00:00
|
|
|
vim.o.colorcolumn = "101"
|
|
|
|
|
2023-12-15 04:41:29 +00:00
|
|
|
vim.g.mapleader = " "
|
|
|
|
vim.g.maplocalleader = " "
|
|
|
|
|
2024-05-07 12:47:00 +00:00
|
|
|
vim.keymap.set("n", "\\\\", "<cmd>split<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "||", "<cmd>vsplit<cr>", { silent = true })
|
|
|
|
|
2024-08-22 14:54:58 +00:00
|
|
|
vim.keymap.set("n", "<leader>q", "<cmd>wincmd q<cr>", { silent = true })
|
2024-05-07 12:47:00 +00:00
|
|
|
vim.keymap.set("n", "<C-h>", "<cmd>wincmd h<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "<C-j>", "<cmd>wincmd j<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "<C-k>", "<cmd>wincmd k<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "<C-l>", "<cmd>wincmd l<cr>", { silent = true })
|
2023-12-14 13:30:52 +00:00
|
|
|
|
2024-05-07 12:47:00 +00:00
|
|
|
vim.keymap.set("n", "<leader><C-h>", "<cmd>wincmd H<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "<leader><C-j>", "<cmd>wincmd J<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "<leader><C-k>", "<cmd>wincmd K<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "<leader><C-l>", "<cmd>wincmd L<cr>", { silent = true })
|
2023-05-21 14:02:07 +00:00
|
|
|
|
2024-05-07 12:47:00 +00:00
|
|
|
vim.keymap.set("n", "]b", "<cmd>bnext<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "[b", "<cmd>bprevious<cr>", { silent = true })
|
|
|
|
vim.keymap.set("n", "<leader>c", "<cmd>bdelete<cr>", { silent = true })
|
2023-05-21 14:02:07 +00:00
|
|
|
|
2023-12-14 13:30:30 +00:00
|
|
|
vim.keymap.set("n", "<leader>nh", "<cmd>nohlsearch<cr>", { silent = true })
|
|
|
|
|
2023-05-22 14:33:21 +00:00
|
|
|
|
2023-05-21 14:02:07 +00:00
|
|
|
-- Use lazy.nvim as plugin manager, and load plugin's config
|
|
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
2024-09-07 15:01:02 +00:00
|
|
|
if not vim.uv.fs_stat(lazypath) then
|
2023-05-21 14:02:07 +00:00
|
|
|
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")
|