Organized and split init.lua into multiple files

This commit is contained in:
Andrew Scott 2023-04-03 00:11:15 -04:00
parent a098eda0f9
commit a6cc571f68
Signed by: a
GPG key ID: 7CD5A5977E4931C1
3 changed files with 83 additions and 55 deletions

View file

@ -1,62 +1,24 @@
require("plugins")
require("options")
vim.g.mapleader = " "
vim.keymap.set({ "n", "v" }, "<Leader>y", '"+y', { noremap = true, silent = true })
vim.opt.encoding = 'utf-8'
vim.opt.fileencoding = 'utf-8'
vim.opt.mouse = 'a'
vim.opt.hidden = true
vim.opt.ruler = true
vim.opt.cmdheight = 2
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.conceallevel = 0
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.smarttab = true
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.autoindent = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.laststatus = 0
vim.opt.number = false
vim.opt.wrap = true
vim.opt.breakindent = true
vim.opt.cursorline = false
vim.opt.background = 'dark'
vim.opt.showtabline = 2
vim.opt.updatetime = 300
vim.opt.timeoutlen = 500
vim.opt.autochdir = true
vim.opt.swapfile = true
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)
vim.cmd [[
syntax enable
set dir=~/.cache/nvim
]]
require("lazy").setup("plugins")
local Plug = vim.fn['plug#']
vim.call('plug#begin', '~/.local/share/nvim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'sheerun/vim-polyglot'
Plug 'jiangmiao/auto-pairs'
Plug('sainnhe/everforest', {
['do'] = function()
vim.opt.termguicolors = true
vim.cmd('colorscheme everforest')
vim.g.airline_theme = 'everforest'
vim.g.everforest_background = 'soft'
vim.g.everforest_better_performance = 1
end
})
vim.call('plug#end')
vim.opt.termguicolors = true
vim.cmd('colorscheme everforest')
vim.g.airline_theme = 'everforest'
vim.g.everforest_background = 'soft'
vim.g.everforest_better_performance = 1
vim.cmd("colorscheme everforest")

View file

@ -0,0 +1,29 @@
vim.o.encoding = "utf-8"
vim.o.fileencoding = "utf-8"
vim.o.mouse = "a"
vim.o.hidden = true
vim.o.ruler = true
vim.o.cmdheight = 2
vim.o.splitbelow = true
vim.o.splitright = true
vim.o.conceallevel = 0
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.smarttab = true
vim.o.expandtab = true
vim.o.smartindent = true
vim.o.autoindent = true
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.laststatus = 0
vim.o.number = false
vim.o.wrap = true
vim.o.breakindent = true
vim.o.cursorline = false
vim.o.background = "dark"
vim.o.showtabline = 2
vim.o.updatetime = 300
vim.o.timeoutlen = 500
vim.o.autochdir = true
vim.o.swapfile = true

View file

@ -0,0 +1,37 @@
return {
{
"folke/which-key.nvim",
config = true,
},
{
"windwp/nvim-autopairs",
config = true,
lazy = true,
event = { "BufReadPost", "BufNewFile" }
},
{
"nvim-treesitter/nvim-treesitter",
lazy = true,
build = ":TSUpdate",
event = { "BufReadPost", "BufNewFile" },
},
{
"nvim-lualine/lualine.nvim",
config = true,
dependencies = { 'nvim-tree/nvim-web-devicons' }
},
{
"neanias/everforest-nvim",
version = false,
priority = 1000,
config = function()
require("everforest").setup({
background = "soft",
transparent_background_level = 0,
italics = false,
disable_italic_comments = false,
})
end,
},
}