initial import
This commit is contained in:
commit
f9f53656f7
32 changed files with 1064 additions and 0 deletions
2
lua/config/init.lua
Normal file
2
lua/config/init.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require("config.settings")
|
||||
require("config.lazy")
|
||||
24
lua/config/lazy.lua
Normal file
24
lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
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)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ import = "plugins" },
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
61
lua/config/settings.lua
Normal file
61
lua/config/settings.lua
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
local opt = vim.opt
|
||||
|
||||
local wo = vim.wo
|
||||
local cmd = vim.cmd
|
||||
local g = vim.g
|
||||
|
||||
g.mapleader = "\\"
|
||||
g.maplocalleader = " "
|
||||
|
||||
opt.cindent = true
|
||||
opt.colorcolumn = "80"
|
||||
opt.clipboard:append({ "unnamed", "unnamedplus" })
|
||||
opt.expandtab = true
|
||||
opt.exrc = true
|
||||
opt.foldmethod = "syntax"
|
||||
opt.foldcolumn = "1"
|
||||
opt.foldlevelstart = 20
|
||||
opt.ignorecase = true
|
||||
opt.incsearch = true
|
||||
opt.inccommand = "split"
|
||||
opt.mouse = "a"
|
||||
opt.completeopt = "menuone,noselect"
|
||||
wo.wrap = false
|
||||
opt.number = true
|
||||
opt.path = { "." }
|
||||
opt.signcolumn = "yes"
|
||||
opt.shiftwidth = 2
|
||||
opt.smartcase = true
|
||||
opt.smarttab = true
|
||||
opt.spell = false
|
||||
opt.spelllang = "en_us"
|
||||
opt.scrolloff = 8
|
||||
opt.relativenumber = true
|
||||
opt.tabstop = 2
|
||||
opt.wildignore = {
|
||||
"node_modules/**",
|
||||
".git/**",
|
||||
".settings/**",
|
||||
".mvn/**",
|
||||
"*.pyc",
|
||||
}
|
||||
opt.wildcharm = vim.fn.char2nr("<C-z>")
|
||||
opt.list = true
|
||||
opt.listchars = "eol:↩,tab: "
|
||||
|
||||
opt.title = true
|
||||
opt.showmode = false
|
||||
|
||||
vim.o.updatetime = 250
|
||||
vim.o.ch = 0
|
||||
|
||||
opt.syntax = "enable"
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = vim.fn.expand("~/.vim/undodir")
|
||||
vim.opt.undofile = true
|
||||
|
||||
if vim.fn.has("termguicolors") == 1 then
|
||||
opt.termguicolors = true
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue