feat(init): better tabs
This commit is contained in:
parent
66ee14e884
commit
9e6a2d32b5
1 changed files with 19 additions and 14 deletions
33
init.lua
33
init.lua
|
@ -1,18 +1,19 @@
|
||||||
|
|
||||||
-- Bootstrap lazy.nvim
|
-- Bootstrap lazy.nvim
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
local out = vim.fn.system({
|
||||||
if vim.v.shell_error ~= 0 then
|
"git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo,
|
||||||
vim.api.nvim_echo({
|
lazypath
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
})
|
||||||
{ out, "WarningMsg" },
|
if vim.v.shell_error ~= 0 then
|
||||||
{ "\nPress any key to exit..." },
|
vim.api.nvim_echo({
|
||||||
}, true, {})
|
{"Failed to clone lazy.nvim:\n", "ErrorMsg"}, {out, "WarningMsg"},
|
||||||
vim.fn.getchar()
|
{"\nPress any key to exit..."}
|
||||||
os.exit(1)
|
}, true, {})
|
||||||
end
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
@ -24,11 +25,15 @@ vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
rocks = {
|
rocks = {
|
||||||
hererocks = false, -- recommended if you do not have global installation of Lua 5.1.
|
hererocks = false -- recommended if you do not have global installation of Lua 5.1.
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
-- Setup lazy.nvim
|
||||||
require("lazy").setup("plugins", opts)
|
require("lazy").setup("plugins", opts)
|
||||||
|
|
||||||
|
vim.cmd("set expandtab")
|
||||||
|
vim.cmd("set tabstop=2")
|
||||||
|
vim.cmd("set softtabstop=2")
|
||||||
|
vim.cmd("set shiftwidth=2")
|
||||||
vim.cmd('set number')
|
vim.cmd('set number')
|
||||||
|
|
Loading…
Add table
Reference in a new issue