This commit is contained in:
Job
2024-12-21 10:33:05 +01:00
commit 9aa384c1a3
11 changed files with 268 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
-- Configure custom keymaps.
local keymap = vim.keymap.set
local delkeymap = vim.keymap.del
local opts = { noremap = true, silent = true }
-- Improved line start/end
keymap({ "n", "v" }, "H", "^", opts)
keymap({ "n", "v" }, "L", "$", opts)
-- Improved escape
keymap("n", "<ESC>", "<ESC>:noh<CR>", opts)
keymap("t", "<ESC><ESC>", "<C-\\><C-n>", opts)
-- Disable alt j/k to move lines (conflict with default vim motions)
delkeymap({ "i", "v" }, "<A-j>")
delkeymap({ "i", "v" }, "<A-k>")

View File

@@ -0,0 +1,43 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "plugins" },
},
defaults = {
lazy = false,
version = false,
},
install = {},
checker = {
enabled = true,
notify = true,
},
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View File

@@ -0,0 +1,15 @@
-- Set some custom options.
local opt = vim.o
local global = vim.g
-- Set target text width for gww to 60.
opt.tw = 60
-- Use the internal clipboard.
opt.clipboard = ""
-- Use original gruvbox theme.
global.gruvbox_material_foreground = "original"
-- Disable snack animations.
global.snacks_animate = false