From e45ca2bb227d489a8e4f0ea407490489c3046222 Mon Sep 17 00:00:00 2001 From: Muhammad Salar Khan Date: Sat, 31 Dec 2022 05:44:20 +0500 Subject: [PATCH] replace deprecated highlight.create with api.nvim_set_hl --- lua/night/config.lua | 380 +++++++++++++++++++-------------------- lua/night/highlights.lua | 18 +- 2 files changed, 199 insertions(+), 199 deletions(-) diff --git a/lua/night/config.lua b/lua/night/config.lua index 5070a39..738f0b0 100644 --- a/lua/night/config.lua +++ b/lua/night/config.lua @@ -2,104 +2,104 @@ local M = {} M.highlights_base = function (colors) return { - Normal = { guifg = colors.foreground, guibg = colors.background }, - StatusLineNC = { guibg = colors.background, guifg = colors.background }, - StatusLine = { guibg = colors.background, guifg = colors.background }, - SignColumn = { guibg = colors.background, guifg = colors.background }, - MsgArea = { guifg = colors.foreground, guibg = colors.background }, - ModeMsg = { guifg = colors.foreground, guibg = colors.background }, - MsgSeparator = { guifg = colors.foreground, guibg = colors.background }, - SpellBad = { guifg = colors.color2 }, - SpellCap = { guifg = colors.color6 }, - SpellLocal = { guifg = colors.color4 }, - SpellRare = { guifg = colors.color6 }, - NormalNC = { guifg = colors.foreground, guibg = colors.background }, - Pmenu = { guifg = colors.foreground, guibg = colors.background }, - PmenuSel = { guifg = colors.background, guibg = colors.color4 }, - WildMenu = { guifg = colors.color7, guibg = colors.color4 }, - CursorLineNr = { guifg = colors.color0 }, - Comment = { guifg = vim.o.background == 'dark' and colors.color0 or colors.color7 }, - Folded = { guifg = colors.color4, guibg = colors.background }, - FoldColumn = { guifg = colors.color4, guibg = colors.background }, - LineNr = { guifg = vim.o.background == 'dark' and colors.color0 or colors.light_bg, guibg = colors.background }, - FloatBorder = { guifg = colors.background, guibg = colors.background }, - Whitespace = { guifg = colors.color1 }, - VertSplit = { guifg = colors.background, guibg = vim.o.background == 'dark' and colors.color0 or colors.light_bg }, - CursorLine = { guibg = colors.background }, - CursorColumn = { guibg = colors.background }, - ColorColumn = { guibg = colors.background }, - NormalFloat = { guibg = colors.background }, - Visual = { guibg = colors.color0, guifg = colors.foreground }, - VisualNOS = { guibg = colors.background }, - WarningMsg = { guifg = colors.color3, guibg = colors.background }, - DiffAdd = { guifg = colors.background, guibg = colors.color4 }, - DiffChange = { guifg = colors.background, guibg = colors.color5 }, - DiffDelete = { guifg = colors.background, guibg = colors.color11 }, - QuickFixLine = { guibg = colors.color2 }, - PmenuSbar = { guibg = colors.background }, - PmenuThumb = { guibg = colors.color2 }, - MatchParen = { guifg = colors.color4, guibg = colors.background }, - Cursor = { guifg = colors.fomeground, guibg = colors.cursor }, - lCursor = { guifg = colors.foreground, guibg = colors.cursor }, - CursorIM = { guifg = colors.foreground, guibg = colors.cursor }, - TermCursor = { guifg = colors.foreground, guibg = colors.cursor }, - TermCursorNC = { guifg = colors.foreground, guibg = colors.cursor }, - Conceal = { guifg = colors.color4, guibg = colors.background }, - Directory = { guifg = colors.color4 }, - SpecialKey = { guifg = colors.color4 }, - Title = { guifg = colors.color4 }, - ErrorMsg = { guifg = colors.color11, guibg = colors.background }, - Search = { guifg = colors.background, guibg = colors.color2 }, - IncSearch = { guifg = colors.background, guibg = colors.color2 }, - Substitute = { guifg = colors.color3, guibg = colors.color6 }, - MoreMsg = { guifg = colors.color5 }, - Question = { guifg = colors.color5 }, - EndOfBuffer = { guifg = colors.background }, - NonText = { guifg = colors.color1 }, - Variable = { guifg = colors.color6 }, - String = { guifg = colors.color2 }, - Character = { guifg = colors.color12 }, - Constant = { guifg = colors.color5 }, - Number = { guifg = colors.color3 }, - Boolean = { guifg = colors.color5 }, - Float = { guifg = colors.color5 }, - Identifier = { guifg = colors.color5 }, - Function = { guifg = colors.color4 }, - Operator = { guifg = colors.color5 }, - Type = { guifg = colors.color6 }, - StorageClass = { guifg = colors.color7 }, - Structure = { guifg = colors.color6 }, - Typedef = { guifg = colors.color6 }, - Keyword = { guifg = colors.color5 }, - Statement = { guifg = colors.color5 }, - Conditional = { guifg = colors.color5 }, - Repeat = { guifg = colors.color6 }, - Label = { guifg = colors.color4 }, - Exception = { guifg = colors.color6 }, - Include = { guifg = colors.color5 }, - PreProc = { guifg = colors.color6 }, - Define = { guifg = colors.color5 }, - Macro = { guifg = colors.color6 }, - PreCondit = { guifg = colors.color5 }, - Special = { guifg = colors.color5 }, - SpecialChar = { guifg = colors.foreground }, - Tag = { guifg = colors.color4 }, - Debug = { guifg = colors.color11 }, - Delimiter = { guifg = colors.foreground }, - SpecialComment = { guifg = colors.color2 }, - Ignore = { guifg = colors.color7, guibg = colors.background }, - Todo = { guifg = colors.color11, guibg = colors.background }, - Error = { guifg = colors.color11, guibg = colors.background }, - TabLine = { guifg = colors.color2, guibg = colors.background }, - TabLineSel = { guifg = colors.foreground, guibg = colors.background }, - TabLineFill = { guifg = colors.foreground, guibg = colors.background }, - CmpDocumentationBorder = { guifg = colors.foreground, guibg = colors.background }, - CmpItemAbbr = { guifg = colors.foreground, guibg = colors.background }, - CmpItemAbbrDeprecated = { guifg = colors.color2, guibg = colors.background }, - CmpItemAbbrMatch = { guifg = colors.color7, guibg = colors.background }, - CmpItemAbbrMatchFuzzy = { guifg = colors.color7, guibg = colors.background }, - CmpItemKind = { guifg = colors.color4, guibg = colors.background }, - CmpItemMenu = { guifg = colors.color2, guibg = colors.background }, + Normal = { fg = colors.foreground, bg = colors.background }, + StatusLineNC = { bg = colors.background, fg = colors.background }, + StatusLine = { bg = colors.background, fg = colors.background }, + SignColumn = { bg = colors.background, fg = colors.background }, + MsgArea = { fg = colors.foreground, bg = colors.background }, + ModeMsg = { fg = colors.foreground, bg = colors.background }, + MsgSeparator = { fg = colors.foreground, bg = colors.background }, + SpellBad = { fg = colors.color2 }, + SpellCap = { fg = colors.color6 }, + SpellLocal = { fg = colors.color4 }, + SpellRare = { fg = colors.color6 }, + NormalNC = { fg = colors.foreground, bg = colors.background }, + Pmenu = { fg = colors.foreground, bg = colors.background }, + PmenuSel = { fg = colors.background, bg = colors.color4 }, + WildMenu = { fg = colors.color7, bg = colors.color4 }, + CursorLineNr = { fg = colors.color0 }, + Comment = { fg = vim.o.background == 'dark' and colors.color0 or colors.color7 }, + Folded = { fg = colors.color4, bg = colors.background }, + FoldColumn = { fg = colors.color4, bg = colors.background }, + LineNr = { fg = vim.o.background == 'dark' and colors.color0 or colors.light_bg, bg = colors.background }, + FloatBorder = { fg = colors.background, bg = colors.background }, + Whitespace = { fg = colors.color1 }, + VertSplit = { fg = colors.background, bg = vim.o.background == 'dark' and colors.color0 or colors.light_bg }, + CursorLine = { bg = colors.background }, + CursorColumn = { bg = colors.background }, + ColorColumn = { bg = colors.background }, + NormalFloat = { bg = colors.background }, + Visual = { bg = colors.color0, fg = colors.foreground }, + VisualNOS = { bg = colors.background }, + WarningMsg = { fg = colors.color3, bg = colors.background }, + DiffAdd = { fg = colors.background, bg = colors.color4 }, + DiffChange = { fg = colors.background, bg = colors.color5 }, + DiffDelete = { fg = colors.background, bg = colors.color11 }, + QuickFixLine = { bg = colors.color2 }, + PmenuSbar = { bg = colors.background }, + PmenuThumb = { bg = colors.color2 }, + MatchParen = { fg = colors.color4, bg = colors.background }, + Cursor = { fg = colors.fomeground, bg = colors.cursor }, + lCursor = { fg = colors.foreground, bg = colors.cursor }, + CursorIM = { fg = colors.foreground, bg = colors.cursor }, + TermCursor = { fg = colors.foreground, bg = colors.cursor }, + TermCursorNC = { fg = colors.foreground, bg = colors.cursor }, + Conceal = { fg = colors.color4, bg = colors.background }, + Directory = { fg = colors.color4 }, + SpecialKey = { fg = colors.color4 }, + Title = { fg = colors.color4 }, + ErrorMsg = { fg = colors.color11, bg = colors.background }, + Search = { fg = colors.background, bg = colors.color2 }, + IncSearch = { fg = colors.background, bg = colors.color2 }, + Substitute = { fg = colors.color3, bg = colors.color6 }, + MoreMsg = { fg = colors.color5 }, + Question = { fg = colors.color5 }, + EndOfBuffer = { fg = colors.background }, + NonText = { fg = colors.color1 }, + Variable = { fg = colors.color6 }, + String = { fg = colors.color2 }, + Character = { fg = colors.color12 }, + Constant = { fg = colors.color5 }, + Number = { fg = colors.color3 }, + Boolean = { fg = colors.color5 }, + Float = { fg = colors.color5 }, + Identifier = { fg = colors.color5 }, + Function = { fg = colors.color4 }, + Operator = { fg = colors.color5 }, + Type = { fg = colors.color6 }, + StorageClass = { fg = colors.color7 }, + Structure = { fg = colors.color6 }, + Typedef = { fg = colors.color6 }, + Keyword = { fg = colors.color5 }, + Statement = { fg = colors.color5 }, + Conditional = { fg = colors.color5 }, + Repeat = { fg = colors.color6 }, + Label = { fg = colors.color4 }, + Exception = { fg = colors.color6 }, + Include = { fg = colors.color5 }, + PreProc = { fg = colors.color6 }, + Define = { fg = colors.color5 }, + Macro = { fg = colors.color6 }, + PreCondit = { fg = colors.color5 }, + Special = { fg = colors.color5 }, + SpecialChar = { fg = colors.foreground }, + Tag = { fg = colors.color4 }, + Debug = { fg = colors.color11 }, + Delimiter = { fg = colors.foreground }, + SpecialComment = { fg = colors.color2 }, + Ignore = { fg = colors.color7, bg = colors.background }, + Todo = { fg = colors.color11, bg = colors.background }, + Error = { fg = colors.color11, bg = colors.background }, + TabLine = { fg = colors.color2, bg = colors.background }, + TabLineSel = { fg = colors.foreground, bg = colors.background }, + TabLineFill = { fg = colors.foreground, bg = colors.background }, + CmpDocumentationBorder = { fg = colors.foreground, bg = colors.background }, + CmpItemAbbr = { fg = colors.foreground, bg = colors.background }, + CmpItemAbbrDeprecated = { fg = colors.color2, bg = colors.background }, + CmpItemAbbrMatch = { fg = colors.color7, bg = colors.background }, + CmpItemAbbrMatchFuzzy = { fg = colors.color7, bg = colors.background }, + CmpItemKind = { fg = colors.color4, bg = colors.background }, + CmpItemMenu = { fg = colors.color2, bg = colors.background }, -- treesitter @@ -114,56 +114,56 @@ M.highlights_base = function (colors) -- TSBoolean = { }; -- For booleans. -- TSCharacter = { }; -- For characters. -- TSComment = { }; -- For color1 blocks. - TSAttribute = { guifg = colors.color4 }, - TSNote = { guifg = colors.background, guibg = colors.color5 }, - TSComment = { guifg = vim.o.background == 'dark' and colors.color8 or colors.color7 }, - TSWarning = { guifg = colors.background, guibg = colors.color5 }, - TSDanger = { guifg = colors.background, guibg = colors.color3 }, - TSConstructor = { guifg = colors.color4 }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. + TSAttribute = { fg = colors.color4 }, + TSNote = { fg = colors.background, bg = colors.color5 }, + TSComment = { fg = vim.o.background == 'dark' and colors.color8 or colors.color7 }, + TSWarning = { fg = colors.background, bg = colors.color5 }, + TSDanger = { fg = colors.background, bg = colors.color3 }, + TSConstructor = { fg = colors.color4 }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. -- TSConditional = { }; -- For keywords related to conditionnals. -- TSConstant = { }; -- For constants -- TSConstBuiltin = { }; -- For constant that are built in the language: `nil` in Lua. -- TSConstMacro = { }; -- For constants that are defined by macros: `NULL` in C. -- TSError = { }; -- For syntax/parser errors. -- TSException = { }; -- For exception related keywords. - TSConstant = { guifg = colors.color7 }, - TSError = { guifg = colors.color1 }, - TSException = { guifg = colors.color5 }, - TSField = { guifg = colors.color6 }, -- For fields. + TSConstant = { fg = colors.color7 }, + TSError = { fg = colors.color1 }, + TSException = { fg = colors.color5 }, + TSField = { fg = colors.color6 }, -- For fields. -- TSFloat = { }; -- For floats. -- TSFunction = { }; -- For function (calls and definitions). -- TSFuncBuiltin = { }; -- For builtin functions: `table.insert` in Lua. -- TSFuncMacro = { }; -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust. -- TSInclude = { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. - TSKeyword = { guifg = colors.color5 }, -- For keywords that don't fall in previous categories. - TSKeywordFunction = { guifg = colors.color5 }, -- For keywords used to define a fuction. - TSLabel = { guifg = colors.color7 }, -- For labels: `label:` in C and `:label:` in Lua. + TSKeyword = { fg = colors.color5 }, -- For keywords that don't fall in previous categories. + TSKeywordFunction = { fg = colors.color5 }, -- For keywords used to define a fuction. + TSLabel = { fg = colors.color7 }, -- For labels: `label:` in C and `:label:` in Lua. -- TSMethod = { }; -- For method calls and definitions. -- TSNamespace = { }; -- For identifiers referring to modules and namespaces. -- TSNone = { }; -- TODO: docs - TSNumber = { guifg = colors.color1 }, - TSOperator = { guifg = colors.color5 }, -- For any operator: `+`, but also `->` and `*` in C. - TSParameter = { guifg = colors.color9 }, -- For parameters of a function. - TSParameterReference = { guifg = colors.color5 }; -- For references to parameters of a function. - TSProperty = { guifg = colors.color7 }, -- Same as `TSField`. - TSPunctDelimiter = { guifg = colors.color7 }, -- For delimiters ie: `.` - TSPunctBracket = { guifg = colors.foreground }, -- For brackets and parens. - TSPunctSpecial = { guifg = colors.color7 }, -- For special punctutation that does not fall in the catagories before. + TSNumber = { fg = colors.color1 }, + TSOperator = { fg = colors.color5 }, -- For any operator: `+`, but also `->` and `*` in C. + TSParameter = { fg = colors.color9 }, -- For parameters of a function. + TSParameterReference = { fg = colors.color5 }; -- For references to parameters of a function. + TSProperty = { fg = colors.color7 }, -- Same as `TSField`. + TSPunctDelimiter = { fg = colors.color7 }, -- For delimiters ie: `.` + TSPunctBracket = { fg = colors.foreground }, -- For brackets and parens. + TSPunctSpecial = { fg = colors.color7 }, -- For special punctutation that does not fall in the catagories before. -- TSRepeat = { }; -- For keywords related to loops. - TSRepeat = { guifg = colors.color5 }, - TSString = { guifg = colors.color2 }, - TSStringRegex = { guifg = colors.color7 }, -- For regexes. - TSStringEscape = { guifg = colors.color6 }, -- For escape characters within a string. + TSRepeat = { fg = colors.color5 }, + TSString = { fg = colors.color2 }, + TSStringRegex = { fg = colors.color7 }, -- For regexes. + TSStringEscape = { fg = colors.color6 }, -- For escape characters within a string. -- TSSymbol = { }; -- For identifiers referring to symbols or atoms. -- TSType = { }; -- For types. -- TSTypeBuiltin = { }; -- For builtin types. - TSVariable = { guifg = colors.color7 }, - TSVariableBuiltin = { guifg = colors.color6 }, -- Variable names that are defined by the languages, like `this` or `self`. + TSVariable = { fg = colors.color7 }, + TSVariableBuiltin = { fg = colors.color6 }, -- Variable names that are defined by the languages, like `this` or `self`. - TSTag = { guifg = colors.color4 }; -- Tags like html tag names. + TSTag = { fg = colors.color4 }; -- Tags like html tag names. -- TSTagDelimiter = { }; -- Tag delimiter like `<` `>` `/` -- TSText = { }; -- For strings considered text in a markup language. - TSTextReference = { guifg = colors.color6 }, + TSTextReference = { fg = colors.color6 }, -- TSEmphasis = { }; -- For text to be represented with emphasis. -- TSUnderline = { }; -- For text to be represented with an underline. -- TSStrike = { }; -- For strikethrough text. @@ -172,91 +172,91 @@ M.highlights_base = function (colors) -- TSURI = { }; -- Any URI like a link or email. -- LspTrouble - LspTroubleText = { guifg = colors.foreground }, - LspTroubleCount = { guifg = colors.color6, guibg = colors.foreground }, - LspTroubleNormal = { guifg = colors.foreground, guibg = colors.background }, + LspTroubleText = { fg = colors.foreground }, + LspTroubleCount = { fg = colors.color6, bg = colors.foreground }, + LspTroubleNormal = { fg = colors.foreground, bg = colors.background }, -- Illuminate - illuminatedWord = { guibg = colors.foreground }, - illuminatedCurWord = { guibg = colors.foreground }, + illuminatedWord = { bg = colors.foreground }, + illuminatedCurWord = { bg = colors.foreground }, -- diff - diffAdded = { guifg = colors.color4 }, - diffRemoved = { guifg = colors.color11 }, - diffChanged = { guifg = colors.color5 }, - diffOldFile = { guifg = colors.color5 }, - diffNewFile = { guifg = colors.color5 }, - diffFile = { guifg = colors.color7 }, - diffLine = { guifg = colors.color1 }, - diffIndexLine = { guifg = colors.color6 }, + diffAdded = { fg = colors.color4 }, + diffRemoved = { fg = colors.color11 }, + diffChanged = { fg = colors.color5 }, + diffOldFile = { fg = colors.color5 }, + diffNewFile = { fg = colors.color5 }, + diffFile = { fg = colors.color7 }, + diffLine = { fg = colors.color1 }, + diffIndexLine = { fg = colors.color6 }, -- Neogit - NeogitBranch = { guifg = colors.color6 }, - NeogitRemote = { guifg = colors.color6 }, - NeogitHunkHeader = { guibg = colors.background, guifg = colors.foreground }, - NeogitHunkHeaderHighlight = { guibg = colors.foreground, guifg = colors.color7 }, - NeogitDiffContextHighlight = { guibg = colors.background, guifg = colors.foreground }, - NeogitDiffDeleteHighlight = { guifg = colors.color11, guibg = colors.color11 }, - NeogitDiffAddHighlight = { guifg = colors.color4, guibg = colors.color4 }, + NeogitBranch = { fg = colors.color6 }, + NeogitRemote = { fg = colors.color6 }, + NeogitHunkHeader = { bg = colors.background, fg = colors.foreground }, + NeogitHunkHeaderHighlight = { bg = colors.foreground, fg = colors.color7 }, + NeogitDiffContextHighlight = { bg = colors.background, fg = colors.foreground }, + NeogitDiffDeleteHighlight = { fg = colors.color11, bg = colors.color11 }, + NeogitDiffAddHighlight = { fg = colors.color4, bg = colors.color4 }, -- GitGutter - GitGutterAdd = { guifg = colors.color4 }, -- diff mode: Added line |diff.txt| - GitGutterChange = { guifg = colors.color5 }, -- diff mode: Changed line |diff.txt| - GitGutterDelete = { guifg = colors.color11 }, -- diff mode: Deleted line |diff.txt| + GitGutterAdd = { fg = colors.color4 }, -- diff mode: Added line |diff.txt| + GitGutterChange = { fg = colors.color5 }, -- diff mode: Changed line |diff.txt| + GitGutterDelete = { fg = colors.color11 }, -- diff mode: Deleted line |diff.txt| -- GitSigns - GitSignsAdd = { guifg = colors.color4 }, -- diff mode: Added line |diff.txt| - GitSignsChange = { guifg = colors.color5 }, -- diff mode: Changed line |diff.txt| - GitSignsDelete = { guifg = colors.color11 }, -- diff mode: Deleted line |diff.txt| + GitSignsAdd = { fg = colors.color4 }, -- diff mode: Added line |diff.txt| + GitSignsChange = { fg = colors.color5 }, -- diff mode: Changed line |diff.txt| + GitSignsDelete = { fg = colors.color11 }, -- diff mode: Deleted line |diff.txt| -- Telescope - TelescopeBorder = { guifg = colors.color0, guibg = colors.background }, - TelescopeNormal = { guifg = colors.foreground, guibg = colors.background }, - TelescopeSelection = { guifg = colors.background, guibg = colors.color2 }, + TelescopeBorder = { fg = colors.color0, bg = colors.background }, + TelescopeNormal = { fg = colors.foreground, bg = colors.background }, + TelescopeSelection = { fg = colors.background, bg = colors.color2 }, -- Indent Blank Line - IndentBlanklineChar = { guifg = vim.o.background == 'dark' and colors.color0 or colors.light_bg, guibg = colors.background }, + IndentBlanklineChar = { fg = vim.o.background == 'dark' and colors.color0 or colors.light_bg, bg = colors.background }, -- NvimTree - NvimTreeNormal = { guifg = colors.foreground, guibg = colors.background }, - NvimTreeNormalNC = { guifg = colors.foreground, guibg = colors.background }, - NvimTreeRootFolder = { guifg = colors.color1 }, - NvimTreeGitDirty = { guifg = colors.color5 }, - NvimTreeGitNew = { guifg = colors.color4 }, - NvimTreeGitDeleted = { guifg = colors.color11 }, - NvimTreeSpecialFile = { guifg = colors.color6 }, - NvimTreeIndentMarker = { guifg = vim.o.background == 'dark' and colors.color0 or colors.light_bg }, - NvimTreeImageFile = { guifg = colors.foreground }, - NvimTreeSymlink = { guifg = colors.color7 }, - NvimTreeFolderIcon = { guifg = colors.color2, guibg = colors.background }, - NvimTreeStatusLineNC = { guibg = colors.background, guifg = colors.background }, + NvimTreeNormal = { fg = colors.foreground, bg = colors.background }, + NvimTreeNormalNC = { fg = colors.foreground, bg = colors.background }, + NvimTreeRootFolder = { fg = colors.color1 }, + NvimTreeGitDirty = { fg = colors.color5 }, + NvimTreeGitNew = { fg = colors.color4 }, + NvimTreeGitDeleted = { fg = colors.color11 }, + NvimTreeSpecialFile = { fg = colors.color6 }, + NvimTreeIndentMarker = { fg = vim.o.background == 'dark' and colors.color0 or colors.light_bg }, + NvimTreeImageFile = { fg = colors.foreground }, + NvimTreeSymlink = { fg = colors.color7 }, + NvimTreeFolderIcon = { fg = colors.color2, bg = colors.background }, + NvimTreeStatusLineNC = { bg = colors.background, fg = colors.background }, -- LspSaga - LspFloatWinNormal = { guibg = colors.background }, - LspFloatWinBorder = { guifg = colors.background }, - LspSagaBorderTitle = { guifg = colors.color7 }, - LspSagaHoverBorder = { guifg = colors.color7 }, - LspSagaRenameBorder = { guifg = colors.color4 }, - LspSagaDefPreviewBorder = { guifg = colors.color4 }, - LspSagaCodeActionBorder = { guifg = colors.color7 }, - LspSagaFinderSelection = { guifg = colors.color1 }, - LspSagaCodeActionTitle = { guifg = colors.color7 }, - LspSagaCodeActionContent = { guifg = colors.color6 }, - LspSagaSignatureHelpBorder = { guifg = colors.color11 }, - ReferencesCount = { guifg = colors.color6 }, - DefinitionCount = { guifg = colors.color6 }, - DefinitionIcon = { guifg = colors.color7 }, - ReferencesIcon = { guifg = colors.color7 }, - TargetWord = { guifg = colors.color7 }, + LspFloatWinNormal = { bg = colors.background }, + LspFloatWinBorder = { fg = colors.background }, + LspSagaBorderTitle = { fg = colors.color7 }, + LspSagaHoverBorder = { fg = colors.color7 }, + LspSagaRenameBorder = { fg = colors.color4 }, + LspSagaDefPreviewBorder = { fg = colors.color4 }, + LspSagaCodeActionBorder = { fg = colors.color7 }, + LspSagaFinderSelection = { fg = colors.color1 }, + LspSagaCodeActionTitle = { fg = colors.color7 }, + LspSagaCodeActionContent = { fg = colors.color6 }, + LspSagaSignatureHelpBorder = { fg = colors.color11 }, + ReferencesCount = { fg = colors.color6 }, + DefinitionCount = { fg = colors.color6 }, + DefinitionIcon = { fg = colors.color7 }, + ReferencesIcon = { fg = colors.color7 }, + TargetWord = { fg = colors.color7 }, -- NeoVim - healthError = { guifg = colors.color11 }, - healthSuccess = { guifg = colors.color4 }, - healthWarning = { guifg = colors.color5 }, + healthError = { fg = colors.color11 }, + healthSuccess = { fg = colors.color4 }, + healthWarning = { fg = colors.color5 }, -- BufferLine - BufferLineIndicatorSelected = { guifg = colors.color2 }, - BufferLineFill = { guifg = colors.foreground, guibg = colors.background }, + BufferLineIndicatorSelected = { fg = colors.color2 }, + BufferLineFill = { fg = colors.foreground, bg = colors.background }, } end diff --git a/lua/night/highlights.lua b/lua/night/highlights.lua index 46f1ead..6fd169d 100644 --- a/lua/night/highlights.lua +++ b/lua/night/highlights.lua @@ -1,21 +1,21 @@ local M = {} -local hi = vim.highlight.create +local hi = vim.api.nvim_set_hl local config = require('night.config') function M.highlight_all(colors, opts) local base_highlights = config.highlights_base(colors) for group, properties in pairs(base_highlights) do - hi(group, properties, false) + hi(0, group, properties) end local ntree = opts.nvim_tree or { contrast = false } if ntree.contrast == true then - hi('NvimTreeNormal', { guibg = colors.contrast, guifg = colors.foreground }) - hi('NvimTreeNormalNC', { guibg = colors.contrast, guifg = colors.foreground }) - hi('NvimTreeEndOfBuffer', { guibg = colors.contrast, guifg = colors.contrast }) - hi('NvimTreeEndOfBufferNC', { guibg = colors.contrast, guifg = colors.contrast }) - hi('NvimTreeVertSplit', { guifg = colors.background, guibg = colors.background }) - hi('NvimTreeFolderIcon', { guibg = colors.contrast }) - hi('NvimTreeIndentMarker', { guibg = colors.contrast }) + hi(0, 'NvimTreeNormal', { bg = colors.contrast, fg = colors.foreground }) + hi(0, 'NvimTreeNormalNC', { bg = colors.contrast, fg = colors.foreground }) + hi(0, 'NvimTreeEndOfBuffer', { bg = colors.contrast, fg = colors.contrast }) + hi(0, 'NvimTreeEndOfBufferNC', { bg = colors.contrast, fg = colors.contrast }) + hi(0, 'NvimTreeVertSplit', { fg = colors.background, bg = colors.background }) + hi(0, 'NvimTreeFolderIcon', { bg = colors.contrast }) + hi(0, 'NvimTreeIndentMarker', { bg = colors.contrast }) end end