Comments (10)
Vim (not Nvim) behaves the same?
No (doesn't have this functionality)
Not true, number_hl_group
just implements the legacy sign numhl
property. FWIW, vim behaves the same, not combining any attrs for numhl
: https://github.com/vim/vim/blob/15935e7f54f0e00782a55ebc39a68e4cd94c2571/src/drawline.c#L479
Whether it should, or we want to regardless of what vim does, is up for debate I suppose.
from neovim.
Not true,
number_hl_group
just implements the legacy signnumhl
property. FWIW, vim behaves the same, not combining any attrs fornumhl
: https://github.com/vim/vim/blob/15935e7f54f0e00782a55ebc39a68e4cd94c2571/src/drawline.c#L479
I see. Although, it looks more like an implementation detail, as extmarks are not the same as signs. As Vim does not have extmarks, to me it can not behave the same when question is about their behavior.
from neovim.
To the contrary, extmark signs and legacy signs use the same drawing code path and are functionally identical. The same "issue" can be reproduced in both vim and nvim with :sign
commands.
from neovim.
To the contrary, extmark signs and legacy signs use the same drawing code path and are functionally identical.
This is implementation details. As is the fact that number_hl_group
is implemented using legacy signs.
Here is the documentation of number_hl_group
option which says nothing about it being related to signs:
• number_hl_group: name of the highlight group used to
highlight the number column. Note: ranges are unsupported
and decorations are only applied to start_row
from neovim.
I mean yeah but it's a relevant implementation detail. I don't think it makes sense to consider the extmark case in isolation.
from neovim.
The :h sign-define
docs specifically state that numhl
overrides the *LineNr*
hl groups BTW.
from neovim.
Here is the documentation of
number_hl_group
option which says nothing about it being related to signs:
I think the extmark *hl_group
s should mention their :sign define
counterparts, or at least not omit information which is present there.
And if the behavior is to be changed, it should be proposed as a vim patch first. I think overriding but combining is reasonable also for Vim.
from neovim.
overriding is an anti-pattern. Combining (with well-definied ordering) is how we process highlight sources in general, and should be how number_hl_group
takes effect as well.
Still I concur the the first thing to try is to send a patch/issue to vim, so we can keep the code as unified as possible while being consistent with vim, as long as this is possible.
from neovim.
I don't think combining is a good idea. Removing attributes is harder than adding. E.g., how are you supposed to remove a bold
or italic
attribute when combining?
from neovim.
@zeertzjq Very simple: you just don't. if information source X adds a color and information source Y adds a bold attribute, the effect of having both sources at the same place is to have both the color and the attribute. If this is undesired, you reconfigure the source whose behavior you don't want. This is how highlight combining works all over the place. There is no reason to make number_hl_group
different.
from neovim.
Related Issues (20)
- Regression bug with `nvim_buf_set_lines` on Neovim nightly HOT 11
- nvim detects wrong background in tmux HOT 4
- CmdlineEnter is triggered when entering a file or directory via netrw
- Using the default setup for lua_ls: Undefined global "vim" HOT 3
- QuickFix and LocationList window statusline does not respect global statusline HOT 1
- Unable to resolve dependency 'memurai-developer.install' HOT 1
- Bracketed Paste handling differs in insert mode vs normal mode HOT 11
- vim.lsp.start on_init/before_init not respecting changes to config settings HOT 6
- Neovim automatically inserts "* " add the start of every new line in css files if previous line also begins with "*" HOT 1
- `WinEnter` event not triggerd after exiting builtin terminal HOT 1
- Would like better documentation of `&channel`
- Add Windows 10/11 support for Python from MS Store (solution inside) HOT 6
- Wrong description about parameters of treesitter functions
- fswatch `--latency` argument is locale dependent
- buftype variable not cleared for tab drop when splitright is true HOT 2
- Add `SessionWritePost` event HOT 3
- Add a function for async rpcrequest HOT 3
- Inconsistent behavior around vim.api.nvim_tabpage_set_var and vim.api.nvim_tabpage_get_var HOT 2
- completeopt=popup crashing neovim HOT 1
- multibyte 'langmap' doesn't work for custom mapping HOT 3
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 neovim.