mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-15 07:04:47 +00:00
nvim config
This commit is contained in:
commit
57407e8ef8
21 changed files with 984 additions and 0 deletions
65
init.lua
Normal file
65
init.lua
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Basic settings
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- Essential vim options
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.config/nvim/undodir"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.updatetime = 50
|
||||
vim.opt.colorcolumn = ""
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
||||
|
||||
-- Load plugins
|
||||
require("lazy").setup("plugins", {
|
||||
defaults = { lazy = true },
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
"matchit",
|
||||
"matchparen",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue