Giter Site home page Giter Site logo

Unclarity about stlyes about nord.nvim HOT 7 CLOSED

gbprod avatar gbprod commented on August 23, 2024
Unclarity about stlyes

from nord.nvim.

Comments (7)

defr0std avatar defr0std commented on August 23, 2024 1

Sorry, missed the previous comment. Yes, on_highlights is great!

from nord.nvim.

gbprod avatar gbprod commented on August 23, 2024

Hi!
Thanks for your feedback!
I'm ok with you that overrides may be more obvious. As I started with style (I've been inspired by tokyonight theme), I think I will this like that...

Like tokyonight, I can work on something like the on_highlights event to allows overriding highlight group inside the setup method, would that suit you?

from nord.nvim.

defr0std avatar defr0std commented on August 23, 2024

Thanks, yes, on_highlights would be great. Essentially, I am doing the same now. My setup looks like this:

require("nord").setup({
  -- ...
})

local c = require("nord.colors")
vim.api.nvim_set_hl(0, "TelescopeBorder", {fg = c.polar_night.light, bg = c.none})
-- and so on

Then I will be able to move all custom highlighting code into the on_highlight function.

from nord.nvim.

gbprod avatar gbprod commented on August 23, 2024

Hey, it's already implemented ;)
Just update :p

I'm waiting for your feedback to close this issue.

from nord.nvim.

gbprod avatar gbprod commented on August 23, 2024

And I'm interested by your changes, maybe they should be bundled in the theme ?
Can you provide you setup ?

Thanks!

from nord.nvim.

defr0std avatar defr0std commented on August 23, 2024

This is just personal subjective aesthetics, there is no right or wrong here :)
My full nord setup is below, but as you can see I have a hard time tracking which are the overrides for your theme, and which are my own rules :)

Overall, I tend to have a minimalistic UI on the transparent background - so fewer bg's and more fg's, for example for diff mode, borders, splits, etc.

One custom color that I use in addition to the nord palette is #7b88a1 for comments. The standard nord dark colors are getting lost on the transparent background, so I need something brighter.

local c = require("nord.colors")
-- Nord comments are too dark on transparent background
local comment_color = "#7b88a1"

require("nord").setup({
  transparent = true, -- Enable this to disable setting the background color
  terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
  diff = { mode = "bg" }, -- enables/disables colorful backgrounds when used in diff mode. values : [bg|fg]
  borders = false, -- Enable the border between verticaly split windows visible
  errors = { mode = "none" }, -- Display mode for errors and diagnostics
  styles = {
    comments = { fg = comment_color, italic = false },
    keywords = {},
    functions = {},
    variables = {},
  },
})

-- Colorscheme + custom overrides.
vim.cmd [[colorscheme nord]]

local function h(name, def)
  vim.api.nvim_set_hl(0, name, def)
end

-- Standard UI
h("CursorLine", {bg = c.polar_night.bright})
h("Whitespace", {fg = c.polar_night.brightest})
h("SignColumn", {bg = c.none})
h("VertSplit", {bg = c.none})
h("WinSeparator", {fg = c.none, bg = c.none})
h("IncSearch", {fg = c.polar_night.origin, bg = c.frost.ice})
h("CurSearch", {fg = c.polar_night.origin, bg = c.aurora.yellow})
h("DiffAdd", {fg = c.aurora.green, bg = c.none})
h("DiffChange", {fg = c.aurora.orange, bg = c.none})
h("DiffDelete", {fg = c.aurora.red, bg = c.none})
-- Plugins
h("LeapLabelPrimary", {link = "IncSearch"})
h("LspSignatureActiveParameter", {underline = true})
h("FloatTitle", {fg = c.aurora.yellow})
h("TelescopeBorder", {fg = c.polar_night.light, bg = c.none})
h("markdownError", {bg = c.none})
-- Treesitter generic
h("@constant", {fg = c.aurora.purple})
h("@comment.italic", {fg = comment_color, italic = true})
h("@punctuation.bracket", {fg = c.frost.artic_water})
h("@parameter", {fg = c.snow_storm.origin, italic = true})
h("@namespace", {fg = c.frost.artic_water})
h("@variable.builtin", {fg = c.frost.artic_water})
h("@function.builtin", {fg = c.frost.artic_water})
h("@function.log", {link = "@comment.italic"})
h("@error", {underline = false}) -- Until cpp parse error are not fixed
-- Treesitter cpp
h("@cppNamespaceDefinition", {link = "Identifier"})
h("@cppNamespaceDefinitionName", {link = "Identifier"})
h("@cppQualifiedIdentifier", {link = "@type"})
h("@cppExtraKeywords", {fg = c.frost.artic_water})
-- Treesitter google
h("@gmacrosSubtle", {link = "@comment.italic"})
h("@log.level", {link = "@comment.italic"})
h("@log.info", {fg = c.frost.ice})
h("@log.warn", {fg = c.aurora.yellow})
h("@log.error", {fg = c.aurora.red})
h("@log.fatal", {fg = c.aurora.purple})
h("@sdlStatement", {link = "@keyword"})
-- Treesitter css
h("@cssClass", {link = "@type"})

from nord.nvim.

gbprod avatar gbprod commented on August 23, 2024

Thanks !

I've you tried on_highlights setting ?

from nord.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.