Comments (13)
Oooooh. That shouldn't happen. Thanks for flagging. I will address this weekend.
from onedarkpro.nvim.
I've just pushed a fix. Let me know if that works. If not, happy to receive a pull request.
from onedarkpro.nvim.
Seems like a problem with this line
colors.cursorline = colors.cursorline or utils.lighten(colors.bg, 0.97)
from onedarkpro.nvim.
If you remove the following lines it should work:
theme = function()
if vim.o.background == "dark" then
return config.dark_theme
else
return config.light_theme
end
end,
This is baked into the normal config by default
from onedarkpro.nvim.
Actually adding this line -
local utils=require("onedarkpro.utils")
in the function definition -
function M.additional_colors()
in onedark.lua
inside the colors
folder works too
from onedarkpro.nvim.
If you remove the following lines it should work:
theme = function() if vim.o.background == "dark" then return config.dark_theme else return config.light_theme end end,This is baked into the normal config by default
I took this from the README.md
actually, Ill remove it now
Edit: This does not work for me
from onedarkpro.nvim.
If you remove the following lines it should work:
theme = function() if vim.o.background == "dark" then return config.dark_theme else return config.light_theme end end,This is baked into the normal config by default
I got this from here
from onedarkpro.nvim.
I should have been explicit in the Readme. You're using a lot of config which is actually present by default.
Also, I see your colour overrides are setup for onedark
and not onedark_vivid
. Try:
colors = {onedark_vivid = {bg = '#27292d'}},
As you're using the onedark_vivid
theme, you need to tell the config to apply overrides to that.
from onedarkpro.nvim.
I should have been explicit in the Readme. You're using a lot of config which is actually present by default.
Also, I see your colour overrides are setup for
onedark
and notonedark_vivid
. Try:colors = {onedark_vivid = {bg = '#27292d'}},As you're using the
onedark_vivid
theme, you need to tell the config to apply overrides to that.
When i change both the fields to onedark
it works -
vim.o.background = "dark" -- to load onedark
local onedarkpro = require("onedarkpro")
local config = {dark_theme = "onedark_vivid", light_theme = "onelight"}
onedarkpro.setup({
dark_theme = "onedark", -- The default dark theme
light_theme = "onelight", -- The default light theme
-- Theme can be overwritten with 'onedark' or 'onelight' as a string
-- theme = function()
-- if vim.o.background == "dark" then
-- return config.dark_theme
-- else
-- return config.light_theme
-- end
-- end,
colors = {onedark = {bg = '#27292d'}}, -- Override default colors by specifying colors for 'onelight' or 'onedark' themes
-- hlgroups = {}, -- Override default highlight groups
-- filetype_hlgroups = {}, -- Override default highlight groups for specific filetypes
-- styles = {
-- strings = "NONE", -- Style that is applied to strings
-- comments = "NONE", -- Style that is applied to comments
-- keywords = "NONE", -- Style that is applied to keywords
-- functions = "NONE", -- Style that is applied to functions
-- variables = "NONE", -- Style that is applied to variables
-- virtual_text = "NONE" -- Style that is applied to virtual text
-- },
options = {
bold = false, -- Use the themes opinionated bold styles?
italic = true, -- Use the themes opinionated italic styles?
underline = false, -- Use the themes opinionated underline styles?
undercurl = false, -- Use the themes opinionated undercurl styles?
cursorline = true, -- Use cursorline highlighting?
transparency = true, -- Use a transparent background?
terminal_colors = true, -- Use the theme's colors for Neovim's :terminal?
window_unfocussed_color = false -- When the window is out of focus, change the normal background?
}
})
require('onedarkpro').load()
But when both are onedark_vivid
it fails-
vim.o.background = "dark" -- to load onedark
local onedarkpro = require("onedarkpro")
local config = {dark_theme = "onedark_vivid", light_theme = "onelight"}
onedarkpro.setup({
dark_theme = "onedark_vivid", -- The default dark theme
light_theme = "onelight", -- The default light theme
-- Theme can be overwritten with 'onedark' or 'onelight' as a string
-- theme = function()
-- if vim.o.background == "dark" then
-- return config.dark_theme
-- else
-- return config.light_theme
-- end
-- end,
colors = {onedark_vivid = {bg = '#27292d'}}, -- Override default colors by specifying colors for 'onelight' or 'onedark' themes
-- hlgroups = {}, -- Override default highlight groups
-- filetype_hlgroups = {}, -- Override default highlight groups for specific filetypes
-- styles = {
-- strings = "NONE", -- Style that is applied to strings
-- comments = "NONE", -- Style that is applied to comments
-- keywords = "NONE", -- Style that is applied to keywords
-- functions = "NONE", -- Style that is applied to functions
-- variables = "NONE", -- Style that is applied to variables
-- virtual_text = "NONE" -- Style that is applied to virtual text
-- },
options = {
bold = false, -- Use the themes opinionated bold styles?
italic = true, -- Use the themes opinionated italic styles?
underline = false, -- Use the themes opinionated underline styles?
undercurl = false, -- Use the themes opinionated undercurl styles?
cursorline = true, -- Use cursorline highlighting?
transparency = true, -- Use a transparent background?
terminal_colors = true, -- Use the theme's colors for Neovim's :terminal?
window_unfocussed_color = false -- When the window is out of focus, change the normal background?
}
})
require('onedarkpro').load()
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Error in packer_compiled: .../start/onedarkpro.nvim/lua/onedarkpro/colors/onedark.lua:38: att
empt to call field 'lighten' (a nil value)
Please check your config for correctness
from onedarkpro.nvim.
Actually adding this line -
local utils=require("onedarkpro.utils")
in the function definition -
function M.additional_colors()in
onedark.lua
inside thecolors
folder works too
This seems to work. But I think passing in config as a parameter to the function would be better. If you want I could raise a PR for the same
from onedarkpro.nvim.
This works. No errors now
from onedarkpro.nvim.
Thanks for raising the issue and testing. Great edge case!
from onedarkpro.nvim.
Glad to help
from onedarkpro.nvim.
Related Issues (20)
- Cursor line changes the highlight of folded text. HOT 3
- different token color for constant variables (just like vscode) HOT 7
- Enhancement: Custom Treesitter queries HOT 21
- Transparency not working with iTerm2 on macOS HOT 1
- [Bug]: Custom queries override sane defaults HOT 2
- [Bug]: Can't override colors HOT 8
- Highlight DiffChange HOT 1
- [Bug]: missing comma in minimal config for bug reports
- [Bug]: @lsp.type.comment.lua overrides @text.uri.comment HOT 10
- [Bug]: Onedarkpro's highlights get overriden by typescript-language-server. HOT 15
- [Bug]: fixme/todos from comment parser overriden by semantic tokens in lua HOT 10
- Built-in linking takes precedence over the values set in the setup function HOT 2
- [Bug]: Very low contrast/unreadable text with light variant of the colorscheme HOT 11
- [Bug]: Error when setting `Comment` highlights (for the first time)? HOT 6
- [Bug]: Rust `#![attributes]` are not highlighted HOT 3
- [Bug]: onedark_dark floating panels indistinguishable HOT 8
- [Bug]: No Markdown Highlighting HOT 5
- [Bug]: lualine background has disappeared HOT 3
- [Bug]: missing treesitter-based highlight for JS/TS properties after breaking nvim-treesitter update HOT 5
- [Bug]: TS/TSX treesitter errors + broken syntax highlighting with onedark and latest nvim-treesitter HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onedarkpro.nvim.