feat: restructure config
This commit is contained in:
parent
01060300d1
commit
9ade6862af
5 changed files with 43 additions and 41 deletions
34
init.lua
34
init.lua
|
@ -1,34 +1,4 @@
|
||||||
vim.g.mapleader = " "
|
require("options")
|
||||||
vim.g.maplocalleader = " "
|
|
||||||
|
|
||||||
vim.opt.belloff = "all"
|
|
||||||
vim.opt.backspace = "2"
|
|
||||||
vim.opt.showcmd = true
|
|
||||||
vim.opt.laststatus = 2
|
|
||||||
vim.opt.swapfile = false
|
|
||||||
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
|
|
||||||
vim.opt.autoindent = true
|
|
||||||
vim.opt.smartindent = true
|
|
||||||
vim.opt.smarttab = true
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.tabstop = 2
|
|
||||||
vim.opt.softtabstop = 2
|
|
||||||
vim.opt.copyindent = true
|
|
||||||
|
|
||||||
vim.opt.scrolloff = 2
|
|
||||||
vim.opt.splitright = true
|
|
||||||
vim.opt.splitbelow = true
|
|
||||||
vim.opt.wrap = false
|
|
||||||
vim.opt.cursorline = true
|
|
||||||
vim.opt.cmdheight = 2
|
|
||||||
|
|
||||||
vim.opt.hlsearch = false
|
|
||||||
vim.opt.incsearch = true
|
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
@ -62,3 +32,5 @@ end
|
||||||
require("lazy").setup("plugins")
|
require("lazy").setup("plugins")
|
||||||
require("keybinds")
|
require("keybinds")
|
||||||
require("autocmds")
|
require("autocmds")
|
||||||
|
|
||||||
|
vim.cmd.colorscheme("tokyonight")
|
||||||
|
|
|
@ -2,6 +2,6 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
pattern = { "gitcommit", "markdown", "md", "mdx" },
|
pattern = { "gitcommit", "markdown", "md", "mdx" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.spell = true
|
vim.opt_local.spell = true
|
||||||
vim.opt.wrap = true
|
vim.opt_local.wrap = true
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
31
lua/options.lua
Normal file
31
lua/options.lua
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
vim.opt.belloff = "all"
|
||||||
|
vim.opt.backspace = "2"
|
||||||
|
vim.opt.showcmd = true
|
||||||
|
vim.opt.laststatus = 2
|
||||||
|
vim.opt.swapfile = false
|
||||||
|
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
|
|
||||||
|
vim.opt.autoindent = true
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
vim.opt.smarttab = true
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
|
vim.opt.copyindent = true
|
||||||
|
|
||||||
|
vim.opt.scrolloff = 2
|
||||||
|
vim.opt.splitright = true
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
vim.opt.wrap = false
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
vim.opt.cmdheight = 2
|
||||||
|
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
vim.opt.incsearch = true
|
8
lua/plugins/colorscheme.lua
Normal file
8
lua/plugins/colorscheme.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = true,
|
||||||
|
opts = {
|
||||||
|
transparent = true,
|
||||||
|
dim_inactive = true,
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
return {
|
|
||||||
"folke/tokyonight.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
opts = {},
|
|
||||||
config = function()
|
|
||||||
vim.cmd.colorscheme "tokyonight"
|
|
||||||
end
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue