init
This commit is contained in:
16
config/nvim/config/keymaps.lua
Normal file
16
config/nvim/config/keymaps.lua
Normal 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>")
|
||||
43
config/nvim/config/lazy.lua
Normal file
43
config/nvim/config/lazy.lua
Normal 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",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
15
config/nvim/config/options.lua
Normal file
15
config/nvim/config/options.lua
Normal 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
|
||||
Reference in New Issue
Block a user