doom-one.nvim
doom-one.nvim copied to clipboard
Colorscheme doesn't render properly
Hello, love the colorscheme and all the work you and other contributors have put into it. I think that my issue is similar to Issue #17 by akinsho but not entirely sure so decided to make a new issue.
Environment: MacOS Catalina (10.15.7), Kitty Terminal, Fish Shell, Neovim (v0.7.0)
Problem: setup function doesn't work properly and renders the theme to look like the following:
In my plugins.lua
, I have the following code snippet to install w/ packer and setup the colorscheme:
use {
'NTBBloodbath/doom-one.nvim',
config = [[require('colors/DOOM')]],
}
In colors/DOOM.lua
, I have the following:
require('doom-one').setup({
cursor_coloring = false,
terminal_colors = false,
italic_comments = false,
enable_treesitter = true,
transparent_background = false,
pumblend = {
enable = true,
transparency_amount = 20,
},
plugins_integrations = {
neorg = true,
barbar = true,
bufferline = false,
gitgutter = false,
gitsigns = true,
telescope = false,
neogit = true,
nvim_tree = true,
dashboard = true,
startify = true,
whichkey = true,
indent_blankline = true,
vim_illuminate = true,
lspsaga = false,
},
})
vim.cmd("colorscheme doom-one")
Now, I did notice that in my colors/DOOM.lua
file if I did: vim.cmd("colorscheme rose-pine")
and then vim.cmd("colorscheme doom-one")
, the theme came up properly. So I don't know why I need to invoke another theme and the doom color theme for the theme to work properly. Any suggestions?
Additional proof that if I invoke another colorscheme then doom-one, it works:
Also, unrelated question but how can I increase the contrast of my inactive line numbers? It is difficult to see.
Thank you in advance for helping me. In the meantime, happy Friday/weekend.
Hi, sorry for the late reply.
Can you please try the rewrite branch and check if the issue persists on it? We got rid of setup function to use the classic way to setup colorscheme options by using neovim global variables (vim.g.doom_one_foo = bar
). Check the rewrite branch README to know how to use the new configuration.
And please note that not all plugins integrations are there in rewrite branch, I'm adding them right now so it shouldn't take a long time!
Also are you setting termguicolors
option? If not, then this could be the root cause of this behavior.
Cheers
Hello @NTBBloodbath. Hope you're doing well.
How do I put doom-one in its own file? I understand that its syntax is rewritten. Now I have to put the following in packer_init.lua
:
use({
"NTBBloodbath/doom-one.nvim",
setup = function()
-- Add color to cursor
vim.g.doom_one_cursor_coloring = false
-- Set :terminal colors
vim.g.doom_one_terminal_colors = false
-- Enable italic comments
vim.g.doom_one_italic_comments = false
-- Enable TS support
vim.g.doom_one_enable_treesitter = true
-- Color whole diagnostic text or only underline
vim.g.doom_one_diagnostics_text_color = false
-- Enable transparent background
vim.g.doom_one_transparent_background = false
-- Pumblend transparency
vim.g.doom_one_pumblend_enable = false
vim.g.doom_one_pumblend_transparency = 20
-- Plugins integration
vim.g.doom_one_plugin_nvim_tree = true
vim.g.doom_one_plugin_whichkey = true
vim.g.doom_one_plugin_indent_blankline = true
vim.g.doom_one_plugin_lspsaga = true
vim.g.doom_one_plugin_barbar = true
vim.g.doom_one_plugin_neorg = false
vim.g.doom_one_plugin_telescope = false
vim.g.doom_one_plugin_neogit = false
vim.g.doom_one_plugin_dashboard = false
vim.g.doom_one_plugin_startify = false
vim.g.doom_one_plugin_vim_illuminate = false
end,
config = function()
vim.cmd("colorscheme doom-one")
end,
})
This is what I used to have in plugins/doom-one
:
local status_ok, doom_one = pcall(require, "doom-one")
if not status_ok then
return
end
doom_one.setup({
cursor_coloring = false,
terminal_colors = false,
italic_comments = false,
enable_treesitter = true,
transparent_background = false,
pumblend = {
enable = true,
transparency_amount = 20,
},
plugins_integrations = {
neorg = false,
barbar = false,
bufferline = false,
gitgutter = true,
gitsigns = true,
telescope = false,
neogit = false,
nvim_tree = true,
dashboard = false,
startify = false,
whichkey = true,
indent_blankline = true,
vim_illuminate = false,
lspsaga = false,
},
})
I can't figure out the syntax so that doom-one will work in its own file. Any help is much appreciated. Thank you!
Hmm it should just work with no setup function (no need to require doom-one
manually).
Just make sure to set its global configuration variables before calling colorscheme doom-one
so they'll take effect. You could add these options to a custom file then require it in your packer's setup
field and it should work.
Hello @NTBBloodbath Thank you for getting back to me. I appreciate it.
I figured it out with your help!
.config/nvim/lua/plugins/doom-one.lua:
-- Add color to cursor
vim.g.doom_one_cursor_coloring = false
-- terminal colors
vim.g.doom_one_terminal_colors = false
-- Enable italic comments
vim.g.doom_one_italic_comments = false
-- Enable TS support
vim.g.doom_one_enable_treesitter = true
-- Color whole diagnostic text or only underline
vim.g.doom_one_diagnostics_text_color = false
-- Enable transparent background
vim.g.doom_one_transparent_background = false
-- Pumblend transparency
vim.g.doom_one_pumblend_enable = false
vim.g.doom_one_pumblend_transparency = 20
-- Plugins integration
vim.g.doom_one_plugin_nvim_tree = true
vim.g.doom_one_plugin_whichkey = true
vim.g.doom_one_plugin_indent_blankline = true
vim.g.doom_one_plugin_lspsaga = true
vim.g.doom_one_plugin_barbar = true
vim.g.doom_one_plugin_neorg = false
vim.g.doom_one_plugin_telescope = false
vim.g.doom_one_plugin_neogit = false
vim.g.doom_one_plugin_dashboard = false
vim.g.doom_one_plugin_startify = false
vim.g.doom_one_plugin_vim_illuminate = false
vim.cmd([[
colorscheme doom-one
]])
And .config/nvim/init.lua
:
require("plugins.doom-one")