Unify the indentation

This commit is contained in:
He4eT 2022-07-12 04:21:48 +03:00
commit 9f211ec44f

View file

@ -21,8 +21,6 @@
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-- IN THE SOFTWARE. -- IN THE SOFTWARE.
vim.o.background = 'dark'
vim.g.monotone_h = 0 vim.g.monotone_h = 0
vim.g.monotone_s = 0 vim.g.monotone_s = 0
vim.g.monotone_l = 70 vim.g.monotone_l = 70
@ -42,9 +40,9 @@ local yellow2 = hsl("#ffd700")
local green = hsl("#4e9a06") local green = hsl("#4e9a06")
local white = hsl("#ffffff") local white = hsl("#ffffff")
-- Config options -- Config params
local opt = { local params = {
contrast = (tonumber(vim.g.monotone_contrast) or 100) / 100, contrast = (tonumber(vim.g.monotone_contrast) or 100) / 100,
base_color = hsl( base_color = hsl(
tonumber(vim.g.monotone_h) or 15, tonumber(vim.g.monotone_h) or 15,
@ -62,7 +60,7 @@ end
local offsets = { 50, 20, 10, 0, -10, -25, -45, -60, -70 } local offsets = { 50, 20, 10, 0, -10, -25, -45, -60, -70 }
for i, offset in pairs(offsets) do for i, offset in pairs(offsets) do
colors[i] = shade(opt.base_color, opt.contrast, offset) colors[i] = shade(params.base_color, params.contrast, offset)
end end
colors.fg = hsl("#cdcdcd") colors.fg = hsl("#cdcdcd")
@ -129,7 +127,7 @@ return lush(function()
NonText({ fg = colors.nt }), -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. NonText({ fg = colors.nt }), -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|.
NormalFloat({ bg = colors[7], fg = colors[1] }), -- Normal text in floating windows. NormalFloat({ bg = colors[7], fg = colors[1] }), -- Normal text in floating windows.
NormalNC({}), -- Normal text in non-current windows NormalNC({}), -- Normal text in non-current windows
Pmenu({NormalFloat}), -- Popup menu: Normal item. Pmenu({ NormalFloat }), -- Popup menu: Normal item.
PmenuSel({ fg = colors.bg, bg = colors.fg }), -- Popup menu: selected item. PmenuSel({ fg = colors.bg, bg = colors.fg }), -- Popup menu: selected item.
PmenuSbar({ bg = colors[6] }), -- Popup menu: scrollbar. PmenuSbar({ bg = colors[6] }), -- Popup menu: scrollbar.
PmenuThumb({ bg = colors[3] }), -- Popup menu: Thumb of the scrollbar. PmenuThumb({ bg = colors[3] }), -- Popup menu: Thumb of the scrollbar.
@ -155,40 +153,40 @@ return lush(function()
WildMenu({ fg = colors[6], bg = colors.fg }), -- current match in 'wildmenu' completion WildMenu({ fg = colors[6], bg = colors.fg }), -- current match in 'wildmenu' completion
Constant({ fg = colors.constant }), -- (preferred) any constant Constant({ fg = colors.constant }), -- (preferred) any constant
-- String({}), -- a string constant: "this is a string" -- String({}), -- a string constant: "this is a string"
-- Character({}), -- a character constant: 'c', '\n' -- Character({}), -- a character constant: 'c', '\n'
-- Number({}), -- a number constant: 234, 0xff -- Number({}), -- a number constant: 234, 0xff
-- Boolean({}), -- a boolean constant: TRUE, false -- Boolean({}), -- a boolean constant: TRUE, false
-- Float({}), -- a floating point constant: 2.3e10 -- Float({}), -- a floating point constant: 2.3e10
Identifier({ fg = colors.identifier }), -- (preferred) any variable name Identifier({ fg = colors.identifier }), -- (preferred) any variable name
-- Function({}), -- function name (also: methods for classes) -- Function({}), -- function name (also: methods for classes)
Statement({ fg = colors.statement }), -- (preferred) any statement Statement({ fg = colors.statement }), -- (preferred) any statement
-- Conditional({}), -- if, then, else, endif, switch, etc. -- Conditional({}), -- if, then, else, endif, switch, etc.
-- Repeat({}), -- for, do, while, etc. -- Repeat({}), -- for, do, while, etc.
-- Label({}), -- case, default, etc. -- Label({}), -- case, default, etc.
-- Operator({}), -- "sizeof", "+", "*", etc. -- Operator({}), -- "sizeof", "+", "*", etc.
-- Keyword({}), -- any other keyword -- Keyword({}), -- any other keyword
-- Exception({}), -- try, catch, throw -- Exception({}), -- try, catch, throw
PreProc({}), -- (preferred) generic Preprocessor PreProc({}), -- (preferred) generic Preprocessor
-- Include({}), -- preprocessor #include -- Include({}), -- preprocessor #include
-- Define({}), -- preprocessor #define -- Define({}), -- preprocessor #define
-- Macro({}), -- same as Define -- Macro({}), -- same as Define
-- PreCondit({}), -- preprocessor #if, #else, #endif, etc. -- PreCondit({}), -- preprocessor #if, #else, #endif, etc.
Type({}), -- (preferred) int, long, char, etc. Type({}), -- (preferred) int, long, char, etc.
StorageClass({}), -- static, register, volatile, etc. StorageClass({}), -- static, register, volatile, etc.
Structure({}), -- struct, union, enum, etc. Structure({}), -- struct, union, enum, etc.
Typedef({}), -- A typedef Typedef({}), -- A typedef
Special({ fg = colors.statement }), -- (preferred) any special symbol Special({ fg = colors.statement }), -- (preferred) any special symbol
-- SpecialChar({}), -- special character in a constant -- SpecialChar({}), -- special character in a constant
-- Tag({}), -- you can use CTRL-] on this -- Tag({}), -- you can use CTRL-] on this
-- Delimiter({}), -- character that needs attention -- Delimiter({}), -- character that needs attention
-- SpecialComment({}), -- special things inside a comment -- SpecialComment({}), -- special things inside a comment
-- Debug({}), -- debugging statements -- Debug({}), -- debugging statements
Underlined({ gui = "underline" }), -- (preferred) text that stands out, HTML links Underlined({ gui = "underline" }), -- (preferred) text that stands out, HTML links
Bold({ gui = "bold" }), Bold({ gui = "bold" }),
@ -232,57 +230,56 @@ return lush(function()
-- Treesitter -- Treesitter
-- 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
-- TSBoolean({}); -- For booleans. -- TSBoolean({}), -- For booleans.
-- TSCharacter({}); -- For characters. -- TSCharacter({}), -- For characters.
-- TSComment({}); -- For comment blocks. -- TSComment({}), -- For comment blocks.
-- TSConstructor({}); -- For constructor calls and definitions: ` { }` in Lua, and Java constructors. -- TSConstructor({}), -- For constructor calls and definitions: ` { }` in Lua, and Java constructors.
-- TSConditional({}); -- For keywords related to conditionnals. -- TSConditional({}), -- For keywords related to conditionnals.
-- TSConstant({}), -- For constants -- TSConstant({}), -- For constants
-- TSConstBuiltin({}); -- For constant that are built in the language: `nil` in Lua. -- TSConstBuiltin({}), -- For constant that are built in the language: `nil` in Lua.
-- TSConstMacro({}); -- For constants that are defined by macros: `NULL` in C. -- TSConstMacro({}), -- For constants that are defined by macros: `NULL` in C.
-- TSError({}); -- For syntax/parser errors. -- TSError({}), -- For syntax/parser errors.
-- TSException({}); -- For exception related keywords. -- TSException({}), -- For exception related keywords.
-- TSField({}); -- For fields. -- TSField({}), -- For fields.
-- TSFloat({}); -- For floats. -- TSFloat({}), -- For floats.
-- TSFunction({}); -- For function (calls and definitions). -- TSFunction({}), -- For function (calls and definitions).
-- TSFuncBuiltin({}); -- For builtin functions: `table.insert` in Lua. -- TSFuncBuiltin({}), -- For builtin functions: `table.insert` in Lua.
-- TSFuncMacro({}); -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust. -- TSFuncMacro({}), -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
-- TSInclude({}); -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. -- TSInclude({}), -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
-- TSKeyword({}); -- For keywords that don't fall in previous categories. -- TSKeyword({}), -- For keywords that don't fall in previous categories.
-- TSKeywordFunction({}); -- For keywords used to define a fuction. -- TSKeywordFunction({}), -- For keywords used to define a fuction.
-- TSLabel({}); -- For labels: `label:` in C and `:label:` in Lua. -- TSLabel({}), -- For labels: `label:` in C and `:label:` in Lua.
-- TSMethod({}); -- For method calls and definitions. -- TSMethod({}), -- For method calls and definitions.
-- TSNamespace({}); -- For identifiers referring to modules and namespaces. -- TSNamespace({}), -- For identifiers referring to modules and namespaces.
-- TSNone({}); -- TODO: docs -- TSNone({}), -- TODO: docs
-- TSNumber({}); -- For all numbers -- TSNumber({}), -- For all numbers
-- TSOperator({}); -- For any operator: `+`, but also `->` and `*` in C. -- TSOperator({}), -- For any operator: `+`, but also `->` and `*` in C.
-- TSParameter({}); -- For parameters of a function. -- TSParameter({}), -- For parameters of a function.
-- TSParameterReference({}); -- For references to parameters of a function. -- TSParameterReference({}), -- For references to parameters of a function.
TSProperty({}), -- Same as `TSField`. TSProperty({}), -- Same as `TSField`.
-- TSPunctDelimiter({}); -- For delimiters ie: `.` -- TSPunctDelimiter({}), -- For delimiters ie: `.`
-- TSPunctBracket({}); -- For brackets and parens. -- TSPunctBracket({}), -- For brackets and parens.
-- TSPunctSpecial({}); -- For special punctutation that does not fall in the catagories before. -- TSPunctSpecial({}), -- For special punctutation that does not fall in the catagories before.
-- TSRepeat({}); -- For keywords related to loops. -- TSRepeat({}), -- For keywords related to loops.
-- TSString({}); -- For strings. -- TSString({}), -- For strings.
TSStringRegex({ fg = colors[1] }), -- For regexes. TSStringRegex({ fg = colors[1] }), -- For regexes.
TSStringEscape({ fg = colors.fg, gui = "bold" }), -- For escape characters within a string. TSStringEscape({ fg = colors.fg, gui = "bold" }), -- For escape characters within a string.
-- TSSymbol({}); -- For identifiers referring to symbols or atoms. -- TSSymbol({}), -- For identifiers referring to symbols or atoms.
-- TSType({}); -- For types. -- TSType({}), -- For types.
-- TSTypeBuiltin({}); -- For builtin types. -- TSTypeBuiltin({}), -- For builtin types.
-- TSVariable({}); -- Any variable name that does not have another highlight. -- TSVariable({}), -- Any variable name that does not have another highlight.
-- TSVariableBuiltin({}); -- Variable names that are defined by the languages, like `this` or `self`. -- TSVariableBuiltin({}), -- Variable names that are defined by the languages, like `this` or `self`.
-- TSTag({}), -- Tags like html tag names.
-- TSTag({}); -- Tags like html tag names. -- TSTagDelimiter({}), -- Tag delimiter like `<` `>` `/`
-- TSTagDelimiter({}); -- Tag delimiter like `<` `>` `/` -- TSText({}), -- For strings considered text in a markup language.
-- TSText({}); -- For strings considered 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. -- TSStrike({}), -- For strikethrough text.
-- TSStrike({}); -- For strikethrough text. -- TSTitle({}), -- Text that is part of a title.
-- TSTitle({}); -- Text that is part of a title. -- TSLiteral({}), -- Literal text.
-- TSLiteral({}); -- Literal text. -- TSURI({}), -- Any URI like a link or email.
-- TSURI({}); -- Any URI like a link or email.
IndentBlankLineContextStart({ gui = "underline", sp = colors.nt }), IndentBlankLineContextStart({ gui = "underline", sp = colors.nt }),
TreesitterContext({ fg = colors[3] }), TreesitterContext({ fg = colors[3] }),