feat!: nvim-treesitter changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
local generator = require "zenbones.specs"
|
||||
local bg = vim.opt.background:get()
|
||||
local bg = vim.o.background
|
||||
local p = require("zenbones.palette")[bg]
|
||||
|
||||
return generator.generate(p, bg, generator.get_global_config("zenbones", bg))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
local function make_specs(specs_name, ness)
|
||||
local background = vim.opt.background:get()
|
||||
local background = vim.o.background
|
||||
package.loaded[specs_name] = nil
|
||||
if ness == nil then
|
||||
return require(specs_name)
|
||||
@@ -26,7 +26,7 @@ local function make_env(colorscheme)
|
||||
transform = require "zenbones.shipwright.transform",
|
||||
}
|
||||
|
||||
vim.opt.background = colorscheme.background
|
||||
vim.o.background = colorscheme.background
|
||||
env.specs = make_specs(specs_name)
|
||||
local ness = colorscheme.background == "light" and { "dim", "bright" } or { "stark", "warm" }
|
||||
env["specs_" .. ness[1]] = make_specs(specs_name, ness[1])
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
local function to_vim_autoload(colorscheme)
|
||||
local vimcolors, term = unpack(colorscheme)
|
||||
local termcolors = ""
|
||||
for i, v in ipairs(term) do
|
||||
termcolors = termcolors .. string.format("let g:terminal_color_%s = '%s'\n", (i - 1), v)
|
||||
end
|
||||
|
||||
termcolors = {
|
||||
local termcolors = {
|
||||
string.format("let g:terminal_color_0 = '%s'", term.black),
|
||||
string.format("let g:terminal_color_1 = '%s'", term.red),
|
||||
string.format("let g:terminal_color_2 = '%s'", term.green),
|
||||
@@ -43,8 +39,15 @@ run(
|
||||
specs,
|
||||
lushwright.to_vimscript,
|
||||
lushwright.vim_compatible_vimscript,
|
||||
function(vimcolors)
|
||||
return { vimcolors, term }
|
||||
function(colors)
|
||||
-- filter out treesitter
|
||||
local vimcolors = vim.tbl_filter(function(color)
|
||||
return not string.match(color, "@")
|
||||
end, colors)
|
||||
return {
|
||||
vimcolors,
|
||||
term,
|
||||
}
|
||||
end,
|
||||
to_vim_autoload,
|
||||
{ prepend, [[" This codeblock is auto-generated by shipwright.nvim]] },
|
||||
@@ -62,7 +65,7 @@ run(
|
||||
local function remove_italics(specs)
|
||||
local italic_specs = {}
|
||||
for key, hl in pairs(specs) do
|
||||
if hl.gui == "italic" and key ~= "Italic" then
|
||||
if hl.gui == "italic" and key ~= "Italic" and not string.match(key, "@") then
|
||||
table.insert(italic_specs, string.format("highlight %s gui=NONE cterm=NONE", key))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -23,20 +23,11 @@ local function generate(p, opt)
|
||||
---@diagnostic disable: undefined-global
|
||||
-- selene: allow(undefined_variable)
|
||||
-- stylua: ignore start
|
||||
local base = lush(function()
|
||||
local base = lush(function(injected_functions)
|
||||
-- functions are injected via a table for future expansion
|
||||
-- you probably want to alias it locally
|
||||
local sym = injected_functions.sym
|
||||
return {
|
||||
-- The following are all the Neovim default highlight groups from the docs
|
||||
-- as of 0.5.0-nightly-446, to aid your theme creation. Your themes should
|
||||
-- probably style all of these at a bare minimum.
|
||||
--
|
||||
-- Referenced/linked groups must come before being referenced/lined,
|
||||
-- so the order shown ((mostly) alphabetical) is likely
|
||||
-- not the order you will end up with.
|
||||
--
|
||||
-- You can uncomment these and leave them empty to disable any
|
||||
-- styling for that group (meaning they mostly get styled as Normal)
|
||||
-- or leave them commented to apply vims default colouring or linking.
|
||||
|
||||
Normal { bg = not opt.transparent_background and p1.bg or "NONE", fg = p.fg }, -- normal text
|
||||
|
||||
Underlined { gui = "underline" }, -- (preferred) text that stands out, HTML links
|
||||
@@ -193,77 +184,86 @@ local function generate(p, opt)
|
||||
DiagnosticUnderlineInfo { fg = opt.colorize_diagnostic_underline_text and DiagnosticInfo.fg or "NONE", gui = "undercurl", sp = DiagnosticInfo.fg },
|
||||
DiagnosticUnderlineHint { fg = opt.colorize_diagnostic_underline_text and DiagnosticHint.fg or "NONE", gui = "undercurl", sp = DiagnosticHint.fg },
|
||||
|
||||
-- These groups are for the neovim tree-sitter highlights.
|
||||
-- As of writing, tree-sitter support is a WIP, group names may change.
|
||||
-- By default, most of these groups link to an appropriate Vim group,
|
||||
-- TSError -> Error for example, so you do not have to define these unless
|
||||
-- you explicitly want to support Treesitter's improved syntax awareness.
|
||||
-- Tree-sitter
|
||||
sym "@annotation" { PreProc },
|
||||
sym "@attribute" { PreProc },
|
||||
sym "@boolean" { Number },
|
||||
sym "@character" { Constant },
|
||||
sym "@character.special" { Special },
|
||||
sym "@comment" { Comment },
|
||||
sym "@conditional" { Statement },
|
||||
sym "@constant" { Identifier, gui = "bold" },
|
||||
sym "@constant.builtin" { Number },
|
||||
sym "@constant.macro" { Number },
|
||||
sym "@constructor" { Special },
|
||||
sym "@debug" { Special },
|
||||
sym "@define" { PreProc },
|
||||
sym "@exception" { Statement },
|
||||
sym "@field" { Identifier },
|
||||
sym "@float" { Number },
|
||||
sym "@function" { Function },
|
||||
sym "@function.builtin" { Special },
|
||||
sym "@function.call" { Function },
|
||||
sym "@function.macro" { PreProc },
|
||||
sym "@include" { PreProc },
|
||||
sym "@keyword" { Statement },
|
||||
sym "@keyword.function" { Statement },
|
||||
sym "@keyword.operator" { Statement },
|
||||
sym "@keyword.return" { Statement },
|
||||
sym "@label" { Statement },
|
||||
sym "@method" { Function },
|
||||
sym "@method.call" { Function },
|
||||
sym "@namespace" { Special },
|
||||
sym "@none" { },
|
||||
sym "@number" { Number },
|
||||
sym "@operator" { Statement },
|
||||
sym "@parameter" { Identifier },
|
||||
sym "@parameter.reference" { sym "@parameter" },
|
||||
sym "@preproc" { PreProc },
|
||||
sym "@property" { Identifier },
|
||||
sym "@punctuation.bracket" { Delimiter },
|
||||
sym "@punctuation.delimiter" { Delimiter },
|
||||
sym "@punctuation.special" { Delimiter },
|
||||
sym "@repeat" { Statement },
|
||||
sym "@storageclass" { Type },
|
||||
sym "@string" { Constant },
|
||||
sym "@string.escape" { Special },
|
||||
sym "@string.regex" { Constant },
|
||||
sym "@string.special" { Special },
|
||||
sym "@symbol" { Identifier },
|
||||
sym "@tag" { Special },
|
||||
sym "@tag.attribute" { sym "@property" },
|
||||
sym "@tag.delimiter" { Delimiter },
|
||||
sym "@text" { sym "@none" },
|
||||
sym "@text.danger" { Error },
|
||||
sym "@text.emphasis" { Italic },
|
||||
sym "@text.environment" { PreProc },
|
||||
sym "@text.environment.name" { Type },
|
||||
sym "@text.literal" { Constant },
|
||||
sym "@text.math" { Special },
|
||||
sym "@text.note" { DiagnosticInfo },
|
||||
sym "@text.reference" { Constant },
|
||||
sym "@text.strike" { gui = "strikethrough" },
|
||||
sym "@text.strong" { Bold },
|
||||
sym "@text.title" { Title },
|
||||
sym "@text.underline" { Underlined },
|
||||
sym "@text.uri" { Underlined },
|
||||
sym "@text.warning" { WarningMsg },
|
||||
sym "@todo" { Todo },
|
||||
sym "@type" { Type },
|
||||
sym "@type.builtin" { Type },
|
||||
sym "@type.definition" { Type },
|
||||
sym "@type.qualifier" { Type },
|
||||
sym "@variable" { Identifier },
|
||||
sym "@variable.builtin" { Number },
|
||||
|
||||
-- TSAnnotation { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
|
||||
-- TSAttribute { }; -- (unstable) TODO: docs
|
||||
-- TSBoolean { }; -- For booleans.
|
||||
-- TSCharacter { }; -- For characters.
|
||||
-- TSComment { }; -- For comment blocks.
|
||||
-- TSConstructor { }; -- For constructor calls and definitions: ` { }` in Lua, and Java constructors.
|
||||
-- TSConditional { }; -- For keywords related to conditionnals.
|
||||
TSConstant { Identifier, gui = "bold" }; -- For constants
|
||||
TSConstBuiltin { Number }; -- For constant that are built in the language: `nil` in Lua.
|
||||
TSConstMacro { Number }; -- For constants that are defined by macros: `NULL` in C.
|
||||
-- TSError { }; -- For syntax/parser errors.
|
||||
-- TSException { }; -- For exception related keywords.
|
||||
-- TSField { }; -- For fields.
|
||||
-- TSFloat { }; -- For floats.
|
||||
-- TSFunction { }; -- For function (calls and definitions).
|
||||
-- TSFuncBuiltin { }; -- For builtin functions: `print` in Lua.
|
||||
-- TSFuncMacro { }; -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
|
||||
-- TSInclude { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
|
||||
-- TSKeyword { }; -- For keywords that don't fall in previous categories.
|
||||
-- TSKeywordFunction { }; -- For keywords used to define a fuction.
|
||||
-- TSLabel { }; -- For labels: `label:` in C and `:label:` in Lua.
|
||||
-- TSMethod { }; -- For method calls and definitions.
|
||||
TSNamespace { Special }; -- For identifiers referring to modules and namespaces.
|
||||
-- TSNone { }; -- TODO: docs
|
||||
-- TSNumber { }; -- For all numbers
|
||||
-- TSOperator { }; -- For any operator: `+`, but also `->` and `*` in C.
|
||||
-- TSParameter { }; -- For parameters of a function.
|
||||
-- TSParameterReference { }; -- For references to parameters of a function.
|
||||
-- TSProperty { }; -- Same as `TSField`.
|
||||
-- TSPunctDelimiter { }; -- For delimiters ie: `.`
|
||||
-- TSPunctBracket { }; -- For brackets and parens.
|
||||
-- TSPunctSpecial { }; -- For special punctutation that does not fall in the catagories before.
|
||||
-- TSRepeat { }; -- For keywords related to loops.
|
||||
-- TSString { }; -- For strings.
|
||||
-- TSStringRegex { }; -- For regexes.
|
||||
-- TSStringEscape { }; -- For escape characters within a string.
|
||||
-- TSSymbol { }; -- For identifiers referring to symbols or atoms.
|
||||
-- TSType { }; -- For types.
|
||||
-- TSTypeBuiltin { }; -- For builtin types.
|
||||
TSVariable { Identifier }, -- Any variable name that does not have another highlight.
|
||||
TSVariableBuiltin { Number }; -- Variable names that are defined by the languages, like `this` or `self`.
|
||||
|
||||
TSTag { Special }, -- Tags like html tag names.
|
||||
-- TSTagDelimiter { }; -- Tag delimiter like `<` `>` `/`
|
||||
-- TSText { }; -- For strings considered text in a markup language.
|
||||
TSEmphasis { Italic }, -- For text to be represented with emphasis.
|
||||
TSUnderline { Underlined }, -- For text to be represented with an underline.
|
||||
TSStrong { Bold }, -- Text to be represented in bold.
|
||||
-- TSStrike { }; -- For strikethrough text.
|
||||
-- TSTitle { }; -- Text that is part of a title.
|
||||
-- TSLiteral { }; -- Literal text.
|
||||
-- TSURI { }; -- Any URI like a link or email.
|
||||
|
||||
TSNote { DiagnosticInfo },
|
||||
TSWarning { WarningMsg },
|
||||
TSDanger { Error },
|
||||
|
||||
-- TS: Markdown
|
||||
markdownTSPunctSpecial { Special },
|
||||
markdownTSStringEscape { SpecialKey },
|
||||
markdownTSTextReference { Identifier, gui = "underline" },
|
||||
markdownTSEmphasis { Italic },
|
||||
markdownTSTitle { Statement },
|
||||
markdownTSLiteral { Type },
|
||||
markdownTSURI { SpecialComment },
|
||||
sym "@punctuation.special.markdown" { Special },
|
||||
sym "@string.escape.markdown" { SpecialKey },
|
||||
sym "@text.reference.markdown" { Identifier, gui = "underline" },
|
||||
sym "@text.emphasis.markdown" { Italic },
|
||||
sym "@text.title.markdown" { Statement },
|
||||
sym "@text.literal.markdown" { Type },
|
||||
sym "@text.uri.markdown" { SpecialComment },
|
||||
|
||||
-- Syntax
|
||||
diffAdded { fg = p.leaf },
|
||||
@@ -277,9 +277,9 @@ local function generate(p, opt)
|
||||
|
||||
gitcommitOverflow { WarningMsg },
|
||||
|
||||
markdownUrl { markdownTSURI },
|
||||
markdownCode { markdownTSLiteral },
|
||||
markdownLinkText { markdownTSTextReference },
|
||||
markdownUrl { SpecialComment },
|
||||
markdownCode { Type },
|
||||
markdownLinkText { Identifier, gui = "underline" },
|
||||
markdownLinkTextDelimiter { Delimiter },
|
||||
|
||||
helpHyperTextEntry { Special },
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local lush = require "lush"
|
||||
|
||||
|
||||
local function generate(p, opt)
|
||||
local p1 = {
|
||||
bg = p.bg,
|
||||
@@ -24,20 +23,11 @@ local function generate(p, opt)
|
||||
---@diagnostic disable: undefined-global
|
||||
-- selene: allow(undefined_variable)
|
||||
-- stylua: ignore start
|
||||
local base = lush(function()
|
||||
local base = lush(function(injected_functions)
|
||||
-- functions are injected via a table for future expansion
|
||||
-- you probably want to alias it locally
|
||||
local sym = injected_functions.sym
|
||||
return {
|
||||
-- The following are all the Neovim default highlight groups from the docs
|
||||
-- as of 0.5.0-nightly-446, to aid your theme creation. Your themes should
|
||||
-- probably style all of these at a bare minimum.
|
||||
--
|
||||
-- Referenced/linked groups must come before being referenced/lined,
|
||||
-- so the order shown ((mostly) alphabetical) is likely
|
||||
-- not the order you will end up with.
|
||||
--
|
||||
-- You can uncomment these and leave them empty to disable any
|
||||
-- styling for that group (meaning they mostly get styled as Normal)
|
||||
-- or leave them commented to apply vims default colouring or linking.
|
||||
|
||||
Normal { bg = not opt.transparent_background and p1.bg or "NONE", fg = p.fg }, -- normal text
|
||||
|
||||
Underlined { gui = "underline" }, -- (preferred) text that stands out, HTML links
|
||||
@@ -194,77 +184,86 @@ local function generate(p, opt)
|
||||
DiagnosticUnderlineInfo { fg = opt.colorize_diagnostic_underline_text and DiagnosticInfo.fg or "NONE", gui = "undercurl", sp = DiagnosticInfo.fg },
|
||||
DiagnosticUnderlineHint { fg = opt.colorize_diagnostic_underline_text and DiagnosticHint.fg or "NONE", gui = "undercurl", sp = DiagnosticHint.fg },
|
||||
|
||||
-- These groups are for the neovim tree-sitter highlights.
|
||||
-- As of writing, tree-sitter support is a WIP, group names may change.
|
||||
-- By default, most of these groups link to an appropriate Vim group,
|
||||
-- TSError -> Error for example, so you do not have to define these unless
|
||||
-- you explicitly want to support Treesitter's improved syntax awareness.
|
||||
-- Tree-sitter
|
||||
sym "@annotation" { PreProc },
|
||||
sym "@attribute" { PreProc },
|
||||
sym "@boolean" { Number },
|
||||
sym "@character" { Constant },
|
||||
sym "@character.special" { Special },
|
||||
sym "@comment" { Comment },
|
||||
sym "@conditional" { Statement },
|
||||
sym "@constant" { Identifier, gui = "bold" },
|
||||
sym "@constant.builtin" { Number },
|
||||
sym "@constant.macro" { Number },
|
||||
sym "@constructor" { Special },
|
||||
sym "@debug" { Special },
|
||||
sym "@define" { PreProc },
|
||||
sym "@exception" { Statement },
|
||||
sym "@field" { Identifier },
|
||||
sym "@float" { Number },
|
||||
sym "@function" { Function },
|
||||
sym "@function.builtin" { Special },
|
||||
sym "@function.call" { Function },
|
||||
sym "@function.macro" { PreProc },
|
||||
sym "@include" { PreProc },
|
||||
sym "@keyword" { Statement },
|
||||
sym "@keyword.function" { Statement },
|
||||
sym "@keyword.operator" { Statement },
|
||||
sym "@keyword.return" { Statement },
|
||||
sym "@label" { Statement },
|
||||
sym "@method" { Function },
|
||||
sym "@method.call" { Function },
|
||||
sym "@namespace" { Special },
|
||||
sym "@none" { },
|
||||
sym "@number" { Number },
|
||||
sym "@operator" { Statement },
|
||||
sym "@parameter" { Identifier },
|
||||
sym "@parameter.reference" { sym "@parameter" },
|
||||
sym "@preproc" { PreProc },
|
||||
sym "@property" { Identifier },
|
||||
sym "@punctuation.bracket" { Delimiter },
|
||||
sym "@punctuation.delimiter" { Delimiter },
|
||||
sym "@punctuation.special" { Delimiter },
|
||||
sym "@repeat" { Statement },
|
||||
sym "@storageclass" { Type },
|
||||
sym "@string" { Constant },
|
||||
sym "@string.escape" { Special },
|
||||
sym "@string.regex" { Constant },
|
||||
sym "@string.special" { Special },
|
||||
sym "@symbol" { Identifier },
|
||||
sym "@tag" { Special },
|
||||
sym "@tag.attribute" { sym "@property" },
|
||||
sym "@tag.delimiter" { Delimiter },
|
||||
sym "@text" { sym "@none" },
|
||||
sym "@text.danger" { Error },
|
||||
sym "@text.emphasis" { Italic },
|
||||
sym "@text.environment" { PreProc },
|
||||
sym "@text.environment.name" { Type },
|
||||
sym "@text.literal" { Constant },
|
||||
sym "@text.math" { Special },
|
||||
sym "@text.note" { DiagnosticInfo },
|
||||
sym "@text.reference" { Constant },
|
||||
sym "@text.strike" { gui = "strikethrough" },
|
||||
sym "@text.strong" { Bold },
|
||||
sym "@text.title" { Title },
|
||||
sym "@text.underline" { Underlined },
|
||||
sym "@text.uri" { Underlined },
|
||||
sym "@text.warning" { WarningMsg },
|
||||
sym "@todo" { Todo },
|
||||
sym "@type" { Type },
|
||||
sym "@type.builtin" { Type },
|
||||
sym "@type.definition" { Type },
|
||||
sym "@type.qualifier" { Type },
|
||||
sym "@variable" { Identifier },
|
||||
sym "@variable.builtin" { Number },
|
||||
|
||||
-- TSAnnotation { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
|
||||
-- TSAttribute { }; -- (unstable) TODO: docs
|
||||
-- TSBoolean { }; -- For booleans.
|
||||
-- TSCharacter { }; -- For characters.
|
||||
-- TSComment { }; -- For comment blocks.
|
||||
-- TSConstructor { }; -- For constructor calls and definitions: ` { }` in Lua, and Java constructors.
|
||||
-- TSConditional { }; -- For keywords related to conditionnals.
|
||||
TSConstant { Identifier, gui = "bold" }; -- For constants
|
||||
TSConstBuiltin { Number }; -- For constant that are built in the language: `nil` in Lua.
|
||||
TSConstMacro { Number }; -- For constants that are defined by macros: `NULL` in C.
|
||||
-- TSError { }; -- For syntax/parser errors.
|
||||
-- TSException { }; -- For exception related keywords.
|
||||
-- TSField { }; -- For fields.
|
||||
-- TSFloat { }; -- For floats.
|
||||
-- TSFunction { }; -- For function (calls and definitions).
|
||||
-- TSFuncBuiltin { }; -- For builtin functions: `print` in Lua.
|
||||
-- TSFuncMacro { }; -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
|
||||
-- TSInclude { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
|
||||
-- TSKeyword { }; -- For keywords that don't fall in previous categories.
|
||||
-- TSKeywordFunction { }; -- For keywords used to define a fuction.
|
||||
-- TSLabel { }; -- For labels: `label:` in C and `:label:` in Lua.
|
||||
-- TSMethod { }; -- For method calls and definitions.
|
||||
TSNamespace { Special }; -- For identifiers referring to modules and namespaces.
|
||||
-- TSNone { }; -- TODO: docs
|
||||
-- TSNumber { }; -- For all numbers
|
||||
-- TSOperator { }; -- For any operator: `+`, but also `->` and `*` in C.
|
||||
-- TSParameter { }; -- For parameters of a function.
|
||||
-- TSParameterReference { }; -- For references to parameters of a function.
|
||||
-- TSProperty { }; -- Same as `TSField`.
|
||||
-- TSPunctDelimiter { }; -- For delimiters ie: `.`
|
||||
-- TSPunctBracket { }; -- For brackets and parens.
|
||||
-- TSPunctSpecial { }; -- For special punctutation that does not fall in the catagories before.
|
||||
-- TSRepeat { }; -- For keywords related to loops.
|
||||
-- TSString { }; -- For strings.
|
||||
-- TSStringRegex { }; -- For regexes.
|
||||
-- TSStringEscape { }; -- For escape characters within a string.
|
||||
-- TSSymbol { }; -- For identifiers referring to symbols or atoms.
|
||||
-- TSType { }; -- For types.
|
||||
-- TSTypeBuiltin { }; -- For builtin types.
|
||||
TSVariable { Identifier }, -- Any variable name that does not have another highlight.
|
||||
TSVariableBuiltin { Number }; -- Variable names that are defined by the languages, like `this` or `self`.
|
||||
|
||||
TSTag { Special }, -- Tags like html tag names.
|
||||
-- TSTagDelimiter { }; -- Tag delimiter like `<` `>` `/`
|
||||
-- TSText { }; -- For strings considered text in a markup language.
|
||||
TSEmphasis { Italic }, -- For text to be represented with emphasis.
|
||||
TSUnderline { Underlined }, -- For text to be represented with an underline.
|
||||
TSStrong { Bold }, -- Text to be represented in bold.
|
||||
-- TSStrike { }; -- For strikethrough text.
|
||||
-- TSTitle { }; -- Text that is part of a title.
|
||||
-- TSLiteral { }; -- Literal text.
|
||||
-- TSURI { }; -- Any URI like a link or email.
|
||||
|
||||
TSNote { DiagnosticInfo },
|
||||
TSWarning { WarningMsg },
|
||||
TSDanger { Error },
|
||||
|
||||
-- TS: Markdown
|
||||
markdownTSPunctSpecial { Special },
|
||||
markdownTSStringEscape { SpecialKey },
|
||||
markdownTSTextReference { Identifier, gui = "underline" },
|
||||
markdownTSEmphasis { Italic },
|
||||
markdownTSTitle { Statement },
|
||||
markdownTSLiteral { Type },
|
||||
markdownTSURI { SpecialComment },
|
||||
sym "@punctuation.special.markdown" { Special },
|
||||
sym "@string.escape.markdown" { SpecialKey },
|
||||
sym "@text.reference.markdown" { Identifier, gui = "underline" },
|
||||
sym "@text.emphasis.markdown" { Italic },
|
||||
sym "@text.title.markdown" { Statement },
|
||||
sym "@text.literal.markdown" { Type },
|
||||
sym "@text.uri.markdown" { SpecialComment },
|
||||
|
||||
-- Syntax
|
||||
diffAdded { fg = p.leaf },
|
||||
@@ -278,9 +277,9 @@ local function generate(p, opt)
|
||||
|
||||
gitcommitOverflow { WarningMsg },
|
||||
|
||||
markdownUrl { markdownTSURI },
|
||||
markdownCode { markdownTSLiteral },
|
||||
markdownLinkText { markdownTSTextReference },
|
||||
markdownUrl { SpecialComment },
|
||||
markdownCode { Type },
|
||||
markdownLinkText { Identifier, gui = "underline" },
|
||||
markdownLinkTextDelimiter { Delimiter },
|
||||
|
||||
helpHyperTextEntry { Special },
|
||||
|
||||
@@ -6,12 +6,15 @@ function M.apply_colorscheme()
|
||||
local colors_name = vim.g.colors_name
|
||||
package.loaded[colors_name] = nil
|
||||
require "lush"(require(colors_name), { force_clean = false })
|
||||
local p = require(colors_name .. ".palette")[vim.opt.background:get()]
|
||||
local p = require(colors_name .. ".palette")[vim.o.background]
|
||||
require("zenbones.term").apply_colors(p)
|
||||
end
|
||||
|
||||
function M.get_colorscheme_list()
|
||||
local file = io.open(vim.api.nvim_get_runtime_file("zenbones.json", false)[1], "r")
|
||||
if not file then
|
||||
error "zenbones.json not found"
|
||||
end
|
||||
local content = file:read "*a"
|
||||
file:close()
|
||||
return vim.json.decode(content)
|
||||
@@ -40,7 +43,7 @@ function M.get_lualine_theme(name)
|
||||
if colorscheme.background then
|
||||
return require(string.format("lualine.themes.%s_%s", name, ness))
|
||||
else
|
||||
return require(string.format("lualine.themes.%s_%s_%s", name, vim.opt.background:get(), ness))
|
||||
return require(string.format("lualine.themes.%s_%s_%s", name, vim.o.background, ness))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user