added lazy.nvim and basic nvim movement

This commit is contained in:
Christian Figueroa 2025-04-27 06:40:58 -07:00
parent 50a7cdf6a7
commit 06fe8a1c8c
9 changed files with 85 additions and 0 deletions

3
.config/nvim/init.lua Normal file
View File

@ -0,0 +1,3 @@
require("config.bindings")
require("config.lazy")
require("config.options")

View File

@ -0,0 +1,7 @@
{
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"mini.comment": { "branch": "main", "commit": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7" },
"mini.indentscope": { "branch": "main", "commit": "613df2830d7faeae7483ba2e736683154b95921e" },
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }
}

View File

@ -0,0 +1,12 @@
-- Mapleader
vim.g.mapleader = ' '
-- Non Plugin Keybinds
vim.keymap.set("n", "<C-u>", "<C-u>zz") -- scroll up with center
vim.keymap.set("n", "<C-d>", "<C-d>zz") -- scroll down with center
vim.keymap.set("n", "n", "nzz") -- center next search
vim.keymap.set("n", "N", "Nzz") -- center previous search
vim.keymap.set("n", "<C-c>", "<nop>") -- disable Ctrl + C
vim.keymap.set("n", "<leader><Tab>", "<C-w>w") -- fast swap window
-- Plugin Keybinds

View File

@ -0,0 +1,34 @@
-- Bootstrap lazy.nvim
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)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
-- automatically check for plugin updates
checker = { enabled = true, notify = false },
})

View File

@ -0,0 +1,8 @@
vim.o.shiftwidth = 4
vim.o.tabstop = 2
vim.o.expandtab = false
vim.o.nu = true
vim.o.rnu = true
vim.o.scr = 10
vim.o.so = 10
vim.o.wrap = false

View File

@ -0,0 +1,5 @@
return {
"echasnovski/mini.pairs",
version = '*',
opts = {}
}

View File

@ -0,0 +1,6 @@
return {
"echasnovski/mini.comment",
version = '*',
opts = {}
}

View File

@ -0,0 +1,5 @@
return {
"echasnovski/mini.indentscope",
version = '*',
opts = {}
}

View File

@ -0,0 +1,5 @@
return {
"echasnovski/mini.surround",
version = '*',
opts = {}
}