Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup, theme maturing and fixes #34

Merged
merged 5 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 5 additions & 6 deletions lua/nordic/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ local palette = {
blue0 = '#5E81AC',
blue1 = '#81A1C1',
blue2 = '#88C0D0',
blue = {
bright = '#8CAFD2',
dim = '#668AAB',
},
cyan = {
base = '#8FBCBB',
bright = '#93CCDC',
Expand Down Expand Up @@ -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 :)
Expand Down
18 changes: 4 additions & 14 deletions lua/nordic/groups/integrations/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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 `<` `>` `/`
Expand All @@ -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 },
Expand All @@ -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 },
Expand All @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion lua/nordic/groups/native/syntax.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down