Add some nvim stuff

This commit is contained in:
iamBadgers
2026-05-31 16:59:42 -07:00
parent 8bfc1ff08e
commit bdd903a188
9 changed files with 101 additions and 0 deletions

View File

@@ -0,0 +1 @@
require("config")

View File

@@ -0,0 +1,7 @@
{
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View File

@@ -0,0 +1,3 @@
require("config.remap")
require("config.settings")
require("config.lazy")

View File

@@ -0,0 +1,35 @@
-- 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.
-- install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = true },
})

View File

@@ -0,0 +1,6 @@
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- builtins
vim.keymap.set("n", "<leader>e", vim.cmd.Ex, {desc = "Explorer"})
vim.keymap.set("n", "<leader>bd", ":bd<CR>", {desc = "Close Buffer"})

View File

@@ -0,0 +1,11 @@
vim.opt.guicursor = ""
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.wrap = true

View File

@@ -0,0 +1 @@
return { "catppuccin/nvim", name = "catppuccin", priority = 1000 }

View File

@@ -0,0 +1,19 @@
return {
'nvim-telescope/telescope.nvim', version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
-- optional but recommended
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
},
keys = {
{
"<leader>fb",
"<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<cr>",
desc = "Buffers",
},
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find Files"},
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
{ "<leader>fB", "<cmd>Telescope buffers<cr>", desc = "Buffers (all)" },
{ "<leader>fg", "<cmd>Telescope git_files<cr>", desc = "Find Files (git-files)" },
}
}

View File

@@ -0,0 +1,18 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
}
}