From b4761a288a421ae00582216ab22b0194a286a12a Mon Sep 17 00:00:00 2001 From: Michael Chris Lopez Date: Sun, 18 Sep 2022 17:41:48 +0800 Subject: [PATCH] feat!: bump min nvim version to v0.6.0 --- .github/workflows/doc.yml | 2 +- lua/zenbones/specs/dark.lua | 40 ------------------------------------ lua/zenbones/specs/light.lua | 40 ------------------------------------ lua/zenbones/util.lua | 3 +-- 4 files changed, 2 insertions(+), 83 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index bb441f6..be151a5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -32,7 +32,7 @@ jobs: vimdoc: zenbones pandoc: doc/zenbones.md description: "A collection of contrast-based vim/neovim colorschemes" - version: "Vim v8.1 / Neovim 0.5.0" + version: "Vim v8.1 / Neovim 0.6.0" - name: Create PR run: | if ! [[ -z $(git status -s) ]]; then diff --git a/lua/zenbones/specs/dark.lua b/lua/zenbones/specs/dark.lua index af790e3..3b88bb7 100644 --- a/lua/zenbones/specs/dark.lua +++ b/lua/zenbones/specs/dark.lua @@ -416,46 +416,6 @@ local function generate(p, opt) ) end - -- stylua: ignore start - if not vim.diagnostic then - table.insert( - specs, - ---@diagnostic disable: undefined-global - -- selene: allow(undefined_variable) - lush(function() - return { - LspDiagnosticsDefaultError { base.DiagnosticError }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultWarning { base.DiagnosticWarn }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultInformation { base.DiagnosticInfo }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultHint { base.DiagnosticHint }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - - LspDiagnosticsVirtualTextError { base.DiagnosticVirtualTextError }, -- Used for "Error" diagnostic virtual text - LspDiagnosticsVirtualTextWarning { base.DiagnosticVirtualTextWarn }, -- Used for "Warning" diagnostic virtual text - LspDiagnosticsVirtualTextInformation { base.DiagnosticVirtualTextInfo }, -- Used for "Information" diagnostic virtual text - LspDiagnosticsVirtualTextHint { base.DiagnosticVirtualTextHint }, -- Used for "Hint" diagnostic virtual text - - LspDiagnosticsUnderlineError { base.DiagnosticUnderlineError }, -- Used to underline "Error" diagnostics - LspDiagnosticsUnderlineWarning { base.DiagnosticUnderlineWarn }, -- Used to underline "Warning" diagnostics - LspDiagnosticsUnderlineInformation { base.DiagnosticUnderlineInfo }, -- Used to underline "Information" diagnostics - LspDiagnosticsUnderlineHint { base.DiagnosticUnderlineHint }, -- Used to underline "Hint" diagnostics - - -- LspDiagnosticsFloatingError { }, -- Used to color "Error" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingWarning { }, -- Used to color "Warning" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingInformation { }, -- Used to color "Information" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingHint { }, -- Used to color "Hint" diagnostic messages in diagnostics float - - LspDiagnosticsSignError { base.DiagnosticSignError }, -- Used for "Error" signs in sign column - LspDiagnosticsSignWarning { base.DiagnosticSignWarn }, -- Used for "Warning" signs in sign column - LspDiagnosticsSignInformation { base.DiagnosticSignInfo }, -- Used for "Information" signs in sign column - LspDiagnosticsSignHint { base.DiagnosticSignHint }, -- Used for "Hint" signs in sign column - } - end) - -- selene: deny(undefined_variable) - ---@diagnostic enable: undefined-global - ) - end - -- stylua: ignore end - return lush.merge(specs) end diff --git a/lua/zenbones/specs/light.lua b/lua/zenbones/specs/light.lua index 24253ef..1722552 100644 --- a/lua/zenbones/specs/light.lua +++ b/lua/zenbones/specs/light.lua @@ -416,46 +416,6 @@ local function generate(p, opt) ) end - -- stylua: ignore start - if not vim.diagnostic then - table.insert( - specs, - ---@diagnostic disable: undefined-global - -- selene: allow(undefined_variable) - lush(function() - return { - LspDiagnosticsDefaultError { base.DiagnosticError }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultWarning { base.DiagnosticWarn }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultInformation { base.DiagnosticInfo }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultHint { base.DiagnosticHint }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - - LspDiagnosticsVirtualTextError { base.DiagnosticVirtualTextError }, -- Used for "Error" diagnostic virtual text - LspDiagnosticsVirtualTextWarning { base.DiagnosticVirtualTextWarn }, -- Used for "Warning" diagnostic virtual text - LspDiagnosticsVirtualTextInformation { base.DiagnosticVirtualTextInfo }, -- Used for "Information" diagnostic virtual text - LspDiagnosticsVirtualTextHint { base.DiagnosticVirtualTextHint }, -- Used for "Hint" diagnostic virtual text - - LspDiagnosticsUnderlineError { base.DiagnosticUnderlineError }, -- Used to underline "Error" diagnostics - LspDiagnosticsUnderlineWarning { base.DiagnosticUnderlineWarn }, -- Used to underline "Warning" diagnostics - LspDiagnosticsUnderlineInformation { base.DiagnosticUnderlineInfo }, -- Used to underline "Information" diagnostics - LspDiagnosticsUnderlineHint { base.DiagnosticUnderlineHint }, -- Used to underline "Hint" diagnostics - - -- LspDiagnosticsFloatingError { }, -- Used to color "Error" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingWarning { }, -- Used to color "Warning" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingInformation { }, -- Used to color "Information" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingHint { }, -- Used to color "Hint" diagnostic messages in diagnostics float - - LspDiagnosticsSignError { base.DiagnosticSignError }, -- Used for "Error" signs in sign column - LspDiagnosticsSignWarning { base.DiagnosticSignWarn }, -- Used for "Warning" signs in sign column - LspDiagnosticsSignInformation { base.DiagnosticSignInfo }, -- Used for "Information" signs in sign column - LspDiagnosticsSignHint { base.DiagnosticSignHint }, -- Used for "Hint" signs in sign column - } - end) - -- selene: deny(undefined_variable) - ---@diagnostic enable: undefined-global - ) - end - -- stylua: ignore end - return lush.merge(specs) end diff --git a/lua/zenbones/util.lua b/lua/zenbones/util.lua index 884c57d..c68155c 100644 --- a/lua/zenbones/util.lua +++ b/lua/zenbones/util.lua @@ -11,11 +11,10 @@ function M.apply_colorscheme() end function M.get_colorscheme_list() - local json_decode = vim.fn.has "nvim-0.6.0" == 1 and vim.json.decode or vim.fn.json_decode local file = io.open(vim.api.nvim_get_runtime_file("zenbones.json", false)[1], "r") local content = file:read "*a" file:close() - return json_decode(content) + return vim.json.decode(content) end function M.get_colorscheme(name)