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.g.mapleader = " "
vim.keymap.set({ "n", "v" }, "<Leader>y", '"+y', { noremap = true, silent = true }) vim.keymap.set({ "n", "v" }, "<Leader>y", '"+y', { noremap = true, silent = true })
vim.opt.encoding = 'utf-8' local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.opt.fileencoding = 'utf-8' if not vim.loop.fs_stat(lazypath) then
vim.opt.mouse = 'a' vim.fn.system({
vim.opt.hidden = true "git",
vim.opt.ruler = true "clone",
vim.opt.cmdheight = 2 "--filter=blob:none",
vim.opt.splitbelow = true "https://github.com/folke/lazy.nvim.git",
vim.opt.splitright = true "--branch=stable",
vim.opt.conceallevel = 0 lazypath,
vim.opt.tabstop = 2 })
vim.opt.shiftwidth = 2 end
vim.opt.smarttab = true vim.opt.rtp:prepend(lazypath)
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
vim.cmd [[ require("lazy").setup("plugins")
syntax enable
set dir=~/.cache/nvim
]]
local Plug = vim.fn['plug#'] vim.cmd("colorscheme everforest")
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

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,
},
}