diff --git a/init.lua b/init.lua index 9666a73..b6c32bd 100644 --- a/init.lua +++ b/init.lua @@ -1,34 +1,4 @@ -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 +require("options") local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then @@ -62,3 +32,5 @@ end require("lazy").setup("plugins") require("keybinds") require("autocmds") + +vim.cmd.colorscheme("tokyonight") diff --git a/lua/autocmds.lua b/lua/autocmds.lua index 7657ff3..2aee9f5 100644 --- a/lua/autocmds.lua +++ b/lua/autocmds.lua @@ -2,6 +2,6 @@ vim.api.nvim_create_autocmd({ "FileType" }, { pattern = { "gitcommit", "markdown", "md", "mdx" }, callback = function() vim.opt_local.spell = true - vim.opt.wrap = true + vim.opt_local.wrap = true end }) diff --git a/lua/options.lua b/lua/options.lua new file mode 100644 index 0000000..6fbe25e --- /dev/null +++ b/lua/options.lua @@ -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 diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..890c312 --- /dev/null +++ b/lua/plugins/colorscheme.lua @@ -0,0 +1,8 @@ +return { + "folke/tokyonight.nvim", + lazy = true, + opts = { + transparent = true, + dim_inactive = true, + } +} diff --git a/lua/plugins/tokyonight.lua b/lua/plugins/tokyonight.lua deleted file mode 100644 index 6c6b53e..0000000 --- a/lua/plugins/tokyonight.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - opts = {}, - config = function() - vim.cmd.colorscheme "tokyonight" - end -}