Fix user config loading - add some plugins support (#4)
This commit is contained in:
parent
e2128bfe75
commit
a1e7b270c3
@ -1,5 +1,4 @@
|
||||
local config = require("gruber-darker.config")
|
||||
local highlights = require("gruber-darker.highlights")
|
||||
|
||||
local M = {}
|
||||
|
||||
@ -46,6 +45,8 @@ end
|
||||
|
||||
---Clear current highlights and set Neovim global `colors_name`
|
||||
function M.load()
|
||||
local highlights = require("gruber-darker.highlights")
|
||||
|
||||
if vim.g.colors_name then
|
||||
vim.cmd.hi("clear")
|
||||
end
|
||||
|
@ -12,6 +12,7 @@ local providers = {
|
||||
require("gruber-darker.highlights.terminal"),
|
||||
require("gruber-darker.highlights.treesitter"),
|
||||
require("gruber-darker.highlights.cmp"),
|
||||
require("gruber-darker.highlights.telescope"),
|
||||
}
|
||||
|
||||
---Set highlights for configured providers
|
||||
|
@ -32,6 +32,10 @@ M.highlights.diagnostic_underline_hint =
|
||||
|
||||
M.highlights.diagnostic_unnecessary = Highlight.new("DiagnosticUnnecessary", { link = M.highlights.diagnostic_underline_hint })
|
||||
|
||||
---LspSaga floating windows
|
||||
M.highlights.saga_normal = Highlight.new("SagaNormal", { link = vim_hl.normal_float })
|
||||
M.highlights.saga_border = Highlight.new("SagaBorder", { link = vim_hl.float_border })
|
||||
|
||||
---Used for highlighting "text" references
|
||||
-- M.highlights.lsp_reference_text = Highlight.new("LspReferenceText", {})
|
||||
---Used for highlighting "read" references
|
||||
|
26
lua/gruber-darker/highlights/telescope.lua
Normal file
26
lua/gruber-darker/highlights/telescope.lua
Normal file
@ -0,0 +1,26 @@
|
||||
local Highlight = require("gruber-darker.highlight")
|
||||
local c = require("gruber-darker.palette")
|
||||
local vim_hl = require("gruber-darker.highlights.vim").highlights
|
||||
local gruber_hl = require("gruber-darker.highlights.colorscheme").highlights
|
||||
|
||||
---@type HighlightsProvider
|
||||
local M = {
|
||||
highlights = {},
|
||||
}
|
||||
|
||||
function M.setup()
|
||||
for _, value in pairs(M.highlights) do
|
||||
value:setup()
|
||||
end
|
||||
end
|
||||
|
||||
M.highlights.telescope_normal = Highlight.new("TelescopeNormal", { link = gruber_hl.fg })
|
||||
M.highlights.telescope_matching = Highlight.new("TelescopeMatching", { link = gruber_hl.yellow_bold })
|
||||
M.highlights.telescope_border = Highlight.new("TelescopeBorder", { link = vim_hl.float_border })
|
||||
M.highlights.telescope_prompt_prefix = Highlight.new("TelescopePromptPrefix", { link = gruber_hl.niagara })
|
||||
M.highlights.telescope_title = Highlight.new("TelescopeTitle", { fg = c.white })
|
||||
M.highlights.telescope_selection = Highlight.new("TelescopeSelection", { fg = c["fg+2"], bg = c["bg+1"] })
|
||||
M.highlights.telescope_multi_selection = Highlight.new("TelescopeMultiSelection", { link = vim_hl.cursor_line })
|
||||
M.highlights.telescope_selection_caret = Highlight.new("TelescopeSelectionCaret", { link = gruber_hl.yellow })
|
||||
|
||||
return M
|
@ -87,7 +87,7 @@ M.highlights.non_text = Highlight.new("NonText", { link = M.highlights.end_of_bu
|
||||
---Normal text
|
||||
M.highlights.normal = Highlight.new("Normal", { fg = c.fg, bg = c.bg })
|
||||
---Normal text in non-current windows
|
||||
M.highlights.normal_non_current = Highlight.new("NormalNC", { fg = c.fg, bg = c["bg-1"] })
|
||||
M.highlights.normal_non_current = Highlight.new("NormalNC", { fg = c.fg, bg = c.bg })
|
||||
---Normal text in sidebar
|
||||
M.highlights.normal_sidebar = Highlight.new("NormalSB", { fg = c.fg, bg = c["bg-1"] })
|
||||
---Normal text in floating windows.
|
||||
|
Loading…
Reference in New Issue
Block a user