initial commit
added a bunch of config to try and get things closer to my doom emacs setup. still not perfect.
This commit is contained in:
commit
567bfcc06e
13 files changed
+704
No files matched your search
@@ -0,0 +1,7 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
|
||||
-- autocmd InsertLeave * :normal `^
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", { command = ":normal `^" })
|
||||
@@ -0,0 +1,39 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
-- telescope picker shortcuts
|
||||
vim.keymap.set("n", "<C-b>", ":Telescope buffers<cr>")
|
||||
vim.keymap.set("n", "<C-f>", ":Telescope file_browser path=%:p:h select_buffer=true<cr>")
|
||||
vim.keymap.set("n", "<leader>fp", ":Telescope find_files cwd=~/.config/nvim<cr>", { desc = "Find file in config" })
|
||||
|
||||
-- hjkl modifiers
|
||||
vim.keymap.set({ "n", "v" }, "L", "E")
|
||||
vim.keymap.set({ "n", "v" }, "H", "B")
|
||||
vim.keymap.set({ "n", "v" }, "J", "4j")
|
||||
vim.keymap.set({ "n", "v" }, "K", "4k")
|
||||
vim.keymap.set({ "n", "v" }, "<C-k>", "8<C-e>")
|
||||
vim.keymap.set({ "n", "v" }, "<C-j>", "8<C-y>")
|
||||
|
||||
-- join line
|
||||
vim.keymap.set({ "n", "v" }, "gj", ":join<cr>")
|
||||
|
||||
-- jump forward and back
|
||||
vim.keymap.set({ "n", "v" }, "gf", "<C-i>")
|
||||
vim.keymap.set({ "n", "v" }, "gb", "<C-o>")
|
||||
|
||||
-- file operations
|
||||
vim.keymap.set({ "n", "v" }, "fs", ":w<cr>", { desc = "Save file" })
|
||||
|
||||
-- window operations
|
||||
vim.keymap.del({ "n" }, "<leader>w|")
|
||||
vim.keymap.del({ "n" }, "<leader>ww")
|
||||
vim.keymap.set({ "n", "v" }, "<leader>w\\", "<C-w>v", { desc = "Split window vertical" })
|
||||
vim.keymap.set({ "n", "v" }, "<leader>w-", "<C-w>s", { desc = "Split window horizontal" })
|
||||
vim.keymap.set({ "n", "v" }, "<leader>w=", "<C-w>=", { desc = "Balance windows" })
|
||||
vim.keymap.set({ "n", "v", "i" }, "<C-o>", "<C-w>w")
|
||||
|
||||
-- git stuff
|
||||
vim.keymap.del({ "n" }, "<leader>gg")
|
||||
vim.keymap.del({ "n" }, "<leader>gG")
|
||||
vim.keymap.set({ "n" }, "<leader>gg", "<CMD>Neogit<CR>", { desc = "Neogit status" })
|
||||
@@ -0,0 +1,46 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
Reference in new issue
Block a user