Closed mikededo closed 1 year ago
TS* highlight groups are removed btw, treesitter now uses "@constant" etc
Ah, I will take a look into it.
I can't get it working.
This is what I can see in the telescope preview, which has the expected colors:
However, when opening the file colors are not correct:
Any ideas?
It seems related with LSP. Once it finishes loading, it updates the colors. I have checked it by running LspRestart
. Colors are correct but when finished it changes back to incorrect.
hi @mikededo did you update semantic tokens in chadrc? also did u update nvchad to the latest and all plugins too?
@siduck
I have lsp overrides in my highlights.lua. They completely stopped working. How can i fix this? I don't really get the idea why they are now linked to Treesitter groups
---@type Base46HLGroupsList
M.override = {
["@lsp.type.method"] = { fg = "#61AFEF" },
["@lsp.type.decorator"] = { fg = "#61AFEF" },
["@lsp.type.variable"] = { fg = "#B1B8C4" },
["@lsp.type.parameter"] = { fg = "#D19A66" },
["@lsp.type.struct"] = { fg = "#E5C07B" },
["@lsp.type.namespace"] = { fg = "#E5C07B" },
["@lsp.type.property"] = { fg = "#D5B3FF" },
["@lsp.type.enumMember"] = { fg = "#56B6C2" },
["@lsp.type.interface"] = { fg = "#2ACFAB" },
["@lsp.type.macro"] = { fg = "#D19A66" },
}
@chikko80 check default_config.lua file, there's an option for semantic tokens, enable that in chadrc
@siduck i have that enabled. You added this option at 10th april. But since 12th of april, or as soon as i update base46 plugin, the colors doesn't work anymore
@siduck i have that enabled. You added this option at 10th april. But since 12th of april, or as soon as i update base46 plugin, the colors doesn't work anymore
Ok add this to each of your hl groups , link="",
In my case, I have everything up to date, NvChad and plugins.
@siduck i have that enabled. You added this option at 10th april. But since 12th of april, or as soon as i update base46 plugin, the colors doesn't work anymore
Ok add this to each of your hl groups , link="",
Works after clearing cache
@chikko80, rm -rf ~/.cache/nvim
? I will try that and reinstall the plugins. But it is kind of strange.
Issue not solved, in my case:
As you can see at the top-left of the image, there's the export class...
all in purple, when it should be a mix, as the class should be yellow, as in the telescope preview.
My TS highlights are the following, I looked for them and updated yesterday, hoping it would work:
return {
Normal = { fg = '#ABB2BF', bg = 'black' },
StatusLineNC = { fg = '#ABB2BF' },
DashboardCenter = { fg = '#ABB2BF' },
DashboardFooter = { fg = '#ABB2BF' },
DashboardHeader = { fg = '#ABB2BF' },
DashboardShortcut = { fg = '#ABB2BF' },
IndentBlanklineChar = { fg = '#3F4854' },
Delimiter = { fg = '#ABB2BF' },
['@punctuation.delimiter'] = { fg = '#ABB2BF' },
['@punctuation.bracket'] = { fg = '#ABB2BF' },
['@punctuation.special'] = { fg = '#ABB2BF' },
['@attribute'] = { fg = '#E06C75' },
['@field'] = { fg = '#E06C75' },
['@symbol'] = { fg = '#E5C07B' },
['@namespaces'] = { fg = '#E5C07B' },
['@property'] = { fg = '#E06C75' },
['@constant'] = { fg = '#D19A66' },
['@tag.attribute'] = { fg = '#E5C07B' },
}
Any idea or other thing I could try?
@mikededo
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim
I did run rm -rf ~/.local/share/nvim ~/.cache/nvim
, reinstalled everything and the problem persists 😞
@mikededo add link = ""
to all of your highlight groups which are related to syntax, like treesitter etc
I think I have the same problem.
When I put the highlights inside 'chadrc.lua' they work, but when I move them to 'highlights.lua' the colors don't work anymore either. I also tried it with link = ""
to my highlight groups, but also without success.
lsp_semantic_tokens = true
is also active 🤔.
I think I have the same problem. When I put the highlights inside 'chadrc.lua' they work, but when I move them to 'highlights.lua' the colors don't work anymore either. I also tried it with
link = ""
to my highlight groups, but also without success.lsp_semantic_tokens = true
is also active thinking.
are you using windows by any chance?
Not me
are you using windows by any chance?
Also not me
@mikededo link="" for your syntax related hl groups
Doesn't solve the issue 😢
:/
i'll try it tonight
@mikededo unable to reproduce the error at all. Please make sure you had uptodate nvchad and other plugins
@siduck I probably had a typo at some point. The highlights work for me now too. Thanks for your support 👍
@siduck I have everything up to date, I will look into it. Have you tried with the tsserver
? It is what I normally work with and breaks.
@siduck I have everything up to date, I will look into it. Have you tried with the
tsserver
? It is what I normally work with and breaks.
Please make sure you have semantic stuff not enabled
How can I validate that?
How can I validate that?
show core/default.config.lua and your chadrc
I don't have a core/default.confg.lua
.
The .chadrc
is:
local M = {}
-- local ui = require('NvChad/ui.nvim')
-- Theme and colors
M.ui = {
theme = 'onedommed',
transparency = false,
hl_override = require('custom.highlights'),
nvdash = {
load_on_startup = true,
header = {
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⣤⣤⣴⣦⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
'⠀⠀⠀⠀⠀⠀⢀⣤⣾⣿⣿⣿⣿⠿⠿⠿⠿⣿⣿⣿⣿⣶⣤⡀⠀⠀⠀⠀⠀⠀ ',
'⠀⠀⠀⠀⣠⣾⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣿⣿⣶⡀⠀⠀⠀⠀ ',
'⠀⠀⠀⣴⣿⣿⠟⠁⠀⠀⠀⣶⣶⣶⣶⡆⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣦⠀⠀⠀ ',
'⠀⠀⣼⣿⣿⠋⠀⠀⠀⠀⠀⠛⠛⢻⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣧⠀⠀ ',
'⠀⢸⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⡇⠀ ',
'⠀⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀ ',
'⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⡟⢹⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⣹⣿⣿⠀ ',
'⠀⣿⣿⣷⠀⠀⠀⠀⠀⠀⣰⣿⣿⠏⠀⠀⢻⣿⣿⡄⠀⠀⠀⠀⠀⠀⣿⣿⡿⠀ ',
'⠀⢸⣿⣿⡆⠀⠀⠀⠀⣴⣿⡿⠃⠀⠀⠀⠈⢿⣿⣷⣤⣤⡆⠀⠀⣰⣿⣿⠇⠀ ',
'⠀⠀⢻⣿⣿⣄⠀⠀⠾⠿⠿⠁⠀⠀⠀⠀⠀⠘⣿⣿⡿⠿⠛⠀⣰⣿⣿⡟⠀⠀ ',
'⠀⠀⠀⠻⣿⣿⣧⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⠏⠀⠀⠀ ',
'⠀⠀⠀⠀⠈⠻⣿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⠟⠁⠀⠀⠀⠀ ',
'⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⠀⠀ ',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠛⠛⠛⠛⠛⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
},
},
cmp = {
style = 'flat_dark',
selected_item_bg = 'colored',
},
statusline = require('custom.configs.statusline'),
}
M.plugins = 'custom.plugins'
return M
lua/core/default_config.lu @mikededo
local M = {}
M.options = {
nvchad_branch = "v2.0",
}
M.ui = {
------------------------------- base46 -------------------------------------
-- hl = highlights
hl_add = {},
hl_override = {},
changed_themes = {},
theme_toggle = { "onedark", "one_light" },
theme = "onedark", -- default theme
transparency = false,
lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens
-- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations
extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify"
-- cmp themeing
cmp = {
icons = true,
lspkind_text = true,
style = "default", -- default/flat_light/flat_dark/atom/atom_colored
border_color = "grey_fg", -- only applicable for "default" style, use color names from base30 variables
selected_item_bg = "colored", -- colored / simple
},
telescope = { style = "borderless" }, -- borderless / bordered
------------------------------- nvchad_ui modules -----------------------------
statusline = {
theme = "default", -- default/vscode/vscode_colored/minimal
-- default/round/block/arrow separators work only for default statusline theme
-- round and block will work for minimal theme only
separator_style = "default",
overriden_modules = nil,
},
-- lazyload it when there are 1+ buffers
tabufline = {
show_numbers = false,
enabled = true,
lazyload = true,
overriden_modules = nil,
},
-- nvdash (dashboard)
nvdash = {
load_on_startup = false,
header = {
" ▄ ▄ ",
" ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ ",
" █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ ",
" ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ ",
" ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ",
" █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄",
"▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █",
"█▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █",
" █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ",
},
buttons = {
{ " Find File", "Spc f f", "Telescope find_files" },
{ " Recent Files", "Spc f o", "Telescope oldfiles" },
{ " Find Word", "Spc f w", "Telescope live_grep" },
{ " Bookmarks", "Spc b m", "Telescope marks" },
{ " Themes", "Spc t h", "Telescope themes" },
{ " Mappings", "Spc c h", "NvCheatsheet" },
},
},
cheatsheet = { theme = "grid" }, -- simple/grid
lsp = {
-- show function signatures i.e args as you type
signature = {
disabled = false,
silent = true, -- silences 'no signature help available' message from appearing
},
},
}
M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file
M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options
M.mappings = {}
return M
I guess it is the default, as I haven't touched anything.
hmmm idk then, i cant produce your issue :(
No worries, I will dig into it when I have more time! Thanks anyway
@mikededo try the example_config as your custom dir and add your hl_override there
just tried with a minimal chadrc, and it works
Finally solved the issue. When you said it had to be something regarding lsp highlights, I was quite certain it had to be because of that, as the configs were ok. I found this reddit post: https://www.reddit.com/r/neovim/comments/109vgtl/how_to_disable_highlight_from_lsp/
Adding this line to the on_attach
function:
local on_attach = function(client, bufnr)
client.server_capabilities.semanticTokensProvider = nil -- <- Disable LSP tokens
-- ...
en
Reference i
btw we already had that!!
Describe the bug
I have defined custom highlights and after a recent update they have stopped being applied. Also, when opening a file, it is partially rendered with the expected highlights but after they are changed. I have not been able to determine when does that happen (I guess when the computer is more busy, as it takes more time to apply highlights).
To Reproduce
Here is my
chadrc.lua
and myhighlights.lua
Expected behavior
To see the customized highlights.
Desktop (please complete the following information):