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 34e6fd25ce
3 changed files with 91 additions and 81 deletions

View file

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

View file

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

View file

@ -40,6 +40,7 @@ use({
- **[Neorg](https://github.com/nvim-neorg/neorg)**
- **[Lspsaga](https://github.com/tami5/lspsaga.nvim)**
- **[Pounce](https://github.com/rlane/pounce.nvim)**
- **[Telescope](https://github.com/nvim-telescope/telescope.nvim)**
- **[Lualine](https://github.com/hoob3rt/lualine.nvim)**
```lua
@ -47,6 +48,7 @@ use({
options = { theme = 'rose-pine' }
})
```
- **[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)
```lua
@ -88,6 +90,7 @@ local p = require('rose-pine.palette')
vim.g.rose_pine_colors = {
punctuation = p.subtle,
comment = p.subtle,
border = p.highlight_med,
hint = p.iris,
info = p.foam,
warn = p.gold,