Skip to content

Commit

Permalink
feat(nord-nvim): add interoperability with headlines and bufferline
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed May 26, 2023
1 parent 8655f09 commit 048bda4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 54 deletions.
45 changes: 0 additions & 45 deletions lua/astrocommunity/colorscheme/nord-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,3 @@
**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 = "CodeBlock"
opts.markdown.dash_highlight = "Dash"
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
{
"akinsho/bufferline.nvim",
opts = function(_, opts)
if not opts.options then opts.options = {} end
opts.options.seperator_style = "thin"

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

opts.highlights = highlights
end,
}
```
46 changes: 37 additions & 9 deletions lua/astrocommunity/colorscheme/nord-nvim/nord.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
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,
{
"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,
},
{
"lukas-reineke/headlines.nvim",
optional = true,
opts = {
markdown = {
headline_highlights = {
"Headline1",
"Headline2",
"Headline3",
"Headline4",
"Headline5",
"Headline6",
},
},
},
},
{
"akinsho/bufferline.nvim",
optional = true,
opts = function(_, opts)
return require("astronvim.utils").extend_tbl(opts, {
highlights = require("nord").bufferline.highlights { italic = true, bold = true },
options = { separator_style = "thin" },
})
end,
},
}

0 comments on commit 048bda4

Please sign in to comment.