Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zaibatsu conceal #263

Open
habamax opened this issue Jul 10, 2024 · 9 comments
Open

zaibatsu conceal #263

habamax opened this issue Jul 10, 2024 · 9 comments

Comments

@habamax
Copy link
Collaborator

habamax commented Jul 10, 2024

Hi @romainl, do you think it makes sense to make Conceal linked to or the same as NonText?

It is used by several lsp plugins to show named params:

here you can see them in close_buffer function (win:, action:, abort_if_last:):

image

and the same in zaibatsu:

image

@habamax
Copy link
Collaborator Author

habamax commented Jul 10, 2024

make Conceal linked to or the same as NonText?

or better SpecialKey.

@romainl
Copy link
Collaborator

romainl commented Jul 10, 2024

Hmm… are these win: etc. added by plugins?

@habamax
Copy link
Collaborator Author

habamax commented Jul 10, 2024

Hmm… are these win: etc. added by plugins?

Yes, indeed. Text properties added by LSPs and they "usually" link their highlight group to Conceal.

@romainl
Copy link
Collaborator

romainl commented Jul 10, 2024

Well, that's one use case. Isn't Conceal used for other things where using NonText or SpecialKey might be a bad idea? I don't know, I've never used that feature and I'm not even sure what it is used for.

FWIW, Conceal looks like that in default:

Capture d’écran 2024-07-10 à 10 38 46

which would look like shit in your use case. Somehow I think that the maintainers of those plugins chose Conceal because it looked good in their specific colorscheme, without considering a) how it looks by default, b) how it would look in other colorschemes or b) the actual semantics of the group.

Moreover, making those text properties dim, like in your screenshot, begs the question: what's the point? If you add meta textual information to the view it must be because it is important and useful… so why make it dark grey or whatever?

@habamax
Copy link
Collaborator Author

habamax commented Jul 10, 2024

Isn't Conceal used for other things where using NonText or SpecialKey might be a bad idea?

Yep is it used to highlight concealed text defined by syntax files, when conceallevel is 1 or 2.
Imagine a markdown that conceals all the markup turning markdown links to "just a link" as in [blabla](https://blabla.com) -> blabla (but underlined). Or hiding ** surrounding bold text: **bold** -> bold, etc.

Default Conceal is... as good as default vim colorscheme is.

Moreover, making those text properties dim, like in your screenshot, begs the question: what's the point? If you add meta textual information to the view it must be because it is important and useful… so why make it dark grey or whatever?

It is not about making it dim (my personal preference to Conceal), but different to regular text and syntax highlighting. In case of this metainfo, it shows names of the parameters defined in the function and if not highlighted differently to actual parameter values it looks weird :).

Anyways, it was just one usecase for the Conceal that is for some reason was chosen by lsp plugin authors to highlight this meta info. Apparently ppl can highlight it as they want.

The other is to distinguish concealed chars coming from syntax files when you have conceallevel=1

@habamax
Copy link
Collaborator Author

habamax commented Jul 10, 2024

asciicast

Well, it doesn't look bad when concealed is "normal" in zaibatsu.

@habamax
Copy link
Collaborator Author

habamax commented Jul 10, 2024

Imagine a markdown that conceals all the markup turning markdown links to "just a link" as in [blabla](https://blabla.com) -> blabla (but underlined). Or hiding ** surrounding bold text: **bold** -> bold, etc.

And this is not happening :-). I couldn't find syntax file that does it for that kind of markup -- they just hide it. cchar in syntax is used for tex and in pandoc to replace some of the text with chars.

@lifepillar
Copy link
Contributor

And this is not happening

I definitely get **bold** and *italic* to be shown in bold and italics, respectively, with the asterisks concealed. That is supported by Vim's ftplugin. Maybe, you've set g:markdown_syntax_conceal to 0?

@habamax
Copy link
Collaborator Author

habamax commented Jul 12, 2024

@lifepillar I meant it doesn't show cchar instead there. Yes it conceals, but hides it completely. The difference could be seen in screencast earlier where markdown code block is rendered as _.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants