-
-
Notifications
You must be signed in to change notification settings - Fork 618
NvimTree file highlighted as bad spell (SpellCap) #2658
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This attitude is not only unnecessary but also unwelcome. This is an open source project so either you take it as is or open PR with changes you want to see if you think you can do better. |
This change has took me over hours to figure out, going through thousands of Lua configuration code and through the plugin source. I apologize if my message came up as condescending, I tried to voice my complaint with humor, not to belittle the immense effort that goes in the plugin development. |
d9cb432 fix(#2415): disambiguate highlight groups, see :help nvim-tree-highlight-overhaul (#2639) Alexander Courtis Mon 12:43 https://github.com/nvim-tree/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L2397
One of the main drivers of this highlighting change was accessibility and compatibility. |
I got that part. (In my config, I used the same highlight group for all the special files) But why This is my PR. Let me know what you think
|
Distinct standard highlight groups that most closely match the functionaily are used wherever possible:
There are two grandfathered exceptions: Why |
I believe the argument still holds. SpellCap is a highlight group that serves a specific function (Mark first words that are not capitalized).
Do you agree that what I am poiting out is just wanting to follow good design practice? Feel free to incorporate my PR in future PRs instead of creating an entire merge for just 4 lines of code. |
Oh man, this has been driving me crazy! Thank you for filing this issue, if nothing else so I could find it :D
Same!
Yes :')
I wholeheartedly agree. SpellCap is a highlight group that triggers my brain to think "something is wrong and should be fixed". It's been driving me nuts to see it (seemingly) randomly in my file tree. It didn't even occur to me that it could be signaling that a file is executable. EDIT: As a note to anyone else who comes across this issue, the workaround is a bit buried in a comment on a closed PR. In any case, these settings are easy to override in your config:
|
And speaking of which, executable files seem to be the only ones that show this behavior. According to the docs shouldn't it also be all of the following?
For better or worse, that doesn't seem to be the case for me. But maybe this is a case of:
|
Documented: FAQ: https://github.com/nvim-tree/nvim-tree.lua/wiki/FAQ#why-do-i-see-spelling-highlights readme: https://github.com/nvim-tree/nvim-tree.lua?tab=readme-ov-file#highlight
|
Awesome, thank you! Definitely will make this more discoverable for folks. |
@alex-courtis I'm not sure I understand how using ![]() I don't understand how using a widely understood idiom of "this is spelled wrong" adds accessibility when showing which files are executable (or really any of the others that were written to use I honestly believe this particular change is a decrease in the overall user experience and detracts from the default out of box experience. Adding customizations to highlight groups after the fact isn't terribly complicated and if I'm unable to distinguish something in particular due to color/etc, I can easily change the highlight group for a particular element so long as it has a unique group that doesn't have far reaching effects throughout my editor. And if I want it tied to another more global highlight group for consistent changes, I can also do so. But I think the default experience should not be to misuse a highlight group like SpellCap. It has a very specific meaning when applied in neovim and this change causes more confusion than anything else. |
I see. Let's change this. Distinct groups were chosen as they would still function with cterm and terminals with less than 256 colours. Users with vision issues using, say, a custom colourscheme or screenreader will be able to see these distinct linked groups, with hardcoded colours being problematic. I do personally know people with vision and mobility issues who are able to use vim, hence these concerns and stipulations. What should they be? Candidates below, taken from No |
I'd go with |
@alex-courtis I'll have to toy around with these locally and see them for myself in both my setup and |
…estion, SpecialFile->Title, Symlink->Underlined
…stion, ImageFile->Question, SpecialFile->Title, Symlink->Underlined; add all other highlight groups to :NvimTreeHiTest (#2732) * fix(#2658): add all highlight groups to :NvimTreeHiTest * fix(#2658): add all highlight groups to :NvimTreeHiTest * fix(#2658): change SpellCap groups: ExecFile->Question, ImageFile->Question, SpecialFile->Title, Symlink->Underlined
Note that with regards to special files highlighting you can also disable special highlight treatment with... require("nvim-tree").setup({
renderer = {
-- Don't have any special highlighting for README and others
special_files = {}
}
}) |
Description
The latest commit using "SpellCap" highlight group is a bad idea. Now many of the files in the tree are annoyingly marked as bad spelling. I don't want to mention names, but great job Mr Spelling Warrior who PR-ed this change
Neovim version
Operating system and version
Gentoo
Windows variant
No response
nvim-tree version
latest commit as of today
Clean room replication
Steps to reproduce
use latest commit and open tree to code files
Expected behavior
No SpellCap of files
Actual behavior
Simlinks and exec files highlighted for SpellCap
The text was updated successfully, but these errors were encountered: