feat: add support for telescope.nvim and allow border overrides

This commit is contained in:
mvllow 2022-01-28 15:11:59 -06:00
commit f3bf19cabc
3 changed files with 91 additions and 81 deletions

View file

@ -9,6 +9,7 @@ local config = {
colors = { colors = {
punctuation = palette.subtle, punctuation = palette.subtle,
comment = palette.subtle, comment = palette.subtle,
border = palette.highlight_med,
hint = palette.iris, hint = palette.iris,
info = palette.foam, info = palette.foam,
warn = palette.gold, warn = palette.gold,

View file

@ -1,6 +1,7 @@
local config = require('rose-pine.config') local config = require('rose-pine.config')
local util = require('rose-pine.util') local util = require('rose-pine.util')
local p = require('rose-pine.palette') local p = require('rose-pine.palette')
local c = config.colors
-- TODO: Refactor `maybe` logic -- TODO: Refactor `maybe` logic
local maybe_inactive_background = p.none local maybe_inactive_background = p.none
@ -50,7 +51,7 @@ local theme = {
Directory = { fg = p.foam, bg = p.none }, Directory = { fg = p.foam, bg = p.none },
-- EndOfBuffer = {}, -- EndOfBuffer = {},
ErrorMsg = { fg = p.love, style = 'bold' }, ErrorMsg = { fg = p.love, style = 'bold' },
FloatBorder = { fg = p.subtle }, FloatBorder = { fg = c.border },
FoldColumn = { fg = p.muted }, FoldColumn = { fg = p.muted },
Folded = { fg = p.text, bg = p.surface }, Folded = { fg = p.text, bg = p.surface },
IncSearch = { bg = p.highlight_high }, IncSearch = { bg = p.highlight_high },
@ -93,7 +94,7 @@ local theme = {
Boolean = { fg = p.gold }, Boolean = { fg = p.gold },
Character = { fg = p.gold }, Character = { fg = p.gold },
Comment = { Comment = {
fg = config.colors.comment, fg = c.comment,
style = maybe_italic, style = maybe_italic,
}, },
Conditional = { fg = p.pine }, Conditional = { fg = p.pine },
@ -132,29 +133,29 @@ local theme = {
htmlArg = { fg = p.iris }, htmlArg = { fg = p.iris },
htmlBold = { fg = p.text, style = 'bold' }, htmlBold = { fg = p.text, style = 'bold' },
htmlEndTag = { fg = p.subtle }, htmlEndTag = { fg = p.subtle },
htmlH1 = { fg = config.colors.headings.h1, style = 'bold' }, htmlH1 = { fg = c.headings.h1, style = 'bold' },
htmlH2 = { fg = config.colors.headings.h2, style = 'bold' }, htmlH2 = { fg = c.headings.h2, style = 'bold' },
htmlH3 = { fg = config.colors.headings.h3, style = 'bold' }, htmlH3 = { fg = c.headings.h3, style = 'bold' },
htmlH4 = { fg = config.colors.headings.h4, style = 'bold' }, htmlH4 = { fg = c.headings.h4, style = 'bold' },
htmlH5 = { fg = config.colors.headings.h5, style = 'bold' }, htmlH5 = { fg = c.headings.h5, style = 'bold' },
htmlItalic = { fg = p.text, style = maybe_italic }, htmlItalic = { fg = p.text, style = maybe_italic },
htmlLink = { fg = p.text }, htmlLink = { fg = p.text },
htmlTag = { fg = p.subtle }, htmlTag = { fg = p.subtle },
htmlTagN = { fg = p.text }, htmlTagN = { fg = p.text },
htmlTagName = { fg = p.foam }, htmlTagName = { fg = p.foam },
markdownH1 = { fg = config.colors.headings.h1, style = 'bold' }, markdownH1 = { fg = c.headings.h1, style = 'bold' },
markdownH1Delimiter = { fg = config.colors.headings.h1 }, markdownH1Delimiter = { fg = c.headings.h1 },
markdownH2 = { fg = config.colors.headings.h2, style = 'bold' }, markdownH2 = { fg = c.headings.h2, style = 'bold' },
markdownH2Delimiter = { fg = config.colors.headings.h2 }, markdownH2Delimiter = { fg = c.headings.h2 },
markdownH3 = { fg = config.colors.headings.h3, style = 'bold' }, markdownH3 = { fg = c.headings.h3, style = 'bold' },
markdownH3Delimiter = { fg = config.colors.headings.h3 }, markdownH3Delimiter = { fg = c.headings.h3 },
markdownH4 = { fg = config.colors.headings.h4, style = 'bold' }, markdownH4 = { fg = c.headings.h4, style = 'bold' },
markdownH4Delimiter = { fg = config.colors.headings.h4 }, markdownH4Delimiter = { fg = c.headings.h4 },
markdownH5 = { fg = config.colors.headings.h5, style = 'bold' }, markdownH5 = { fg = c.headings.h5, style = 'bold' },
markdownH5Delimiter = { fg = config.colors.headings.h5 }, markdownH5Delimiter = { fg = c.headings.h5 },
markdownH6 = { fg = config.colors.headings.h6, style = 'bold' }, markdownH6 = { fg = c.headings.h6, style = 'bold' },
markdownH6Delimiter = { fg = config.colors.headings.h6 }, markdownH6Delimiter = { fg = c.headings.h6 },
markdownDelimiter = { fg = p.subtle }, markdownDelimiter = { fg = p.subtle },
markdownLinkText = { fg = p.iris, style = 'underline' }, markdownLinkText = { fg = p.iris, style = 'underline' },
markdownUrl = { fg = p.iris, style = 'underline' }, markdownUrl = { fg = p.iris, style = 'underline' },
@ -176,35 +177,35 @@ local theme = {
-- ^ ^ -- ^ ^
typescriptParens = { bg = p.none }, typescriptParens = { bg = p.none },
DiagnosticHint = { fg = config.colors.hint }, DiagnosticHint = { fg = c.hint },
DiagnosticInfo = { fg = config.colors.info }, DiagnosticInfo = { fg = c.info },
DiagnosticInformation = { link = 'DiagnosticInfo' }, DiagnosticInformation = { link = 'DiagnosticInfo' },
DiagnosticWarn = { fg = config.colors.warn }, DiagnosticWarn = { fg = c.warn },
DiagnosticWarning = { link = 'DiagnosticWarn' }, DiagnosticWarning = { link = 'DiagnosticWarn' },
DiagnosticError = { fg = config.colors.error }, DiagnosticError = { fg = c.error },
DiagnosticDefaultHint = { fg = config.colors.hint }, DiagnosticDefaultHint = { fg = c.hint },
DiagnosticDefaultInfo = { fg = config.colors.info }, DiagnosticDefaultInfo = { fg = c.info },
DiagnosticDefaultWarn = { fg = config.colors.warn }, DiagnosticDefaultWarn = { fg = c.warn },
DiagnosticDefaultError = { fg = config.colors.error }, DiagnosticDefaultError = { fg = c.error },
DiagnosticFloatingHint = { fg = config.colors.hint }, DiagnosticFloatingHint = { fg = c.hint },
DiagnosticFloatingInfo = { fg = config.colors.info }, DiagnosticFloatingInfo = { fg = c.info },
DiagnosticFloatingWarn = { fg = config.colors.warn }, DiagnosticFloatingWarn = { fg = c.warn },
DiagnosticFloatingError = { fg = config.colors.error }, DiagnosticFloatingError = { fg = c.error },
DiagnosticSignHint = { fg = config.colors.hint }, DiagnosticSignHint = { fg = c.hint },
DiagnosticSignInfo = { fg = config.colors.info }, DiagnosticSignInfo = { fg = c.info },
DiagnosticSignWarn = { fg = config.colors.warn }, DiagnosticSignWarn = { fg = c.warn },
DiagnosticSignError = { fg = config.colors.error }, DiagnosticSignError = { fg = c.error },
DiagnosticUnderlineHint = { style = 'undercurl', sp = config.colors.hint }, DiagnosticUnderlineHint = { style = 'undercurl', sp = c.hint },
DiagnosticUnderlineInfo = { style = 'undercurl', sp = config.colors.info }, DiagnosticUnderlineInfo = { style = 'undercurl', sp = c.info },
DiagnosticUnderlineWarn = { style = 'undercurl', sp = config.colors.warn }, DiagnosticUnderlineWarn = { style = 'undercurl', sp = c.warn },
DiagnosticUnderlineError = { DiagnosticUnderlineError = {
style = 'undercurl', style = 'undercurl',
sp = config.colors.error, sp = c.error,
}, },
DiagnosticVirtualTextHint = { fg = config.colors.hint }, DiagnosticVirtualTextHint = { fg = c.hint },
DiagnosticVirtualTextInfo = { fg = config.colors.info }, DiagnosticVirtualTextInfo = { fg = c.info },
DiagnosticVirtualTextWarn = { fg = config.colors.warn }, DiagnosticVirtualTextWarn = { fg = c.warn },
DiagnosticVirtualTextError = { fg = config.colors.error }, DiagnosticVirtualTextError = { fg = c.error },
LspReferenceText = { fg = p.rose, bg = p.highlight_med }, LspReferenceText = { fg = p.rose, bg = p.highlight_med },
LspReferenceRead = { fg = p.rose, bg = p.highlight_med }, LspReferenceRead = { fg = p.rose, bg = p.highlight_med },
@ -246,7 +247,7 @@ local theme = {
TSBoolean = { fg = p.rose }, TSBoolean = { fg = p.rose },
-- TSCharacter = {}, -- TSCharacter = {},
TSComment = { TSComment = {
fg = config.colors.comment, fg = c.comment,
style = maybe_italic, style = maybe_italic,
}, },
-- TSConditional = {}, -- TSConditional = {},
@ -282,9 +283,9 @@ local theme = {
fg = p.iris, fg = p.iris,
style = maybe_italic, style = maybe_italic,
}, },
TSPunctBracket = { fg = config.colors.punctuation }, TSPunctBracket = { fg = c.punctuation },
TSPunctDelimiter = { fg = config.colors.punctuation }, TSPunctDelimiter = { fg = c.punctuation },
TSPunctSpecial = { fg = config.colors.punctuation }, TSPunctSpecial = { fg = c.punctuation },
-- TSRepeat = {}, -- TSRepeat = {},
-- TSStrike = {}, -- TSStrike = {},
TSString = { fg = p.gold }, TSString = { fg = p.gold },
@ -295,7 +296,7 @@ local theme = {
TSTag = { fg = p.foam }, TSTag = { fg = p.foam },
TSTagDelimiter = { fg = p.subtle }, TSTagDelimiter = { fg = p.subtle },
TSText = { fg = p.text }, TSText = { fg = p.text },
TSTitle = { fg = config.colors.headings.h1, style = 'bold' }, TSTitle = { fg = c.headings.h1, style = 'bold' },
-- TSType = {}, -- TSType = {},
-- TSTypeBuiltin = {}, -- TSTypeBuiltin = {},
TSURI = { fg = p.gold }, TSURI = { fg = p.gold },
@ -408,12 +409,12 @@ local theme = {
-- VimWiki -- VimWiki
-- https://github.com/vimwiki/vimwiki -- https://github.com/vimwiki/vimwiki
VimwikiHR = { fg = p.subtle }, VimwikiHR = { fg = p.subtle },
VimwikiHeader1 = { fg = config.colors.headings.h1, style = 'bold' }, VimwikiHeader1 = { fg = c.headings.h1, style = 'bold' },
VimwikiHeader2 = { fg = config.colors.headings.h2, style = 'bold' }, VimwikiHeader2 = { fg = c.headings.h2, style = 'bold' },
VimwikiHeader3 = { fg = config.colors.headings.h3, style = 'bold' }, VimwikiHeader3 = { fg = c.headings.h3, style = 'bold' },
VimwikiHeader4 = { fg = config.colors.headings.h4, style = 'bold' }, VimwikiHeader4 = { fg = c.headings.h4, style = 'bold' },
VimwikiHeader5 = { fg = config.colors.headings.h5, style = 'bold' }, VimwikiHeader5 = { fg = c.headings.h5, style = 'bold' },
VimwikiHeader6 = { fg = config.colors.headings.h6, style = 'bold' }, VimwikiHeader6 = { fg = c.headings.h6, style = 'bold' },
VimwikiHeaderChar = { fg = p.pine }, VimwikiHeaderChar = { fg = p.pine },
VimwikiLink = { fg = p.rose, style = 'underline' }, VimwikiLink = { fg = p.rose, style = 'underline' },
VimwikiList = { fg = p.iris }, VimwikiList = { fg = p.iris },
@ -421,19 +422,19 @@ local theme = {
-- Neorg -- Neorg
-- https://github.com/nvim-neorg/neorg -- https://github.com/nvim-neorg/neorg
NeorgHeading1Prefix = { fg = config.colors.headings.h1, style = 'bold' }, NeorgHeading1Prefix = { fg = c.headings.h1, style = 'bold' },
NeorgHeading2Prefix = { fg = config.colors.headings.h2, style = 'bold' }, NeorgHeading2Prefix = { fg = c.headings.h2, style = 'bold' },
NeorgHeading3Prefix = { fg = config.colors.headings.h3, style = 'bold' }, NeorgHeading3Prefix = { fg = c.headings.h3, style = 'bold' },
NeorgHeading4Prefix = { fg = config.colors.headings.h4, style = 'bold' }, NeorgHeading4Prefix = { fg = c.headings.h4, style = 'bold' },
NeorgHeading5Prefix = { fg = config.colors.headings.h5, style = 'bold' }, NeorgHeading5Prefix = { fg = c.headings.h5, style = 'bold' },
NeorgHeading6Prefix = { fg = config.colors.headings.h6, style = 'bold' }, NeorgHeading6Prefix = { fg = c.headings.h6, style = 'bold' },
NeorgHeading1Title = { fg = config.colors.headings.h1, style = 'bold' }, NeorgHeading1Title = { fg = c.headings.h1, style = 'bold' },
NeorgHeading2Title = { fg = config.colors.headings.h2, style = 'bold' }, NeorgHeading2Title = { fg = c.headings.h2, style = 'bold' },
NeorgHeading3Title = { fg = config.colors.headings.h3, style = 'bold' }, NeorgHeading3Title = { fg = c.headings.h3, style = 'bold' },
NeorgHeading4Title = { fg = config.colors.headings.h4, style = 'bold' }, NeorgHeading4Title = { fg = c.headings.h4, style = 'bold' },
NeorgHeading5Title = { fg = config.colors.headings.h5, style = 'bold' }, NeorgHeading5Title = { fg = c.headings.h5, style = 'bold' },
NeorgHeading6Title = { fg = config.colors.headings.h6, style = 'bold' }, NeorgHeading6Title = { fg = c.headings.h6, style = 'bold' },
NeorgMarkerTitle = { fg = p.text, style = 'bold' }, NeorgMarkerTitle = { fg = p.text, style = 'bold' },
-- LspSaga -- LspSaga
@ -442,33 +443,27 @@ local theme = {
fg = p.gold, fg = p.gold,
style = 'bold', style = 'bold',
}, },
LspSagaCodeActionBorder = { fg = p.subtle }, LspSagaCodeActionBorder = { fg = c.border },
LspSagaCodeActionTruncateLine = { link = 'LspSagaCodeActionBorder' }, LspSagaCodeActionTruncateLine = { link = 'LspSagaCodeActionBorder' },
LspSagaCodeActionContent = { fg = p.foam }, LspSagaCodeActionContent = { fg = p.foam },
LspSagaDiagnosticBorder = { fg = p.subtle }, LspSagaDiagnosticBorder = { fg = c.border },
LspSagaDiagnosticHeader = { LspSagaDiagnosticHeader = { fg = p.gold, style = 'bold' },
fg = p.gold,
style = 'bold',
},
LspSagaDiagnosticTruncateLine = { link = 'LspSagaDiagnosticBorder' }, LspSagaDiagnosticTruncateLine = { link = 'LspSagaDiagnosticBorder' },
LspSagaFinderSelection = { fg = p.gold }, LspSagaFinderSelection = { fg = p.gold },
LspSagaLspFinderBorder = { fg = p.subtle }, LspSagaLspFinderBorder = { fg = c.border },
LspSagaAutoPreview = { fg = p.subtle }, LspSagaAutoPreview = { fg = p.subtle },
LspSagaDefPreviewBorder = { fg = p.subtle }, LspSagaDefPreviewBorder = { fg = c.border },
DefinitionIcon = { fg = p.rose }, DefinitionIcon = { fg = p.rose },
DefinitionCount = { fg = p.rose }, DefinitionCount = { fg = p.rose },
ReferencesCount = { fg = p.rose }, ReferencesCount = { fg = p.rose },
ReferencesIcon = { fg = p.rose }, ReferencesIcon = { fg = p.rose },
DefintionPreviewTitle = { DefintionPreviewTitle = { fg = p.rose, style = 'bold' },
fg = p.rose,
style = 'bold',
},
LspSagaRenamePromptPrefix = { fg = p.love }, LspSagaRenamePromptPrefix = { fg = p.love },
LspSagaRenameBorder = { fg = p.pine }, LspSagaRenameBorder = { fg = p.pine },
LspFloatWinNormal = { bg = p.base }, LspFloatWinNormal = { bg = p.base },
LspFloatWinBorder = { fg = p.subtle }, LspFloatWinBorder = { fg = c.border },
LspSagaDocTruncateLine = { link = 'LspSagaHoverBorder' }, LspSagaDocTruncateLine = { link = 'LspSagaHoverBorder' },
LspSagaHoverBorder = { fg = p.subtle }, LspSagaHoverBorder = { fg = c.border },
LspSagaSignatureHelpBorder = { fg = p.pine }, LspSagaSignatureHelpBorder = { fg = p.pine },
LspSagaShTruncateLine = { link = 'LspSagaSignatureHelpBorder' }, LspSagaShTruncateLine = { link = 'LspSagaSignatureHelpBorder' },
TargetWord = { fg = p.iris }, TargetWord = { fg = p.iris },
@ -485,6 +480,17 @@ local theme = {
PounceGap = { link = 'Search' }, PounceGap = { link = 'Search' },
PounceAccept = { fg = p.love, bg = p.highlight_high }, PounceAccept = { fg = p.love, bg = p.highlight_high },
PounceAcceptBest = { fg = p.base, bg = p.gold }, PounceAcceptBest = { fg = p.base, bg = p.gold },
-- telescope.nvim
-- https://github.com/nvim-telescope/telescope.nvim
TelescopeNormal = { fg = p.subtle },
TelescopePromptNormal = { fg = p.text },
TelescopeBorder = { fg = c.border },
TelescopeMatching = { fg = p.rose },
TelescopePromptPrefix = { fg = p.subtle },
TelescopeSelection = { fg = p.text, bg = p.highlight_low },
TelescopeSelectionCaret = { fg = p.rose },
TelescopeTitle = { fg = p.subtle },
} }
vim.g.terminal_color_0 = p.overlay -- black vim.g.terminal_color_0 = p.overlay -- black

View file

@ -40,6 +40,7 @@ use({
- **[Neorg](https://github.com/nvim-neorg/neorg)** - **[Neorg](https://github.com/nvim-neorg/neorg)**
- **[Lspsaga](https://github.com/tami5/lspsaga.nvim)** - **[Lspsaga](https://github.com/tami5/lspsaga.nvim)**
- **[Pounce](https://github.com/rlane/pounce.nvim)** - **[Pounce](https://github.com/rlane/pounce.nvim)**
- **[Telescope](https://github.com/nvim-telescope/telescope.nvim)**
- **[Lualine](https://github.com/hoob3rt/lualine.nvim)** - **[Lualine](https://github.com/hoob3rt/lualine.nvim)**
```lua ```lua
@ -47,6 +48,7 @@ use({
options = { theme = 'rose-pine' } options = { theme = 'rose-pine' }
}) })
``` ```
- **[Galaxyline fork](https://github.com/NTBBloodbath/galaxyline.nvim)** - **[Galaxyline fork](https://github.com/NTBBloodbath/galaxyline.nvim)**
> This fork by NTBBloodbath allows [custom colors](https://github.com/NTBBloodbath/galaxyline.nvim/blob/main/docs/themes.md#colors-standards) > This fork by NTBBloodbath allows [custom colors](https://github.com/NTBBloodbath/galaxyline.nvim/blob/main/docs/themes.md#colors-standards)
```lua ```lua
@ -88,6 +90,7 @@ local p = require('rose-pine.palette')
vim.g.rose_pine_colors = { vim.g.rose_pine_colors = {
punctuation = p.subtle, punctuation = p.subtle,
comment = p.subtle, comment = p.subtle,
border = p.highlight_med,
hint = p.iris, hint = p.iris,
info = p.foam, info = p.foam,
warn = p.gold, warn = p.gold,