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