Skip to content

Commit

Permalink
Readme and treesitter settings updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoelter committed Aug 31, 2023
1 parent 1e1fd63 commit 6daa58a
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 20 deletions.
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,47 @@ It requires neovim 8 and 'termguicolors' to be enabled for it to function as exp
The goals of this are (all still in progress):
- A port faithful to the original highlight groups.
- A clean slate in lua dropping support for legacy vim settings.
- Full treesitter neovim highlight support.
- Greater configurability through highlight group overrides.
- Increased configurability through highlight group overrides.
- Neovim and treesitter neovim highlight support.

Currently, this plugin should load and give basic nord highlights. I'm in the process of setting
all treesitter highlight groups and deciding what language and plugin highlights from the original to
port over to this project. There will be rough edges that will be smoothed out as I begin to use this theme on a daily basis.
Currently, this theme should just about match most basic nord highlight behavior. Specific neovim and treesitter highlights
are still in progress. If the defaults are sensible, they'll be kept. Not all plugin specific highlights have been ported,
so if you rely on a specific plugins highlights that will likely be missing right now. Through the config any of those specific
highlight groups could be added.

## Configuration

Default config settings and options for this theme currently are:
```
-- Setup must be called before loading the colorscheme only if changes from the defaults are desired.
require("nord").setup({
undercurl = true,
underline = true,
bold = true,
italic = {
on = true,
comments = true,
operators = false,
strings = false,
},
palette_overrides = {},
overrides = {},
})
vim.cmd("colorscheme nord")
```

Example for overriding highlight groups
```
-- Default options:
require("nord").setup({
overrides = {
SignColumn = { bg = "#B48EAD" }
}
})
vim.cmd("colorscheme nord")
```

Inspirations for this port:
- [Gruvbox.nvim](https://github.com/ellisonleao/gruvbox.nvim) for the plugin architecture.
Expand Down
28 changes: 13 additions & 15 deletions lua/nord/groups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,21 @@ M.setup = function()
LspSignatureActiveParameter = { fg = colors.ice_blue_8, underline = config.underline },

-- Treesitter
-- These are the nord settings that differ from the defaults specified in the neovim docs or aren't clearly mentioned
['@constant.builtin'] = { link = "Constant" }, -- Default is "Special", nord currently deviates from that
['@constant.constructor'] = { link = "Function" }, -- Default is "Special"
['@constant.constructor'] = { link = "Function" }, -- Default is "Special"

-- hi! link TSAnnotation Annotation
-- hi! link TSConstBuiltin Constant
-- hi! link TSConstructor Function
-- hi! link TSEmphasis Italic
-- hi! link TSFuncBuiltin Function
-- hi! link TSFuncMacro Function
-- hi! link TSStringRegex SpecialChar
-- hi! link TSStrong Bold
-- hi! link TSStructure Structure
-- hi! link TSTagDelimiter TSTag
-- hi! link TSUnderline Underline
-- hi! link TSVariable Variable
-- hi! link TSVariableBuiltin Keyword
['@constructor'] = { link = "Function" }, -- Default is "Special"
['@text.emphasis'] = { link = "Italic" }, -- Unknown default
['@function.builtin'] = { link = "Function" }, -- Default is "Special"
['@function.macro'] = { link = "Function" }, -- Default is "Macro"
['@string.regex'] = { link = "Italic" }, -- Unknown default
['@text.bold'] = { link = "Bold" }, -- Unknown default
['@variable.builtin'] = { link = "Keyword" }, -- Unknown default
-- modified
['@tag.delimiter'] = { link = "Delimiter" },
-- Unknown equivalents
-- hi! link TSAnnotation Annotation
-- hi! link TSStructure Structure

-- Language specic groups
asciidocAttributeEntry = { link = "NordFgOceanBlue10" },
Expand Down

0 comments on commit 6daa58a

Please sign in to comment.