From 0f0e955b6e98337d812cbc5317235e4743f2c3f0 Mon Sep 17 00:00:00 2001 From: Andy Teijelo Date: Wed, 17 Aug 2022 08:05:34 -0400 Subject: [PATCH] move colorschemes to a separate lua file --- init.lua | 27 +-------------------------- lua/colorschemes.lua | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 lua/colorschemes.lua diff --git a/init.lua b/init.lua index ee7a036..09a9b90 100644 --- a/init.lua +++ b/init.lua @@ -26,32 +26,7 @@ vim.cmd([[highlight ColorColumn ctermbg=9]]) -- don't use NeoVim's thin cursor vim.opt.guicursor = "" ---vim.g.tokyonight_style = "night" ---vim.cmd([[colorscheme tokyonight]]) ---vim.cmd([[colorscheme PaperColor]]) ---vim.cmd([[colorscheme moonfly]]) -require("onedarkpro").setup({ - theme = "onedark_dark", - styles = { -- Choose from "bold,italic,underline" - strings = "NONE", -- Style that is applied to strings. - comments = "italic", -- Style that is applied to comments - keywords = "bold", -- Style that is applied to keywords - functions = "NONE", -- Style that is applied to functions - variables = "NONE", -- Style that is applied to variables - virtual_text = "NONE", -- Style that is applied to virtual text - }, - options = { - bold = true, -- Use the colorscheme's opinionated bold styles? - italic = true, -- Use the colorscheme's opinionated italic styles? - underline = true, -- Use the colorscheme's opinionated underline styles? - undercurl = true, -- Use the colorscheme's opinionated undercurl styles? - cursorline = false, -- Use cursorline highlighting? - transparency = false, -- Use a transparent background? - terminal_colors = false, -- Use the colorscheme's colors for Neovim's :terminal? - window_unfocussed_color = true, -- When the window is out of focus, change the normal background? - } -}) -vim.cmd([[colorscheme onedarkpro]]) +require("colorschemes") vim.api.nvim_set_keymap("n", "", "", { noremap = true }) vim.g.mapleader = " " diff --git a/lua/colorschemes.lua b/lua/colorschemes.lua new file mode 100644 index 0000000..c609458 --- /dev/null +++ b/lua/colorschemes.lua @@ -0,0 +1,30 @@ +function setup() + --vim.g.tokyonight_style = "night" + --vim.cmd([[colorscheme tokyonight]]) + --vim.cmd([[colorscheme PaperColor]]) + --vim.cmd([[colorscheme moonfly]]) + require("onedarkpro").setup({ + theme = "onedark_dark", + styles = { -- Choose from "bold,italic,underline" + strings = "NONE", -- Style that is applied to strings. + comments = "italic", -- Style that is applied to comments + keywords = "bold", -- Style that is applied to keywords + functions = "NONE", -- Style that is applied to functions + variables = "NONE", -- Style that is applied to variables + virtual_text = "NONE", -- Style that is applied to virtual text + }, + options = { + bold = true, -- Use the colorscheme's opinionated bold styles? + italic = true, -- Use the colorscheme's opinionated italic styles? + underline = true, -- Use the colorscheme's opinionated underline styles? + undercurl = true, -- Use the colorscheme's opinionated undercurl styles? + cursorline = false, -- Use cursorline highlighting? + transparency = false, -- Use a transparent background? + terminal_colors = false, -- Use the colorscheme's colors for Neovim's :terminal? + window_unfocussed_color = true, -- When the window is out of focus, change the normal background? + } + }) + vim.cmd([[colorscheme onedarkpro]]) +end + +setup()