feat(theme): fix virtual text and clean highlights

This commit is contained in:
Matt Leong 2021-10-22 18:43:13 -07:00
parent 6b1da29c14
commit ecb38b33c0
2 changed files with 19 additions and 20 deletions

View file

@ -3,24 +3,13 @@ local highlight = require('cosmic.utils').highlight
local M = {}
function M.init()
-- diagnostic colors
-- sign colors
highlight('LspDiagnosticsSignError', 'None', colors.error)
highlight('LspDiagnosticsSignWarning', 'None', colors.warn)
highlight('LspDiagnosticsSignInformation', 'None', colors.info)
highlight('LspDiagnosticsSignHint', 'None', colors.hint)
--highlight('DiagnosticUnderlineError', 'None', colors.error)
--highlight('DiagnosticUnderlineWarning', 'None', colors.warn)
--highlight('DiagnosticUnderlineInformation', 'None', colors.info)
--highlight('DiagnosticUnderlineHint', 'None', colors.hint)
-- legacy lsp colors
highlight('LspDiagnosticsError', 'None', colors.error)
highlight('LspDiagnosticsWarn', 'None', colors.warn)
highlight('LspDiagnosticsInfo', 'None', colors.info)
highlight('LspDiagnosticsHint', 'None', colors.hint)
-- diagnostic virtual text highlights
highlight('DiagnosticVirtualTextError', 'None', colors.error)
highlight('DiagnosticVirtualTextWarn', 'None', colors.warn)
highlight('DiagnosticVirtualTextInfo', 'None', colors.info)
highlight('DiagnosticVirtualTextHint', 'None', colors.hint)
-- diagnostics highlight
highlight('DiagnosticError', 'None', colors.error)
highlight('DiagnosticWarn', 'None', colors.warn)
highlight('DiagnosticInfo', 'None', colors.info)
@ -28,15 +17,24 @@ function M.init()
highlight('Error', 'None', colors.error)
highlight('ErrorMsg', 'None', colors.error)
highlight('WarningMsg', 'None', colors.error)
highlight('WarningMsg', 'None', colors.warn)
-- legacy diagnostics highlight
highlight('LspDiagnosticsError', 'None', colors.error)
highlight('LspDiagnosticsWarn', 'None', colors.warn)
highlight('LspDiagnosticsInfo', 'None', colors.info)
highlight('LspDiagnosticsHint', 'None', colors.hint)
-- signature highlight color
highlight('LspSignatureActiveParameter', 'None', colors.orange)
-- currently not working
-- currently not working?
highlight('TelescopeSelectionCaret', 'None', colors.selection_caret)
-- needs to highlight after lsp start, why? idk
-- autocomplete highlights
highlight('CmpItemAbbrDeprecated', colors.warn)
-- todo: needs to highlight after lsp start, why? idk
vim.cmd([[
highlight clear NormalFloat
highlight link NormalFloat Normal

View file

@ -80,6 +80,7 @@ return packer.startup(function()
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-nvim-lua',
'hrsh7th/nvim-cmp',
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',