Comments (8)
vim.cmd "hi! link MiniIndentscopeSymbol Whitespace"
This looks about right. I'd guess that you have color scheme overriding it later. There are at least two possible solutions:
- Make sure that color scheme is loaded first. I.e. the
:colorscheme <name>
command is executed prior to thatvim.cmd
call. - A more idiomatic approach is to also create an autocommand that will ensure proper
MiniIndentscopeSymbol
. So add something like this aftervim.cmd "hi! ...
:
vim.cmd('au Colorscheme * hi! link MiniIndentscopeSymbol Whitespace')
from mini.nvim.
Thank for taking time and looking at source code! You stopped one step too early, though :) vim.api.nvim_buf_set_extmakr()
also allows hl_group
in virt_text
to set different highlight groups for different parts of text. That is what 'mini.indentscope' is doing via its own two dedicated highlight groups for symbol and what comes before it (prefix):
mini.nvim/lua/mini/indentscope.lua
Lines 875 to 880 in 09d70a2
The preferred way of managing highlight groups is do redefine you the way you like. Here is a list of highlight groups of 'mini.indentscope'. So in your case putting the vim.cmd('hi! link MiniIndentscopeSymbol Whitespace')
somewhere in the 'init.lua' should solve the issue.
from mini.nvim.
Came here looking for the correct way to set the indentscope character color. Is this something you would consider adding to the docs? From what I can gather, it should be possible to do something like this in my theme config:
MiniIndentscopeSymbol = { fg = theme.waveBlue2 },
?
from mini.nvim.
Came here looking for the correct way to set the indentscope character color. Is this something you would consider adding to the docs? From what I can gather, it should be possible to do something like this in my theme config:
MiniIndentscopeSymbol = { fg = theme.waveBlue2 },
?
That has already been answered in previous comment.
Place vim.api.nvim_set_hl(0, 'MiniIndentscopeSymbol', { fg = theme.waveBlue2 })
somewhere in your setup.
from mini.nvim.
Just chiming in to say that this should be part of the docs. Thanks!
from mini.nvim.
Just chiming in to say that this should be part of the docs. Thanks!
It is already part of the docs.
from mini.nvim.
hey @echasnovski, quick Q. Where are we supposed to place the highlight fn? Here's my setup (using lazy.nvim
):
{
"echasnovski/mini.indentscope",
lazy = false,
config = function()
require("mini.indentscope").setup {}
vim.cmd "hi! link MiniIndentscopeSymbol Whitespace"
end,
}
But the symbol still has the default color. I also tried vim.api.nvim_set_hl(0, 'MiniIndentscopeSymbol', { fg = '#333333' })
but still nothing.
It's worth mentioning that if I just run either of those in the cmdline, it does properly highlight the symbol.
from mini.nvim.
The autocommand
works fine 👍🏻 , I had it setup on CursorMoved
, but your solution makes more sense 😅. I still don't know why the colorscheme is overriding it, but I'm happy with this solution. Thanks @echasnovski !
from mini.nvim.
Related Issues (20)
- saip excluding trailing whitespace HOT 4
- Surround keymap broken HOT 8
- Weird conflicting behavior with `dial.nvim` HOT 1
- Mini.files spaces after and before Title HOT 8
- mini.cursorword: Define custom highlighting groups HOT 1
- Rename through blockwise selection triggers a move operation. HOT 8
- 'MiniPick.builtin.grep_live' with 'rg' not showing any result HOT 12
- Trailspace: make functions available through module HOT 4
- Support setting 'winbar' option in statusline module HOT 1
- mini.ai: use different search_method for treesitter textobjects?
- Repeatable movement across modules with `;` and `,` HOT 1
- In WSL2 :Git commit results in error in sockconnect HOT 5
- mini.hipatterns throws a "buffer not found" error if the buffer no longer exists HOT 2
- mini.convert plugin to handle conversion of colors between hsv, rgb and hex, conversion of sizes, etc HOT 1
- [mini.git] filetype is set incorrectly for ":Git show" HOT 2
- [surround] Add insert mode surround mappings HOT 2
- (mini.icons) Extension is not resolved when contains multiple dots HOT 4
- Maybe a better way to hide cursor HOT 4
- Mini.operators: if you have a custom mapping on _ (underscore), the line (grr, gxx, gmm) operators break HOT 2
- (mini.clue) overriding default keymap descriptions HOT 1
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 mini.nvim.