Compare commits
3 commits
1aef4c4230
...
34ab642635
| Author | SHA1 | Date | |
|---|---|---|---|
| 34ab642635 | |||
| 78111e1da6 | |||
| bf598bd1d5 |
5 changed files with 80 additions and 0 deletions
2
init.lua
Normal file
2
init.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
require("config.settings")
|
||||||
|
require("config.lazy")
|
||||||
4
lazy-lock.json
Normal file
4
lazy-lock.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" }
|
||||||
|
}
|
||||||
31
lua/config/lazy.lua
Normal file
31
lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
-- 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)
|
||||||
|
|
||||||
|
--setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- import plugins from specific directory
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
-- setup correct colorscheme
|
||||||
|
install = { colorscheme = { "gruvbox"} },
|
||||||
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
rocks = {
|
||||||
|
enabled = false
|
||||||
|
},
|
||||||
|
})
|
||||||
31
lua/config/settings.lua
Normal file
31
lua/config/settings.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
-- enable line number and relative line numbers
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- make splits open on bottom and right
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
vim.opt.splitright = true
|
||||||
|
|
||||||
|
-- disable line wrapping
|
||||||
|
vim.opt.wrap = false
|
||||||
|
|
||||||
|
-- setup tabs nicelly
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
|
||||||
|
-- setup a nice scrolloff value
|
||||||
|
vim.opt.scrolloff = 20
|
||||||
|
|
||||||
|
-- make virtual edit work for blocks
|
||||||
|
vim.opt.virtualedit = "block"
|
||||||
|
|
||||||
|
-- make :s and others open a split
|
||||||
|
vim.opt.inccommand = "split"
|
||||||
|
|
||||||
|
-- ignore case
|
||||||
|
vim.opt.ignorecase = true
|
||||||
|
|
||||||
|
-- setup leader and local leader
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = ";"
|
||||||
12
lua/plugins/colorscheme.lua
Normal file
12
lua/plugins/colorscheme.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"ellisonleao/gruvbox.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
-- load colorscheme here
|
||||||
|
vim.o.background = "dark"
|
||||||
|
vim.cmd([[colorscheme gruvbox]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue