style(lspsaga): format with stylua

This commit is contained in:
Samuel K 2021-12-17 20:26:22 +01:00
commit 46d0c44be5

View file

@ -1,11 +1,11 @@
local config = require('rose-pine.config') local config = require("rose-pine.config")
local p = require('rose-pine.palette') local p = require("rose-pine.palette")
-- TODO: Refactor `maybe` logic -- TODO: Refactor `maybe` logic
local maybe_inactive_background = p.none local maybe_inactive_background = p.none
local maybe_background = p.base local maybe_background = p.base
local maybe_float_background = p.surface local maybe_float_background = p.surface
local maybe_italic = 'italic' local maybe_italic = "italic"
local maybe_bold_vert_split = { fg = p.overlay } local maybe_bold_vert_split = { fg = p.overlay }
if config.bold_vert_split then if config.bold_vert_split then
@ -42,12 +42,12 @@ local theme = {
DiffChange = { fg = p.rose }, DiffChange = { fg = p.rose },
DiffDelete = { fg = p.love }, DiffDelete = { fg = p.love },
DiffText = { fg = p.text }, DiffText = { fg = p.text },
diffAdded = { link = 'DiffAdd' }, diffAdded = { link = "DiffAdd" },
diffChanged = { link = 'DiffChange' }, diffChanged = { link = "DiffChange" },
diffRemoved = { link = 'DiffDelete' }, diffRemoved = { link = "DiffDelete" },
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 = p.subtle },
FoldColumn = {}, FoldColumn = {},
Folded = { fg = p.text, bg = p.surface }, Folded = { fg = p.text, bg = p.surface },
@ -68,10 +68,10 @@ local theme = {
-- QuickFixLine = {}, -- QuickFixLine = {},
Search = { fg = p.iris, bg = p.highlight_high }, Search = { fg = p.iris, bg = p.highlight_high },
SpecialKey = { fg = p.foam }, SpecialKey = { fg = p.foam },
SpellBad = { style = 'undercurl', sp = p.love }, SpellBad = { style = "undercurl", sp = p.love },
SpellCap = { style = 'undercurl', sp = p.subtle }, SpellCap = { style = "undercurl", sp = p.subtle },
SpellLocal = { style = 'undercurl', sp = p.subtle }, SpellLocal = { style = "undercurl", sp = p.subtle },
SpellRare = { style = 'undercurl', sp = p.subtle }, SpellRare = { style = "undercurl", sp = p.subtle },
SignColumn = { fg = p.text, bg = maybe_background }, SignColumn = { fg = p.text, bg = maybe_background },
StatusLine = { fg = p.text, bg = p.surface }, StatusLine = { fg = p.text, bg = p.surface },
StatusLineNC = { fg = p.subtle, bg = p.surface }, StatusLineNC = { fg = p.subtle, bg = p.surface },
@ -125,49 +125,49 @@ local theme = {
Todo = { fg = p.iris }, Todo = { fg = p.iris },
Type = { fg = p.foam }, Type = { fg = p.foam },
Typedef = { fg = p.foam }, Typedef = { fg = p.foam },
Underlined = { fg = p.foam, style = 'underline' }, Underlined = { fg = p.foam, style = "underline" },
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 = config.colors.headings.h1, style = "bold" },
htmlH2 = { fg = config.colors.headings.h2, style = 'bold' }, htmlH2 = { fg = config.colors.headings.h2, style = "bold" },
htmlH3 = { fg = config.colors.headings.h3, style = 'bold' }, htmlH3 = { fg = config.colors.headings.h3, style = "bold" },
htmlH4 = { fg = config.colors.headings.h4, style = 'bold' }, htmlH4 = { fg = config.colors.headings.h4, style = "bold" },
htmlH5 = { fg = config.colors.headings.h5, style = 'bold' }, htmlH5 = { fg = config.colors.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 = config.colors.headings.h1, style = "bold" },
markdownH1Delimiter = { fg = config.colors.headings.h1 }, markdownH1Delimiter = { fg = config.colors.headings.h1 },
markdownH2 = { fg = config.colors.headings.h2, style = 'bold' }, markdownH2 = { fg = config.colors.headings.h2, style = "bold" },
markdownH2Delimiter = { fg = config.colors.headings.h2 }, markdownH2Delimiter = { fg = config.colors.headings.h2 },
markdownH3 = { fg = config.colors.headings.h3, style = 'bold' }, markdownH3 = { fg = config.colors.headings.h3, style = "bold" },
markdownH3Delimiter = { fg = config.colors.headings.h3 }, markdownH3Delimiter = { fg = config.colors.headings.h3 },
markdownH4 = { fg = config.colors.headings.h4, style = 'bold' }, markdownH4 = { fg = config.colors.headings.h4, style = "bold" },
markdownH4Delimiter = { fg = config.colors.headings.h4 }, markdownH4Delimiter = { fg = config.colors.headings.h4 },
markdownH5 = { fg = config.colors.headings.h5, style = 'bold' }, markdownH5 = { fg = config.colors.headings.h5, style = "bold" },
markdownH5Delimiter = { fg = config.colors.headings.h5 }, markdownH5Delimiter = { fg = config.colors.headings.h5 },
markdownH6 = { fg = config.colors.headings.h6, style = 'bold' }, markdownH6 = { fg = config.colors.headings.h6, style = "bold" },
markdownH6Delimiter = { fg = config.colors.headings.h6 }, markdownH6Delimiter = { fg = config.colors.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" },
mkdCode = { fg = p.foam, style = maybe_italic }, mkdCode = { fg = p.foam, style = maybe_italic },
mkdCodeDelimiter = { fg = p.rose }, mkdCodeDelimiter = { fg = p.rose },
mkdCodeEnd = { fg = p.foam }, mkdCodeEnd = { fg = p.foam },
mkdCodeStart = { fg = p.foam }, mkdCodeStart = { fg = p.foam },
mkdFootnotes = { fg = p.foam }, mkdFootnotes = { fg = p.foam },
mkdID = { fg = p.foam, style = 'underline' }, mkdID = { fg = p.foam, style = "underline" },
mkdInlineURL = { fg = p.foam, style = 'underline' }, mkdInlineURL = { fg = p.foam, style = "underline" },
mkdLink = { fg = p.rose, style = 'bold' }, mkdLink = { fg = p.rose, style = "bold" },
mkdLinkDef = { fg = p.rose, style = 'bold' }, mkdLinkDef = { fg = p.rose, style = "bold" },
mkdListItemLine = { fg = p.text }, mkdListItemLine = { fg = p.text },
mkdRule = { fg = p.subtle }, mkdRule = { fg = p.subtle },
mkdURL = { fg = p.foam, style = 'underline' }, mkdURL = { fg = p.foam, style = "underline" },
-- Fix background mismatch if user sets custom float background -- Fix background mismatch if user sets custom float background
-- In LSP hover float: (paramater) -- In LSP hover float: (paramater)
@ -192,11 +192,11 @@ local theme = {
DiagnosticSignInfo = { fg = config.colors.info }, DiagnosticSignInfo = { fg = config.colors.info },
DiagnosticSignWarn = { fg = config.colors.warn }, DiagnosticSignWarn = { fg = config.colors.warn },
DiagnosticSignError = { fg = config.colors.error }, DiagnosticSignError = { fg = config.colors.error },
DiagnosticUnderlineHint = { style = 'undercurl', sp = config.colors.hint }, DiagnosticUnderlineHint = { style = "undercurl", sp = config.colors.hint },
DiagnosticUnderlineInfo = { style = 'undercurl', sp = config.colors.info }, DiagnosticUnderlineInfo = { style = "undercurl", sp = config.colors.info },
DiagnosticUnderlineWarn = { style = 'undercurl', sp = config.colors.warn }, DiagnosticUnderlineWarn = { style = "undercurl", sp = config.colors.warn },
DiagnosticUnderlineError = { DiagnosticUnderlineError = {
style = 'undercurl', style = "undercurl",
sp = config.colors.error, sp = config.colors.error,
}, },
DiagnosticVirtualTextHint = { fg = config.colors.hint }, DiagnosticVirtualTextHint = { fg = config.colors.hint },
@ -209,35 +209,35 @@ local theme = {
LspReferenceWrite = { fg = p.rose, bg = p.highlight_med }, LspReferenceWrite = { fg = p.rose, bg = p.highlight_med },
-- TODO: Deprecate in favour of 0.6.0 groups -- TODO: Deprecate in favour of 0.6.0 groups
LspDiagnosticsSignWarning = { link = 'DiagnosticSignWarn' }, LspDiagnosticsSignWarning = { link = "DiagnosticSignWarn" },
LspDiagnosticsDefaultWarning = { link = 'DiagnosticDefaultWarn' }, LspDiagnosticsDefaultWarning = { link = "DiagnosticDefaultWarn" },
LspDiagnosticsFloatingWarning = { link = 'DiagnosticFloatingWarn' }, LspDiagnosticsFloatingWarning = { link = "DiagnosticFloatingWarn" },
LspDiagnosticsVirtualTextWarning = { link = 'DiagnosticVirtualTextWarn' }, LspDiagnosticsVirtualTextWarning = { link = "DiagnosticVirtualTextWarn" },
LspDiagnosticsUnderlineWarning = { link = 'DiagnosticUnderlineWarn' }, LspDiagnosticsUnderlineWarning = { link = "DiagnosticUnderlineWarn" },
LspDiagnosticsSignHint = { link = 'DiagnosticSignHint' }, LspDiagnosticsSignHint = { link = "DiagnosticSignHint" },
LspDiagnosticsDefaultHint = { link = 'DiagnosticDefaultHint' }, LspDiagnosticsDefaultHint = { link = "DiagnosticDefaultHint" },
LspDiagnosticsVirtualTextHint = { link = 'DiagnosticFloatingHint' }, LspDiagnosticsVirtualTextHint = { link = "DiagnosticFloatingHint" },
LspDiagnosticsFloatingHint = { link = 'DiagnosticVirtualTextHint' }, LspDiagnosticsFloatingHint = { link = "DiagnosticVirtualTextHint" },
LspDiagnosticsUnderlineHint = { link = 'DiagnosticUnderlineHint' }, LspDiagnosticsUnderlineHint = { link = "DiagnosticUnderlineHint" },
LspDiagnosticsSignError = { link = 'DiagnosticSignError' }, LspDiagnosticsSignError = { link = "DiagnosticSignError" },
LspDiagnosticsDefaultError = { link = 'DiagnosticDefaultError' }, LspDiagnosticsDefaultError = { link = "DiagnosticDefaultError" },
LspDiagnosticsFloatingError = { link = 'DiagnosticFloatingError' }, LspDiagnosticsFloatingError = { link = "DiagnosticFloatingError" },
LspDiagnosticsVirtualTextError = { link = 'DiagnosticVirtualTextError' }, LspDiagnosticsVirtualTextError = { link = "DiagnosticVirtualTextError" },
LspDiagnosticsUnderlineError = { link = 'DiagnosticUnderlineError' }, LspDiagnosticsUnderlineError = { link = "DiagnosticUnderlineError" },
LspDiagnosticsSignInformation = { link = 'DiagnosticSignInfo' }, LspDiagnosticsSignInformation = { link = "DiagnosticSignInfo" },
LspDiagnosticsDefaultInformation = { link = 'DiagnosticDefaultInfo' }, LspDiagnosticsDefaultInformation = { link = "DiagnosticDefaultInfo" },
LspDiagnosticsFloatingInformation = { link = 'DiagnosticFloatingInfo' }, LspDiagnosticsFloatingInformation = { link = "DiagnosticFloatingInfo" },
LspDiagnosticsVirtualTextInformation = { LspDiagnosticsVirtualTextInformation = {
link = 'DiagnosticVirtualTextInfo', link = "DiagnosticVirtualTextInfo",
}, },
LspDiagnosticsUnderlineInformation = { link = 'DiagnosticUnderlineInfo' }, LspDiagnosticsUnderlineInformation = { link = "DiagnosticUnderlineInfo" },
-- RedrawDebugNormal -- RedrawDebugNormal
RedrawDebugClear = { fg = '#ffffff', bg = p.gold }, RedrawDebugClear = { fg = "#ffffff", bg = p.gold },
RedrawDebugComposed = { fg = '#ffffff', bg = p.pine }, RedrawDebugComposed = { fg = "#ffffff", bg = p.pine },
RedrawDebugRecompose = { fg = '#ffffff', bg = p.love }, RedrawDebugRecompose = { fg = "#ffffff", bg = p.love },
NvimInternalError = { fg = '#ffffff', bg = p.love }, NvimInternalError = { fg = "#ffffff", bg = p.love },
-- TSAnnotation = {}, -- TSAnnotation = {},
-- TSAttribute = {}, -- TSAttribute = {},
@ -292,7 +292,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 = config.colors.headings.h1, style = "bold" },
-- TSType = {}, -- TSType = {},
-- TSTypeBuiltin = {}, -- TSTypeBuiltin = {},
TSURI = { fg = p.gold }, TSURI = { fg = p.gold },
@ -351,7 +351,7 @@ local theme = {
NvimTreeOpenedFile = { fg = p.text, bg = p.highlight_med }, NvimTreeOpenedFile = { fg = p.text, bg = p.highlight_med },
NvimTreeOpenedFolderName = { fg = p.foam }, NvimTreeOpenedFolderName = { fg = p.foam },
NvimTreeRootFolder = { fg = p.iris }, NvimTreeRootFolder = { fg = p.iris },
NvimTreeSpecialFile = { link = 'NvimTreeNormal' }, NvimTreeSpecialFile = { link = "NvimTreeNormal" },
NvimTreeGitDeleted = { fg = p.love }, NvimTreeGitDeleted = { fg = p.love },
NvimTreeGitDirty = { fg = p.rose }, NvimTreeGitDirty = { fg = p.rose },
NvimTreeGitIgnored = { fg = p.subtle }, NvimTreeGitIgnored = { fg = p.subtle },
@ -378,9 +378,9 @@ local theme = {
-- https://github.com/hrsh7th/nvim-cmp -- https://github.com/hrsh7th/nvim-cmp
CmpItemKind = { fg = p.iris }, CmpItemKind = { fg = p.iris },
CmpItemAbbr = { fg = p.subtle }, CmpItemAbbr = { fg = p.subtle },
CmpItemAbbrMatch = { fg = p.text, style = 'bold' }, CmpItemAbbrMatch = { fg = p.text, style = "bold" },
CmpItemAbbrMatchFuzzy = { fg = p.text, style = 'bold' }, CmpItemAbbrMatchFuzzy = { fg = p.text, style = "bold" },
CmpItemAbbrDeprecated = { fg = p.subtle, style = 'strikethrough' }, CmpItemAbbrDeprecated = { fg = p.subtle, style = "strikethrough" },
CmpItemKindVariable = { fg = p.foam }, CmpItemKindVariable = { fg = p.foam },
CmpItemKindClass = { fg = p.gold }, CmpItemKindClass = { fg = p.gold },
CmpItemKindInterface = { fg = p.gold }, CmpItemKindInterface = { fg = p.gold },
@ -402,12 +402,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 = config.colors.headings.h1, style = "bold" },
VimwikiHeader2 = { fg = config.colors.headings.h2, style = 'bold' }, VimwikiHeader2 = { fg = config.colors.headings.h2, style = "bold" },
VimwikiHeader3 = { fg = config.colors.headings.h3, style = 'bold' }, VimwikiHeader3 = { fg = config.colors.headings.h3, style = "bold" },
VimwikiHeader4 = { fg = config.colors.headings.h4, style = 'bold' }, VimwikiHeader4 = { fg = config.colors.headings.h4, style = "bold" },
VimwikiHeader5 = { fg = config.colors.headings.h5, style = 'bold' }, VimwikiHeader5 = { fg = config.colors.headings.h5, style = "bold" },
VimwikiHeader6 = { fg = config.colors.headings.h6, style = 'bold' }, VimwikiHeader6 = { fg = config.colors.headings.h6, style = "bold" },
VimwikiHeaderChar = { fg = p.pine }, VimwikiHeaderChar = { fg = p.pine },
VimwikiLink = { fg = p.rose }, VimwikiLink = { fg = p.rose },
VimwikiList = { fg = p.iris }, VimwikiList = { fg = p.iris },
@ -415,36 +415,36 @@ 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 = config.colors.headings.h1, style = "bold" },
NeorgHeading2Prefix = { fg = config.colors.headings.h2, style = 'bold' }, NeorgHeading2Prefix = { fg = config.colors.headings.h2, style = "bold" },
NeorgHeading3Prefix = { fg = config.colors.headings.h3, style = 'bold' }, NeorgHeading3Prefix = { fg = config.colors.headings.h3, style = "bold" },
NeorgHeading4Prefix = { fg = config.colors.headings.h4, style = 'bold' }, NeorgHeading4Prefix = { fg = config.colors.headings.h4, style = "bold" },
NeorgHeading5Prefix = { fg = config.colors.headings.h5, style = 'bold' }, NeorgHeading5Prefix = { fg = config.colors.headings.h5, style = "bold" },
NeorgHeading6Prefix = { fg = config.colors.headings.h6, style = 'bold' }, NeorgHeading6Prefix = { fg = config.colors.headings.h6, style = "bold" },
NeorgHeading1Title = { fg = config.colors.headings.h1, style = 'bold' }, NeorgHeading1Title = { fg = config.colors.headings.h1, style = "bold" },
NeorgHeading2Title = { fg = config.colors.headings.h2, style = 'bold' }, NeorgHeading2Title = { fg = config.colors.headings.h2, style = "bold" },
NeorgHeading3Title = { fg = config.colors.headings.h3, style = 'bold' }, NeorgHeading3Title = { fg = config.colors.headings.h3, style = "bold" },
NeorgHeading4Title = { fg = config.colors.headings.h4, style = 'bold' }, NeorgHeading4Title = { fg = config.colors.headings.h4, style = "bold" },
NeorgHeading5Title = { fg = config.colors.headings.h5, style = 'bold' }, NeorgHeading5Title = { fg = config.colors.headings.h5, style = "bold" },
NeorgHeading6Title = { fg = config.colors.headings.h6, style = 'bold' }, NeorgHeading6Title = { fg = config.colors.headings.h6, style = "bold" },
NeorgMarkerTitle = { fg = p.text, style = 'bold' }, NeorgMarkerTitle = { fg = p.text, style = "bold" },
-- LspSaga -- LspSaga
-- https://github.com/tami5/lspsaga.nvim (fork of https://github.com/glepnir/lspsaga.nvim) -- https://github.com/tami5/lspsaga.nvim (fork of https://github.com/glepnir/lspsaga.nvim)
LspSagaCodeActionTitle = { LspSagaCodeActionTitle = {
fg = p.gold, fg = p.gold,
style = 'bold', style = "bold",
}, },
LspSagaCodeActionBorder = { fg = p.subtle }, LspSagaCodeActionBorder = { fg = p.subtle },
LspSagaCodeActionTruncateLine = { link = 'LspSagaCodeActionBorder' }, LspSagaCodeActionTruncateLine = { link = "LspSagaCodeActionBorder" },
LspSagaCodeActionContent = { fg = p.foam }, LspSagaCodeActionContent = { fg = p.foam },
LspSagaDiagnosticBorder = { fg = p.subtle }, LspSagaDiagnosticBorder = { fg = p.subtle },
LspSagaDiagnosticHeader = { LspSagaDiagnosticHeader = {
fg = p.gold, fg = p.gold,
style = 'bold', style = "bold",
}, },
LspSagaDiagnosticTruncateLine = { link = 'LspSagaDiagnosticBorder' }, LspSagaDiagnosticTruncateLine = { link = "LspSagaDiagnosticBorder" },
LspSagaFinderSelection = { fg = p.gold }, LspSagaFinderSelection = { fg = p.gold },
LspSagaLspFinderBorder = { fg = p.subtle }, LspSagaLspFinderBorder = { fg = p.subtle },
LspSagaAutoPreview = { fg = p.subtle }, LspSagaAutoPreview = { fg = p.subtle },
@ -462,7 +462,7 @@ local theme = {
LspFloatWinNormal = { bg = p.base }, LspFloatWinNormal = { bg = p.base },
LspFloatWinBorder = { fg = p.subtle }, LspFloatWinBorder = { fg = p.subtle },
LspSagaDocTruncateLine = { link = "LspSagaHoverBorder" }, LspSagaDocTruncateLine = { link = "LspSagaHoverBorder" },
LspSagaHoverBorder = { fg = p.subtle}, LspSagaHoverBorder = { fg = p.subtle },
LspSagaSignatureHelpBorder = { fg = p.pine }, LspSagaSignatureHelpBorder = { fg = p.pine },
LspSagaShTruncateLine = { link = "LspSagaSignatureHelpBorder" }, LspSagaShTruncateLine = { link = "LspSagaSignatureHelpBorder" },
TargetWord = { fg = p.iris }, TargetWord = { fg = p.iris },