feat (storm): improved UI and LSP related integrations and made syntax less ambiguous

dev
Pocco81 3 years ago
parent 45c531aa8d
commit 8a3b8925cd

@ -12,6 +12,9 @@ config.options = {
variables = "italic", variables = "italic",
numbers = "bold", numbers = "bold",
booleans = "bold", booleans = "bold",
operators = "NONE",
properties = "NONE",
types = "NONE"
}, },
integrations = { integrations = {
treesitter = true, treesitter = true,

@ -1,4 +1,5 @@
local M = {} local M = {}
local util = require("catppuccin.utils.util")
function M.get(cp) function M.get(cp)
@ -8,7 +9,8 @@ function M.get(cp)
local error = cp.red local error = cp.red
local warning = cp.yellow local warning = cp.yellow
local info = cp.sky local info = cp.sky
local hint = cp.rosewater local hint = cp.teal
local darkening_percentage = 0.095
return { return {
-- These groups are for the native LSP cliencp. Some other LSP clients may -- These groups are for the native LSP cliencp. Some other LSP clients may
@ -18,10 +20,11 @@ function M.get(cp)
LspReferenceRead = { bg = cp.black4 }, -- used for highlighting "read" references LspReferenceRead = { bg = cp.black4 }, -- used for highlighting "read" references
LspReferenceWrite = { bg = cp.black4 }, -- used for highlighting "write" references LspReferenceWrite = { bg = cp.black4 }, -- used for highlighting "write" references
-- hightlight diagnostics in numberline -- hightlight diagnostics in numberline
DiagnosticError = { fg = error, style = virtual_text.errors }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default DiagnosticError = { bg = util.darken(error, darkening_percentage, cp.black2), fg = error, style = virtual_text.errors }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
DiagnosticWarn = { fg = warning, style = virtual_text.warnings }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default DiagnosticWarn = { bg = util.darken(warning, darkening_percentage, cp.black2), fg = warning, style = virtual_text.warnings }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
DiagnosticInfo = { fg = info, style = virtual_text.information }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default DiagnosticInfo = { bg = util.darken(info, darkening_percentage, cp.black2), fg = info, style = virtual_text.information }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
DiagnosticHint = { fg = hint, style = virtual_text.hints }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default DiagnosticHint = { bg = util.darken(hint, darkening_percentage, cp.black2), fg = hint, style = virtual_text.hints }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
-- util.
-- for nvim nightly -- for nvim nightly
DiagnosticUnderlineError = { style = underlines.errors, sp = error }, DiagnosticUnderlineError = { style = underlines.errors, sp = error },

@ -4,9 +4,8 @@ function M.get(cp)
local config = require("catppuccin.config").options local config = require("catppuccin.config").options
local nvimtree = config.integrations.nvimtree local nvimtree = config.integrations.nvimtree
local root_dir_color = cp.pink local root_dir_color = cp.black1
if nvimtree.show_root == true then
if nvimtree.show_root then
root_dir_color = cp.blue root_dir_color = cp.blue
end end

@ -1,5 +1,7 @@
local M = {} local M = {}
------ HERERE RERESFD SFDSF
function M.get(cp) function M.get(cp)
local delimeters = cp.gray2 local delimeters = cp.gray2
local operators = cp.sky local operators = cp.sky
@ -13,35 +15,39 @@ function M.get(cp)
-- By default, most of these groups link to an appropriate Vim group, -- By default, most of these groups link to an appropriate Vim group,
-- TSError -> Error for example, so you do not have to define these unless -- TSError -> Error for example, so you do not have to define these unless
-- you explicitly want to support Treesitter's improved syntax awareness. -- you explicitly want to support Treesitter's improved syntax awareness.
TSField = { fg = cp.rosewater }, -- For fields. TSField = { fg = cp.teal }, -- For fields.
TSProperty = { fg = cp.yellow, style = "italic" }, -- Same as TSField. TSProperty = { fg = cp.teal, style = cnf.styles.properties or "NONE" }, -- Same as TSField.
TSInclude = { fg = cp.teal, style = cnf.styles.keywords or "NONE" }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua.
TSOperator = { fg = operators, style = "bold" }, -- For any operator: +, but also -> and * in cp. TSInclude = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua.
TSKeywordOperator = { fg = operators, style = "bold" }, -- For new keyword operator TSOperator = { fg = operators, style = cnf.styles.operators or "NONE" }, -- For any operator: +, but also -> and * in cp.
TSPunctSpecial = { fg = cp.maroon, style = "bold" }, -- For special punctutation that does not fall in the catagories before. TSKeywordOperator = { fg = cp.mauve, style = cnf.styles.operators or "NONE" }, -- For new keyword operator
TSPunctSpecial = { fg = cp.sky, style = cnf.styles.operators or "NONE" }, -- For special punctutation that does not fall in the catagories before.
TSFloat = { fg = math_logic, style = cnf.styles.numbers or "NONE" }, -- For floats. TSFloat = { fg = math_logic, style = cnf.styles.numbers or "NONE" }, -- For floats.
TSNumber = { fg = math_logic, style = cnf.styles.numbers or "NONE" }, -- For all numbers TSNumber = { fg = math_logic, style = cnf.styles.numbers or "NONE" }, -- For all numbers
TSBoolean = { fg = math_logic, style = cnf.styles.booleans or "NONE" }, -- For booleans. TSBoolean = { fg = math_logic, style = cnf.styles.booleans or "NONE" }, -- For booleans.
TSConstructor = { fg = cp.lavender }, -- For constructor calls and definitions: = { } in Lua, and Java constructors. TSConstructor = { fg = cp.sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.
TSConstant = { fg = cp.peach }, -- For constants TSConstant = { fg = cp.peach }, -- For constants
TSConditional = { fg = cl, style = cnf.styles.keywords or "NONE" }, -- For keywords related to conditionnals. TSConditional = { fg = cl, style = cnf.styles.keywords or "NONE" }, -- For keywords related to conditionnals.
TSRepeat = { fg = cl, style = cnf.styles.keywords or "NONE" }, -- For keywords related to loops. TSRepeat = { fg = cl, style = cnf.styles.keywords or "NONE" }, -- For keywords related to loops.
TSException = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For exception related keywords. TSException = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For exception related keywords.
-- builtin -- builtin
TSConstBuiltin = { fg = cp.teal, style = cnf.styles.keywords or "NONE" }, -- For constant that are built in the language: nil in Lua. TSConstBuiltin = { fg = cp.peach, style = cnf.styles.keywords or "NONE" }, -- For constant that are built in the language: nil in Lua.
TSFuncBuiltin = { fg = cp.teal, style = "italic" }, -- For builtin functions: table.insert in Lua. TSFuncBuiltin = { fg = cp.sapphire, style = cnf.styles.functions or "NONE" }, -- For builtin functions: table.insert in Lua.
TSTypeBuiltin = { fg = cp.yellow, style = "italic" }, -- For builtin types.
TSVariableBuiltin = { fg = cp.red, style = "italic" }, -- Variable names that are defined by the languages, like this or self. TSNamespace = { fg = cp.blue, style = "italic" }, -- For identifiers referring to modules and namespaces.
TSType = { fg = cp.cotton, style = cnf.styles.types or "NONE" }, -- For types.
TSTypeBuiltin = { fg = cp.cotton, style = cnf.styles.properties or "italic" }, -- For builtin types.
TSVariableBuiltin = { fg = cp.red }, -- Variable names that are defined by the languages, like this or self.
TSFunction = { fg = cp.blue, style = cnf.styles.functions or "NONE" }, -- For function (calls and definitions). TSFunction = { fg = cp.blue, style = cnf.styles.functions or "NONE" }, -- For function (calls and definitions).
TSFuncMacro = { fg = cp.red, style = cnf.styles.functions or "NONE" }, -- For macro defined functions (calls and definitions): each macro_rules in Ruscp. TSFuncMacro = { fg = cp.teal, style = cnf.styles.functions or "NONE" }, -- For macro defined functions (calls and definitions): each macro_rules in Ruscp.
TSParameter = { fg = cp.yellow, style = "italic" }, -- For parameters of a function. TSParameter = { fg = cp.yellow, style = "italic" }, -- For parameters of a function.
TSKeywordFunction = { fg = cp.red, style = cnf.styles.keywords or "NONE" }, -- For keywords used to define a fuction. TSKeywordFunction = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For keywords used to define a fuction.
TSKeyword = { fg = keywords, style = cnf.styles.keywords or "NONE" }, -- For keywords that don't fall in previous categories. TSKeyword = { fg = keywords, style = cnf.styles.keywords or "NONE" }, -- For keywords that don't fall in previous categories.
TSKeywordReturn = { fg = cp.pink, style = cnf.styles.keywords or "NONE" }, TSKeywordReturn = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" },
-- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. -- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
-- TSAttribute = { }; -- (unstable) TODO: docs -- TSAttribute = { }; -- (unstable) TODO: docs
-- TSCharacter = { }; -- For characters. -- TSCharacter = { }; -- For characters.
@ -52,22 +58,20 @@ function M.get(cp)
-- TSConstMacro = { }; -- For constants that are defined by macros: NULL in cp. -- TSConstMacro = { }; -- For constants that are defined by macros: NULL in cp.
-- TSError = { fg = cp.red }, -- For syntax/parser errors. -- TSError = { fg = cp.red }, -- For syntax/parser errors.
-- rustTSField = { fg = cp.black4 }, -- For fields. -- rustTSField = { fg = cp.black4 }, -- For fields.
TSLabel = { fg = cp.blue }, -- For labels: label: in C and :label: in Lua. TSLabel = { fg = cp.sapphire }, -- For labels: label: in C and :label: in Lua.
TSMethod = { fg = cp.blue, style = "italic" }, -- For method calls and definitions. TSMethod = { fg = cp.blue, style = cnf.styles.functions or "NONE" }, -- For method calls and definitions.
TSNamespace = { fg = cp.rosewater, style = "italic" }, -- For identifiers referring to modules and namespaces.
-- TSNone = { }; -- TODO: docs -- TSNone = { }; -- TODO: docs
-- TSParameterReference= { }; -- For references to parameters of a function. -- TSParameterReference= { }; -- For references to parameters of a function.
tomlTSProperty = { fg = cp.blue }, -- Differentiates between string and properties tomlTSProperty = { fg = cp.blue }, -- Differentiates between string and properties
TSPunctDelimiter = { fg = cp.sky }, -- For delimiters ie: . TSPunctDelimiter = { fg = cp.gray2 }, -- For delimiters ie: .
TSPunctBracket = { fg = delimeters }, -- For brackets and parenthesis. TSPunctBracket = { fg = delimeters }, -- For brackets and parenthesis.
TSString = { fg = cp.green, style = cnf.styles.strings or "NONE" }, -- For strings. TSString = { fg = cp.green, style = cnf.styles.strings or "NONE" }, -- For strings.
TSStringRegex = { fg = cp.peach, style = cnf.styles.strings or "NONE" }, -- For regexes. TSStringRegex = { fg = cp.peach, style = cnf.styles.strings or "NONE" }, -- For regexes.
-- TSSymbol = { }; -- For identifiers referring to symbols or atoms. -- TSSymbol = { }; -- For identifiers referring to symbols or atoms.
TSType = { fg = cp.yellow }, -- For types.
TSVariable = { fg = cp.white, style = cnf.styles.variables or "NONE" }, -- Any variable name that does not have another highlighcp. TSVariable = { fg = cp.white, style = cnf.styles.variables or "NONE" }, -- Any variable name that does not have another highlighcp.
TSTagAttribute = { fg = cp.mauve, style = "italic" }, -- Tags like html tag names. TSTagAttribute = { fg = cp.teal, style = "italic" }, -- Tags like html tag names.
TSTag = { fg = cp.peach }, -- Tags like html tag names. TSTag = { fg = cp.mauve }, -- Tags like html tag names.
TSTagDelimiter = { fg = cp.maroon }, -- Tag delimiter like < > / TSTagDelimiter = { fg = cp.sky }, -- Tag delimiter like < > /
TSText = { fg = cp.white }, -- For strings considerated text in a markup language. TSText = { fg = cp.white }, -- For strings considerated text in a markup language.
-- TSEmphasis = { }; -- For text to be represented with emphasis. -- TSEmphasis = { }; -- For text to be represented with emphasis.
-- TSUnderline = { }; -- For text to be represented with an underline. -- TSUnderline = { }; -- For text to be represented with an underline.
@ -90,19 +94,23 @@ function M.get(cp)
-- bashTSParameter = { fg = cp.yellow, style = "italic" }, -- bashTSParameter = { fg = cp.yellow, style = "italic" },
-- lua -- lua
luaTSField = { fg = cp.rosewater },
-- luaTSConstructor = { fg = cp.flamingo }, -- For constructor calls and definitions: = { } in Lua, and Java constructors. jsonTSLabel = { fg = cp.blue }, -- For labels: label: in C and :label: in Lua.
luaTSFuncBuiltin = { fg = cp.teal, style = "italic" }, -- For builtin functions: table.insert in Lua. -- luaTSField = { fg = cp.rosewater },
luaTSConstructor = { fg = cp.lavender }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.
-- luaTSFuncBuiltin = { fg = cp.teal, style = "italic" }, -- For builtin functions: table.insert in Lua.
-- java -- java
-- javaTSField = { fg = cp.red },
-- javaTSType = { fg = cp.yellow }, -- current Java TS parser doesn't distinguish types properly
-- javaTSConstant = { fg = cp.teal }, -- javaTSConstant = { fg = cp.teal },
-- typescript -- typescript
typescriptTSProperty = { fg = cp.lavender, style = "italic" }, -- Same as TSField. -- typescriptTSProperty = { fg = cp.lavender, style = "italic" }, -- Same as TSField.
-- css -- css
cssTSType = { fg = cp.lavender }, -- cssTSType = { fg = cp.lavender },
cssTSProperty = { fg = cp.yellow, style = "italic" }, -- Same as TSField. -- cssTSProperty = { fg = cp.yellow, style = "italic" }, -- Same as TSField.
-- cpp -- cpp
cppTSProperty = { fg = cp.white }, cppTSProperty = { fg = cp.white },

@ -1,18 +1,44 @@
local color_palette = { local color_palette = {
rosewater = "#F5DFDA", -- Rosewater pink = "#F5BFE7", -- Pink -- done -- cotton
flamingo = "#F2CBCB", -- Flamingo -- done flamingo = "#F2CBCB", -- Flamingo -- done
mauve = "#C6A4F8", -- Mauve -- done cotton = "#F3DCAC",
pink = "#F5BFE7", -- Pink -- done yellow = "#F1D0D8", -- Yellow -- done -
red = "#F586A2", -- Red -- done -- cotton = "#B6FFEA",
maroon = "#EB9DA4", -- Maroon -- done rosewater = "#F5DFDA", -- Rosewater
peach = "#FCB081", -- Peach -- done mauve = "#C59FF6", -- Mauve -- done -
yellow = "#F8DEA9", -- Yellow -- done red = "#F67E98", -- Red -- done
green = "#A9E4A3", -- Green -- done maroon = "#F1949B", -- Maroon -- done
blue = "#8CB3FA", -- Blue -- done peach = "#FEA571", -- Peach -- done - -
green = "#9CDA83", -- Green -- done -
-- sapphire = "#2AC3DE",
-- sapphire = "#99FFCD",
-- sapphire = "#F8DEA9",
-- sapphire = "#B6FFCE",
-- sapphire = "#2AC3DE",
-- green = "#98C379", -- Green -- done -
sapphire = "#34C3DC",
-- cotton = "#E7F0C3",
-- cotton = "#CAF2D7",
-- cotton = "#CDF0EA",
-- cotton = "#F0D9FF",
-- cotton = "#F6AE99",
-- cotton = "#C1FFD7",
-- cotton = "#F3E6E3",
-- cotton = "#FFBA92",
-- sapphire = "#2AC3DE",
blue = "#83ABF9", -- Blue -- done
teal = "#78DCCC", -- Teal -- done
sky = "#89DCFD", -- Sky -- done sky = "#89DCFD", -- Sky -- done
teal = "#88DFD2", -- Teal -- done lavender = "#C1CAFE", -- Lavender -- done
lavender = "#C7CBFD", -- Lavender -- done white = "#C5CFF5", -- White -- done
white = "#D2DAF1", -- White -- done
gray2 = "#B9C0DB", -- Gray2 gray2 = "#B9C0DB", -- Gray2
gray1 = "#6F7599", -- Gray1 gray1 = "#6F7599", -- Gray1
gray0 = "#5E6487", -- Gray0 gray0 = "#5E6487", -- Gray0

Loading…
Cancel
Save