fix: resolve merge conflicts
This commit is contained in:
commit
912abb7dda
32
README.md
32
README.md
@ -3,16 +3,28 @@
|
||||
_A modern Neovim port of a deftheme [adaptation][gruber-darker-theme] of an Emacs
|
||||
[port][gruber-darker] of a BBEdit [colorscheme][gruber-dark]_
|
||||
|
||||
__This is a work in progress, and is not currently stable__
|
||||
**This is a work in progress**
|
||||
|
||||
## Installation
|
||||
|
||||
### Lazy
|
||||
|
||||
```lua
|
||||
{ "blazkowolf/gruber-darker.nvim" }
|
||||
```
|
||||
|
||||
### Packer
|
||||
|
||||
```lua
|
||||
use "blazkowolf/gruber-darker.nvim"
|
||||
```
|
||||
|
||||
### Plug
|
||||
|
||||
```vim
|
||||
Plug 'blazkowolf/gruber-darker.nvim'
|
||||
```
|
||||
|
||||
Then, somewhere in your `init.lua`, set the colorscheme like this
|
||||
|
||||
```lua
|
||||
@ -21,27 +33,27 @@ vim.cmd.colorscheme("GruberDarker")
|
||||
|
||||
## Configuration
|
||||
|
||||
Additional settings for gruber-darker are:
|
||||
Configuration options can be changed by calling `setup()`
|
||||
with your preferences prior to loading the colorscheme.
|
||||
|
||||
```lua
|
||||
-- setup must be called before loading the colorscheme
|
||||
-- Default options:
|
||||
-- Config defaults
|
||||
require("gruber-darker").setup({
|
||||
bold = true,
|
||||
italic = true,
|
||||
underline = true,
|
||||
comment_italics = true,
|
||||
bold = true,
|
||||
italic = true,
|
||||
underline = true,
|
||||
comment_italics = true,
|
||||
})
|
||||
```
|
||||
|
||||
## Special thanks
|
||||
## Credits
|
||||
|
||||
These repositories were great knowledge sources and their
|
||||
inspiration helped immensely with the development of this plugin.
|
||||
|
||||
- [rexim/gruber-darker-theme][gruber-darker-theme]
|
||||
- [folke/tokyonight.nvim][tokyonight]
|
||||
- [drsooch/gruber-darker-vim][gruber-darker-theme]
|
||||
- [drsooch/gruber-darker-vim][gruber-darker-vim]
|
||||
|
||||
[gruber-darker-theme]: https://github.com/rexim/gruber-darker-theme
|
||||
[gruber-darker]: https://jblevins.org/projects/emacs-color-themes/gruber-darker-theme.el.html
|
||||
|
@ -9,25 +9,25 @@
|
||||
|
||||
---@type ConfigMgr
|
||||
local M = {
|
||||
resolved_opts = {
|
||||
bold = true,
|
||||
italic = true,
|
||||
underline = true,
|
||||
comment_italics = true,
|
||||
},
|
||||
resolved_opts = {
|
||||
bold = true,
|
||||
italic = true,
|
||||
underline = true,
|
||||
comment_italics = true,
|
||||
},
|
||||
}
|
||||
|
||||
---Get GruberDarker user preferences
|
||||
---@return Options
|
||||
---@nodiscard
|
||||
function M.get_resolved_opts()
|
||||
return M.resolved_opts
|
||||
return M.resolved_opts
|
||||
end
|
||||
|
||||
---Set GruberDarker colorscheme options
|
||||
---@param opts Options
|
||||
function M.set(opts)
|
||||
M.resolved_opts = vim.tbl_deep_extend("force", M.resolved_opts, opts)
|
||||
M.resolved_opts = vim.tbl_deep_extend("force", M.resolved_opts, opts)
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -6,55 +6,51 @@ local M = {}
|
||||
---theme changes to something else
|
||||
---@package
|
||||
function M.on_colorscheme()
|
||||
vim.cmd([[autocmd! GruberDarker]])
|
||||
vim.cmd([[augroup! GruberDarker]])
|
||||
vim.cmd([[autocmd! GruberDarker]])
|
||||
vim.cmd([[augroup! GruberDarker]])
|
||||
end
|
||||
|
||||
---Clear current highlights and set Neovim global `colors_name`
|
||||
function M.load()
|
||||
if vim.g.colors_name then
|
||||
vim.cmd.hi("clear")
|
||||
end
|
||||
if vim.g.colors_name then
|
||||
vim.cmd.hi("clear")
|
||||
end
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.g.colors_name = "GruberDarker"
|
||||
vim.opt.termguicolors = true
|
||||
vim.g.colors_name = "GruberDarker"
|
||||
|
||||
-- set highlights here...
|
||||
local highlights = require("gruber-darker.hl")
|
||||
for group, hl in pairs(highlights.groups) do
|
||||
vim.api.nvim_set_hl(0, group, hl)
|
||||
end
|
||||
-- set highlights here...
|
||||
local highlights = require("gruber-darker.hl")
|
||||
for group, hl in pairs(highlights.groups) do
|
||||
vim.api.nvim_set_hl(0, group, hl)
|
||||
end
|
||||
|
||||
local gruber_darker_group = vim.api.nvim_create_augroup("GruberDarker", { clear = true })
|
||||
vim.api.nvim_create_autocmd("ColorSchemePre", {
|
||||
group = gruber_darker_group,
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
require("gruber-darker").on_colorscheme()
|
||||
end,
|
||||
})
|
||||
local gruber_darker_group = vim.api.nvim_create_augroup("GruberDarker", { clear = true })
|
||||
vim.api.nvim_create_autocmd("ColorSchemePre", {
|
||||
group = gruber_darker_group,
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
require("gruber-darker").on_colorscheme()
|
||||
end,
|
||||
})
|
||||
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- group = gruber_darker_group,
|
||||
-- pattern = "qf,help",
|
||||
-- callback = function()
|
||||
-- vim.cmd.setlocal("winhighlight=Normal:NormalSB,SignColumn:SignColumnSB")
|
||||
-- end,
|
||||
-- })
|
||||
end
|
||||
|
||||
---Change colorscheme to GruberDarker
|
||||
function M.colorscheme() end
|
||||
function M.colorscheme()
|
||||
end
|
||||
|
||||
---GruberDarker configuration bootstrapper
|
||||
---@param opts Options
|
||||
function M.setup(opts)
|
||||
config.set(opts or {})
|
||||
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- group = gruber_darker_group,
|
||||
-- pattern = "qf,help",
|
||||
-- callback = function()
|
||||
-- vim.cmd.setlocal("winhighlight=Normal:NormalSB,SignColumn:SignColumnSB")
|
||||
-- end,
|
||||
-- })
|
||||
config.set(opts or {})
|
||||
end
|
||||
|
||||
-- M.setup({
|
||||
-- message = "Test message ensuring when a user calls "
|
||||
-- .. "`setup` with overrides, their preferences are kept.",
|
||||
-- })
|
||||
|
||||
return M
|
||||
|
Loading…
Reference in New Issue
Block a user