Skip to content

Commit

Permalink
feat(colorscheme): add nord (#186)
Browse files Browse the repository at this point in the history
* feat(colorscheme): add nord

* fix: linting

* fix(nord-nvim): requested README changes

* fix(nord-nvim): formatting

* fix:(nord-nvim): use correct repo name...

* fix(nord-nvim): correct scoping of opts vars

* fix(nord-nvim): remove unnecessary setting, this is handled by the colorscheme being set

---------

Co-authored-by: Micah Halter <[email protected]>
  • Loading branch information
0xricksanchez and mehalter authored May 7, 2023
1 parent 43099dd commit e54077b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
53 changes: 53 additions & 0 deletions lua/astrocommunity/colorscheme/nord-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# nord.nvim

**Repository:** <https://github.com/shaunsingh/nord.nvim>

Neovim theme based off of the Nord Color Palette, written in lua with treesitter support

## Customization

To support [headlines](https://github.com/lukas-reineke/headlines.nvim), you should add this code to your config:

```lua
local utils = require("astronvim.utils")
{
"lukas-reineke/headlines.nvim",
opts = function(_, opts)
if not opts.markdown then opts.markdown = {} end
opts.markdown.headline_highlights = utils.list_insert_unique(opts.markdown.headline_highlights, {
"Headline1",
"Headline2",
"Headline3",
"Headline4",
"Headline5",
"Headline6",
})
opts.markdown.codeblock_highlight = utils.list_insert_unique(opts.markdown.codeblock_highlight, "CodeBlock")
opts.markdown.dash_highlight = utils.list_insert_unique(opts.markdown.dash_highlight, "Dash")
opts.markdown.quote_highlight = utils.list_insert_unique(opts.markdown.quote_highlight, "Quote")
end,
},

```

To support [BufferLine](https://github.com/akinsho/nvim-bufferline.lua), you can add this code to your config:

```lua
local utils = require("astronvim.utils")
{
"akinsho/bufferline.nvim",
opts = function(_, opts)
if not opts.options then opts.options = {} end
opts.options = utils.list_insert_unique(opts.options, {
separator_style = "thin",
})

local highlights = require("nord").bufferline.highlights({
italic = true,
bold = true,
})

opts.highlights = utils.list_insert_unique(opts.highlights, highlights)
end,
}
```
11 changes: 11 additions & 0 deletions lua/astrocommunity/colorscheme/nord-nvim/nord.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
return {
"shaunsingh/nord.nvim",
init = function()
vim.g.nord_contrast = true
vim.g.nord_borders = false
vim.g.nord_disable_background = false
vim.g.nord_italic = false
vim.g.nord_uniform_diff_background = true
vim.g.nord_bold = false
end,
}

0 comments on commit e54077b

Please sign in to comment.