Skip to content

Commit

Permalink
fixed #179
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Apr 15, 2022
1 parent 4ce7f86 commit 9c641bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- fixed #177
- fix: use pcall to clear autocmd silently @xiyaowong #178
- fix: skip native_autocmds on some neovim0.7 builds
- fixed #179

## [v0.0.4] - 11 Jan 2022

Expand Down
8 changes: 4 additions & 4 deletions lua/github-theme/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ autocmds.native_cmds = function(config, colors_name)
end

---@param config gt.ConfigSchema
autocmds.set = function(config)
autocmds.set = function(config, colors_name)
if vim.fn.has('nvim-0.7') == 1 then
if not pcall(autocmds.native_cmds, config) then
autocmds.viml_cmds(config)
if not pcall(autocmds.native_cmds, config, colors_name) then
autocmds.viml_cmds(config, colors_name)
end
else
autocmds.viml_cmds(config)
autocmds.viml_cmds(config, colors_name)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lua/github-theme/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ util.load = function(hi)
local autocmds = require('github-theme.autocmds')
--Load ColorScheme
util.syntax(hi.base)
autocmds.set(hi.config)
autocmds.set(hi.config, util.colors_name)
util.terminal(hi.colors)
util.syntax(hi.plugins)
end
Expand Down

0 comments on commit 9c641bd

Please sign in to comment.