Rename colors.lua to theme.lua and set colorscheme there
This commit is contained in:
@@ -9,3 +9,4 @@ require("lsp")
|
|||||||
require("snippets")
|
require("snippets")
|
||||||
|
|
||||||
require("remaps")
|
require("remaps")
|
||||||
|
require("theme")
|
||||||
|
|||||||
@@ -23,18 +23,6 @@ vim.o.signcolumn = "yes"
|
|||||||
|
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
vim.cmd([[
|
|
||||||
let ayucolor = "mirage"
|
|
||||||
colorscheme ayu
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- Remove highlighting in signcolumn
|
|
||||||
vim.cmd("highlight clear SignColumn")
|
|
||||||
|
|
||||||
vim.cmd([[
|
|
||||||
highlight DiagnosticVirtualTextError guifg=DarkRed
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- Highlight on yank
|
-- Highlight on yank
|
||||||
vim.api.nvim_exec([[
|
vim.api.nvim_exec([[
|
||||||
augroup YankHighlight
|
augroup YankHighlight
|
||||||
|
|||||||
27
config/nvim/lua/theme.lua
Normal file
27
config/nvim/lua/theme.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
local function set_highlight(group, options)
|
||||||
|
local bg = options.bg == nil and '' or 'guibg=' .. options.bg
|
||||||
|
local fg = options.fg == nil and '' or 'guifg=' .. options.fg
|
||||||
|
local gui = options.gui == nil and '' or 'gui=' .. options.gui
|
||||||
|
local ctermbg = options.bg == nil and '' or 'guibg=' .. options.bg
|
||||||
|
local ctermfg = options.fg == nil and '' or 'guifg=' .. options.fg
|
||||||
|
|
||||||
|
vim.cmd(string.format('hi %s %s %s %s %s %s', group, bg, fg, gui, ctermbg, ctermfg))
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd([[
|
||||||
|
let ayucolor = "mirage"
|
||||||
|
colorscheme ayu
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Remove highlighting in signcolumn
|
||||||
|
vim.cmd("highlight clear SignColumn")
|
||||||
|
|
||||||
|
-- Autocompletion menu
|
||||||
|
set_highlight("CmpItemMenu", { fg = "DarkGrey" })
|
||||||
|
set_highlight("Pmenu", { bg = "#191e2a", fg = "#cbccc6" })
|
||||||
|
set_highlight("PmenuSel", { bg = "#cbccc6", fg = "#ffa754" })
|
||||||
|
set_highlight("PmenuThumb", { bg = "#ffa754" })
|
||||||
|
set_highlight("Comment", { gui = "italic" })
|
||||||
|
|
||||||
|
-- Diagnostics
|
||||||
|
set_highlight("DiagnosticVirtualTextError", { fg = "DarkRed" })
|
||||||
Reference in New Issue
Block a user