-
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(telescope): telescope flat style support (#521)
* feat(telescope): flat style * fix(docs): telescope integration * mod(telescope): backwards compatibility & rename 'flat' * fix(telescope): backwards compatibility * fix: selene * fix: stylua --------- Co-authored-by: Egor Martynov <[email protected]>
- Loading branch information
1 parent
506a4aa
commit fc73faa
Showing
5 changed files
with
63 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,50 @@ | ||
local M = {} | ||
|
||
function M.get() | ||
return { | ||
-- TelescopeNormal = { link = "NormalFloat" }, -- Respect telescope's default float bg | ||
TelescopeBorder = { link = "FloatBorder" }, | ||
TelescopeSelectionCaret = { fg = C.flamingo }, | ||
TelescopeSelection = { | ||
fg = O.transparent_background and C.flamingo or C.text, | ||
bg = O.transparent_background and C.none or C.surface0, | ||
style = { "bold" }, | ||
}, | ||
TelescopeMatching = { fg = C.blue }, | ||
-- TelescopePromptPrefix = { bg = C.crust }, | ||
-- TelescopePromptNormal = { bg = C.crust }, | ||
-- TelescopeResultsNormal = { bg = C.mantle }, | ||
-- TelescopePreviewNormal = { bg = C.crust }, | ||
-- TelescopePromptBorder = { bg = C.crust, fg = C.crust }, | ||
-- TelescopeResultsBorder = { bg = C.mantle, fg = C.crust }, | ||
-- TelescopePreviewBorder = { bg = C.crust, fg = C.crust }, | ||
-- TelescopePromptTitle = { fg = C.crust }, | ||
-- TelescopeResultsTitle = { fg = C.text }, | ||
-- TelescopePreviewTitle = { fg = C.crust }, | ||
} | ||
-- Backwards compatibility | ||
if type(O.integrations.telescope) == "boolean" then | ||
return { | ||
-- TelescopeNormal = { link = "NormalFloat" }, -- Respect telescope's default float bg | ||
TelescopeBorder = { link = "FloatBorder" }, | ||
TelescopeSelectionCaret = { fg = C.flamingo }, | ||
TelescopeSelection = { | ||
fg = O.transparent_background and C.flamingo or C.text, | ||
bg = O.transparent_background and C.none or C.surface0, | ||
style = { "bold" }, | ||
}, | ||
TelescopeMatching = { fg = C.blue }, | ||
} | ||
end | ||
|
||
if O.integrations.telescope.style == "classic" then | ||
-- Classic look | ||
return { | ||
-- TelescopeNormal = { link = "NormalFloat" }, -- Respect telescope's default float bg | ||
TelescopeBorder = { link = "FloatBorder" }, | ||
TelescopeSelectionCaret = { fg = C.flamingo }, | ||
TelescopeSelection = { | ||
fg = O.transparent_background and C.flamingo or C.text, | ||
bg = O.transparent_background and C.none or C.surface0, | ||
style = { "bold" }, | ||
}, | ||
TelescopeMatching = { fg = C.blue }, | ||
} | ||
elseif O.integrations.telescope.style == "nvchad" then | ||
-- Flat look | ||
return { | ||
TelescopePromptPrefix = { bg = C.crust }, | ||
TelescopeSelectionCaret = { fg = C.rosewater, bg = C.surface1, bold = true }, | ||
TelescopePromptNormal = { bg = C.crust }, | ||
TelescopeResultsNormal = { bg = C.mantle }, | ||
TelescopePreviewNormal = { bg = C.mantle }, | ||
TelescopePromptBorder = { bg = C.crust, fg = C.crust }, | ||
TelescopeResultsBorder = { bg = C.mantle, fg = C.mantle }, | ||
TelescopePreviewBorder = { bg = C.mantle, fg = C.mantle }, | ||
TelescopePromptTitle = { bg = C.rosewater, fg = C.base, bold = true }, | ||
TelescopeResultsTitle = { bg = C.rosewater, fg = C.base, bold = true }, | ||
TelescopePreviewTitle = { bg = C.lavender, fg = C.base, bold = true }, | ||
} | ||
end | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters