diff --git a/README.md b/README.md index 1b75efc4..2f586e7c 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ require 'nordic' .setup { -- Available styles: `classic`, `flat`. style = 'flat', }, - -- Enable bold keywords and operators. + -- Enable bold keywords. bold_keywords = true, -- Enable italicized comments. italic_comments = true, diff --git a/lua/nordic/colors.lua b/lua/nordic/colors.lua index 74771c15..477161bb 100644 --- a/lua/nordic/colors.lua +++ b/lua/nordic/colors.lua @@ -34,6 +34,10 @@ local palette = { blue0 = '#5E81AC', blue1 = '#81A1C1', blue2 = '#88C0D0', + blue = { + bright = '#8CAFD2', + dim = '#668AAB', + }, cyan = { base = '#8FBCBB', bright = '#93CCDC', @@ -69,12 +73,7 @@ local palette = { bright = '#C895BF', dim = '#9D7495', }, - -- From @nightfox.nvim. - blue = { - base = '#81A1C1', - bright = '#8CAFD2', - dim = '#668AAB', - }, + } -- Add these for international convenience :) diff --git a/lua/nordic/groups/integrations/treesitter.lua b/lua/nordic/groups/integrations/treesitter.lua index 7fa2e9c7..1d61a752 100644 --- a/lua/nordic/groups/integrations/treesitter.lua +++ b/lua/nordic/groups/integrations/treesitter.lua @@ -2,7 +2,6 @@ local c = require 'nordic.colors' local o = require('nordic.config').options -local m = require('nordic.utils').merge return { -- These groups are for the neovim tree-sitter highlights. @@ -20,36 +19,30 @@ return { ['@text.note'] = { fg = c.bg, bg = c.info }, ['@text.warning'] = { fg = c.bg, bg = c.warning }, ['@text.danger'] = { fg = c.bg, bg = c.error }, - ['@constructor'] = { fg = c.white0 }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. + ['@constructor'] = { link = '@function' }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. -- TSConditional = { }; -- For keywords related to conditionnals. -- TSConstant = { }; -- For constants -- TSConstBuiltin = { }; -- For constant that are built in the language: `nil` in Lua. -- TSConstMacro = { }; -- For constants that are defined by macros: `NULL` in C. -- TSError = { }; -- For syntax/parser errors. -- TSException = { }; -- For exception related keywords. - -- ["@field"] = { fg = c.green.base }, -- For fields. -- TSFloat = { }; -- For floats. -- TSFunction = { }; -- For function (calls and definitions). -- TSFuncBuiltin = { }; -- For builtin functions: `table.insert` in Lua. -- 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. - -- ["@keyword"] = { fg = c.orange.base }, -- For keywords that don't fall in previous categories. - -- ["@keyword.function"] = { fg = c.orange.base }, -- For keywords used to define a fuction. ['@label'] = { fg = c.blue1 }, -- For labels: `label:` in C and `:label:` in Lua. -- TSMethod = { }; -- For method calls and definitions. -- TSNamespace = { }; -- For identifiers referring to modules and namespaces. -- TSNone = { }; -- TODO: docs -- TSNumber = { }; -- For all numbers - -- ["@operator"] = { fg = c.orange.bright }, -- For any operator: `+`, but also `->` and `*` in C. ['@parameter'] = { fg = c.white0, italic = true, }, -- For parameters of a function. -- TSParameterReference= { }; -- For references to parameters of a function. - -- ["@property"] = { fg = c.cyan.base }, -- Same as `TSField`. ['@punctuation.delimiter'] = { fg = c.white0 }, -- For delimiters ie: `.` ['@punctuation.bracket'] = { fg = c.white0 }, -- For brackets and parens. - -- ["@punctuation.special"] = { fg = c.white0 }, -- For special punctutation that does not fall in the catagories before. -- TSRepeat = { }; -- For keywords related to loops. -- TSString = { }; -- For strings. ['@string.regex'] = { fg = c.green.dim }, -- For regexes. @@ -58,7 +51,6 @@ return { -- TSType = { }; -- For types. -- TSTypeBuiltin = { }; -- For builtin types. ['@variable'] = { fg = c.white0 }, -- Any variable name that does not have another highlight. - -- ["@variable.builtin"] = { fg = c.blue1 }, -- Variable names that are defined by the languages, like `this` or `self`. ['@tag'] = { fg = c.blue1 }, -- Tags like html tag names. ['@tag.delimiter'] = { fg = c.white0 }, -- Tag delimiter like `<` `>` `/` @@ -78,8 +70,6 @@ return { -- Lua -- luaTSProperty = { fg = c.red }, -- Same as `TSField`. - -- FROM LEGACY CODEBASE. - ----------------------- -- Magentas. ['@constant'] = { fg = c.magenta.bright }, ['Number'] = { fg = c.magenta.bright }, @@ -93,10 +83,10 @@ return { ['@keyword.return'] = { fg = c.orange.base, bold = o.bold_keywords }, ['@keyword.function'] = { fg = c.orange.base, bold = o.bold_keywords }, ['@keyword.export'] = { fg = c.orange.base, bold = o.bold_keywords }, - ['@keyword.operator'] = { fg = c.orange.bright, bold = o.bold_keywords }, ['@repeat'] = { fg = c.orange.base, bold = o.bold_keywords }, ['@conditional'] = { fg = c.orange.base, bold = o.bold_keywords }, - ['@operator'] = { fg = c.orange.bright, bold = o.bold_keywords }, + ['@operator'] = { link = 'Operator' }, + ['@keyword.operator'] = { link = 'Operator' }, ['@class'] = { fg = c.orange.base, bold = o.bold_keywords }, ['@type.qualifier'] = { fg = c.orange.base, bold = o.bold_keywords }, ['@storageclass'] = { fg = c.orange.base, bold = o.bold_keywords }, @@ -115,7 +105,7 @@ return { ['@method.call'] = { fg = c.blue2 }, ['@function.call'] = { fg = c.blue2 }, ['@function.builtin'] = { fg = c.blue2 }, - ['@variable.builtin'] = { fg = c.blue0, italic = true }, + ['@variable.builtin'] = { fg = c.blue.dim, italic = true }, -- Cyan. ['@field'] = { fg = c.cyan.base }, ['@property'] = { fg = c.cyan.base }, diff --git a/lua/nordic/groups/native/syntax.lua b/lua/nordic/groups/native/syntax.lua index 089e5159..d70fbe40 100644 --- a/lua/nordic/groups/native/syntax.lua +++ b/lua/nordic/groups/native/syntax.lua @@ -25,7 +25,7 @@ return { Conditional = { fg = c.orange.base, bold = o.bold_keywords }, -- if, then, else, endif, switch, etc. Repeat = { fg = c.orange.base, bold = o.bold_keywords }, -- for, do, while, etc. Label = { fg = c.orange.base, bold = o.bold_keywords }, -- case, default, etc. - Operator = { fg = c.orange.bright, bold = o.bold_keywords }, -- "sizeof", "+", "*", etc. + Operator = { fg = c.orange.bright, bold = true }, -- "sizeof", "+", "*", etc. Keyword = { fg = c.orange.base, bold = o.bold_keywords }, -- any other keyword Exception = { fg = c.red.base, bold = o.bold_keywords }, -- try, catch, throw