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

feat(highlights): Added some missed highlights primarily for markup languages #123

Merged
merged 4 commits into from
Apr 11, 2024
Merged

Conversation

juniorsundar
Copy link
Contributor

@juniorsundar juniorsundar commented Mar 23, 2024

I have ported over most changes from #110 prior to the restructuring. Some were dropped because I found that they were redundant.

The rationale for this PR is I found that this theme does not have proper support for Neorg (and most other) markup files. I've selected formatting for highlight groups based on how Catppuccin and Tokyonight did it, though I've tried to keep it true to Nordic's flavour.

Here is a side by side comparison of the result:
image

Copy link
Collaborator

@5-pebbles 5-pebbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything looks good as far as I can tell.

nice work!

@5-pebbles
Copy link
Collaborator

It looks awesome!

Old:
25-03-24@16:00:29

New:
25-03-24@16:02:29

@5-pebbles
Copy link
Collaborator

@AlexvZyl can this one get merged?

It's kind of miserable to work on markdown files without it.

@AlexvZyl
Copy link
Owner

Can we make to top heading yellow instead of red? We try to reserve red.

Other than that, this looks awesome, thanks!

@AlexvZyl
Copy link
Owner

It looks awesome!

Old: 25-03-24@16:00:29

New: 25-03-24@16:02:29

Nice.

@5-pebbles
Copy link
Collaborator

5-pebbles commented Apr 10, 2024

Can we make to top heading yellow instead of red? We try to reserve red.

Other than that, this looks awesome, thanks!

That is headlines.nvim I messed up and forgot it was enabled...

Here is what it looks like by default:

10-04-24@16:53:47

That was a mess-up on my part really sorry about that.

@5-pebbles
Copy link
Collaborator

And here is the old without headlines.nvim:
10-04-24@16:55:43

@juniorsundar
Copy link
Contributor Author

Can we make to top heading yellow instead of red? We try to reserve red.

Other than that, this looks awesome, thanks!

@AlexvZyl Are you referring to the example with Neorg that I attached to the Pull Request? Or for the Markdown examples that @5-pebbles posted?

@AlexvZyl
Copy link
Owner

Can we make to top heading yellow instead of red? We try to reserve red.
Other than that, this looks awesome, thanks!

@AlexvZyl Are you referring to the example with Neorg that I attached to the Pull Request? Or for the Markdown examples that @5-pebbles posted?

I am referring to the example that you attached.

Neorg headings were linking to different tags.
I specifically designated the `.md` heading markups and linked them
to the `.norg` heading markups so that they are synchronised.

Also removed `red` from the heading hls, since it is designated
for other uses.
@juniorsundar
Copy link
Contributor Author

Can we make to top heading yellow instead of red? We try to reserve red.
Other than that, this looks awesome, thanks!

@AlexvZyl Are you referring to the example with Neorg that I attached to the Pull Request? Or for the Markdown examples that @5-pebbles posted?

I am referring to the example that you attached.

Neorg seems to link to arbitrary tags (like Macro, Delimiter, etc.) for its heading highlights. So I decided to specifically designate highlight groups for markdown headings and linked them to the corresponding Neorg highlight tags. The heading highlights for markdown and neorg will now be synchronised.

H1 to H3 are bold faced. H4 is regular faced. H5-H6 is italicised.

image

@juniorsundar
Copy link
Contributor Author

More examples:

image

@juniorsundar
Copy link
Contributor Author

juniorsundar commented Apr 11, 2024

Also, (sorry to spam), I've found that there are some buggy interactions with the highlights when also using folke/noice.nvim

The Heading highlights for .norg files seem to revert when you switch to command mode :. I don't know if I should debug this issue, or offload it as a noice.nvim issue?

When not using noice.nvim this issue doesn't occur, so I'm certain that it isn't a nordic.nvim issue. My guess is that noice.nvim seems to mess around with the markdown highlights in someway or remaps that highlight group which seems to be messing things up.

Before Command mode:
image

After Command mode:
image

@AlexvZyl
Copy link
Owner

Can we make to top heading yellow instead of red? We try to reserve red.
Other than that, this looks awesome, thanks!

@AlexvZyl Are you referring to the example with Neorg that I attached to the Pull Request? Or for the Markdown examples that @5-pebbles posted?

I am referring to the example that you attached.

Neorg seems to link to arbitrary tags (like Macro, Delimiter, etc.) for its heading highlights. So I decided to specifically designate highlight groups for markdown headings and linked them to the corresponding Neorg highlight tags. The heading highlights for markdown and neorg will now be synchronised.

H1 to H3 are bold faced. H4 is regular faced. H5-H6 is italicised.

image

Perfect, thanks!

@AlexvZyl
Copy link
Owner

Also, (sorry to spam), I've found that there are some buggy interactions with the highlights when also using folke/noice.nvim

The Heading highlights for .norg files seem to revert when you switch to command mode :. I don't know if I should debug this issue, or offload it as a noice.nvim issue?

When not using noice.nvim this issue doesn't occur, so I'm certain that it isn't a nordic.nvim issue. My guess is that noice.nvim seems to mess around with the markdown highlights in someway or remaps that highlight group which seems to be messing things up.

Before Command mode:
image

After Command mode:
image

Definitely seems like it is a noice issue. You can open an issue there and link this PR.

@juniorsundar
Copy link
Contributor Author

Also, (sorry to spam), I've found that there are some buggy interactions with the highlights when also using folke/noice.nvim
The Heading highlights for .norg files seem to revert when you switch to command mode :. I don't know if I should debug this issue, or offload it as a noice.nvim issue?
When not using noice.nvim this issue doesn't occur, so I'm certain that it isn't a nordic.nvim issue. My guess is that noice.nvim seems to mess around with the markdown highlights in someway or remaps that highlight group which seems to be messing things up.
Before Command mode:
image
After Command mode:
image

Definitely seems like it is a noice issue. You can open an issue there and link this PR.

folke/noice.nvim#656

The issue already exists there it seems, and it has been unaddressed since Nov 2023

@AlexvZyl
Copy link
Owner

Well, then that is not on us :) I will merge this this evening after I fixed our CI.

@AlexvZyl AlexvZyl merged commit 6819225 into AlexvZyl:main Apr 11, 2024
1 check passed
@AlexvZyl
Copy link
Owner

Thanks again!

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

Successfully merging this pull request may close these issues.

3 participants