Coder Social home page Coder Social logo

nvchad-base46's Introduction

NvChad theme plugin

  • This plugin's a whole re-write of Norcalli's plugin.
  • This theme plugin is supposed to be used along with NvChad only

Highlight command

  • :hi command will list all highlight groups
  • :hi with args will highlight a highlight group
  • Example : hi Comment guifg=#ffffff gui=italic, bold

Neovim Lua api for setting highlights

  • Check :h nvim_set_hl for detailed doc
vim.api.nvim_set_hl(0, "Comment", {
  fg = "#ffffff",
  italic = true,
  bold = true,
})

Understanding theme variables

There are 2 main tables used for base46

Note: the below values are mostly approx values so its not compulsory that you have to use those exact numbers, test your theme i.e show it in the PR to get feedback from @siduck

Default Theme table

-- this line for types, by hovering and autocompletion (lsp required)
-- will help you understanding properties, fields, and what highlightings the color used for
---@type Base46Table
local M = {}
-- UI
M.base_30 = {
  white = "",
  black = "", -- usually your theme bg
  darker_black = "", -- 6% darker than black
  black2 = "", -- 6% lighter than black
  one_bg = "", -- 10% lighter than black
  one_bg2 = "", -- 6% lighter than one_bg2
  one_bg3 = "", -- 6% lighter than one_bg3
  grey = "", -- 40% lighter than black (the % here depends so choose the perfect grey!)
  grey_fg = "", -- 10% lighter than grey
  grey_fg2 = "", -- 5% lighter than grey
  light_grey = "",
  red = "",
  baby_pink = "",
  pink = "",
  line = "", -- 15% lighter than black
  green = "",
  vibrant_green = "",
  nord_blue = "",
  blue = "",
  seablue = "",
  yellow = "", -- 8% lighter than yellow
  sun = "",
  purple = "",
  dark_purple = "",
  teal = "",
  orange = "",
  cyan = "",
  statusline_bg = "",
  lightbg = "",
  pmenu_bg = "",
  folder_bg = ""
}

-- check https://github.com/chriskempson/base16/blob/master/styling.md for more info
M.base_16 = {
  base00 = "",
  base01 = "",
  base02 = "",
  base03 = "",
  base04 = "",
  base05 = "",
  base06 = "",
  base07 = "",
  base08 = "",
  base09 = "",
  base0A = "",
  base0B = "",
  base0C = "",
  base0D = "",
  base0E = "",
  base0F = ""
}

-- OPTIONAL
-- overriding highlights for this specific theme only 
M.polish_hl = {
  Comment = {
    bg = "#ffffff" -- or M.base_30.cyan 
    italic =  true
  }
}

-- set the theme type whether is dark or light
M.type = "dark" -- "or light"

-- this will be later used for users to override your theme table from chadrc
M = require("base46").override_theme(M, "abc")

return M

Contribute

Testing your theme

  • Just place your theme file in custom/themes folder
  • And select the theme with theme switcher or change in chadrc

Tips

  • Capture what highlight are used under the cursor by running the :Inspect or :InspectTree commands

nvchad-base46's People

Contributors

siduck avatar dereklee0312 avatar ritchielrez avatar mangeshrex avatar phanlong2811 avatar lucario387 avatar nrbjerg avatar akianonymus avatar brunokrugel avatar leonheidelbach avatar sparkenstein avatar sefidel avatar manas140 avatar max397574 avatar rockorager avatar frenzyexists avatar felixkratz avatar dylanarmstrong avatar zbirenbaum avatar switch1220 avatar deathemonic avatar yetone avatar siddrs avatar dharmx avatar bryant-the-coder avatar kayuxx avatar pocco81 avatar brutusmcforce avatar lamduong33 avatar dazai-osamu-san avatar

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.