From e54077be62ae3e9e69078df0bfdc28374b195d7f Mon Sep 17 00:00:00 2001 From: 434b <17012133+0xricksanchez@users.noreply.github.com> Date: Sun, 7 May 2023 15:30:56 +0200 Subject: [PATCH] feat(colorscheme): add nord (#186) * 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 --- .../colorscheme/nord-nvim/README.md | 53 +++++++++++++++++++ .../colorscheme/nord-nvim/nord.lua | 11 ++++ 2 files changed, 64 insertions(+) create mode 100644 lua/astrocommunity/colorscheme/nord-nvim/README.md create mode 100644 lua/astrocommunity/colorscheme/nord-nvim/nord.lua diff --git a/lua/astrocommunity/colorscheme/nord-nvim/README.md b/lua/astrocommunity/colorscheme/nord-nvim/README.md new file mode 100644 index 000000000..67cf3d464 --- /dev/null +++ b/lua/astrocommunity/colorscheme/nord-nvim/README.md @@ -0,0 +1,53 @@ +# nord.nvim + +**Repository:** + +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, +} +``` diff --git a/lua/astrocommunity/colorscheme/nord-nvim/nord.lua b/lua/astrocommunity/colorscheme/nord-nvim/nord.lua new file mode 100644 index 000000000..cb6675091 --- /dev/null +++ b/lua/astrocommunity/colorscheme/nord-nvim/nord.lua @@ -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, +}