-
Notifications
You must be signed in to change notification settings - Fork 45
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
added support for markdown.nvim | changed some native markup/down highlights TBD if final #154
Open
avih7531
wants to merge
2
commits into
AlexvZyl:main
Choose a base branch
from
avih7531:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+25
−6
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ local M = {} | |
function M.get_groups() | ||
local C = require 'nordic.colors' | ||
local O = require('nordic.config').options | ||
local U = require 'nordic.utils' | ||
|
||
local G = {} | ||
|
||
|
@@ -348,17 +349,17 @@ function M.get_groups() | |
G['@text.note'] = { link = 'Note' } | ||
--- Markup | ||
G['@markup'] = { link = '@none' } | ||
G['@markup.emphasis'] = { italic = true } | ||
G['@markup.emphasis'] = { fg = C.orange.base, italic = true } | ||
G['@markup.environment'] = { link = 'Macro' } | ||
G['@markup.environment.name'] = { link = 'Type' } | ||
G['@markup.heading'] = { link = 'Title' } | ||
G['@markup.heading.1'] = { fg = C.yellow.base, bold = true } | ||
G['@markup.heading.2'] = { fg = C.orange.base, bold = true } | ||
G['@markup.heading.3'] = { fg = C.magenta.base, bold = true } | ||
G['@markup.heading.1'] = { fg = C.yellow.base } | ||
G['@markup.heading.2'] = { fg = C.orange.base } | ||
G['@markup.heading.3'] = { fg = C.magenta.base } | ||
G['@markup.heading.4'] = { fg = C.green.base } | ||
G['@markup.heading.5'] = { fg = C.blue2, italic = true } | ||
G['@markup.heading.6'] = { fg = C.cyan.base, italic = true } | ||
G['@markup.italic'] = { italic = true } | ||
G['@markup.heading.5'] = { fg = C.blue2 } | ||
G['@markup.heading.6'] = { fg = C.cyan.base } | ||
5-pebbles marked this conversation as resolved.
Show resolved
Hide resolved
|
||
G['@markup.italic'] = { fg = C.orange.base, italic = true } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as |
||
G['@markup.list'] = { link = '@operator' } | ||
G['@markup.list.checked'] = { link = 'Field' } | ||
G['@markup.list.markdown'] = { fg = C.yellow.base, bold = true } | ||
|
@@ -370,7 +371,7 @@ function M.get_groups() | |
G['@markup.math'] = { link = 'Special' } | ||
G['@markup.raw'] = { link = 'String' } | ||
G['@markup.raw.markdown_inline'] = { bg = C.black2, fg = C.fg } | ||
G['@markup.strong'] = { bold = true } | ||
G['@markup.strong'] = { fg = C.orange.base, bold = true } | ||
Comment on lines
-373
to
+374
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as |
||
G['@markup.strikethrough'] = { strikethrough = true } | ||
G['@markup.underline'] = { underline = true } | ||
-- TSX | ||
|
@@ -523,6 +524,24 @@ function M.get_groups() | |
G.WhichKeySeperator = {} | ||
G.WhichKeyValue = {} | ||
|
||
-- Markdown.Nvim. | ||
G.RenderMarkdownH1 = { link = '@markup.heading.1' } | ||
G.RenderMarkdownH2 = { link = '@markup.heading.2' } | ||
G.RenderMarkdownH3 = { link = '@markup.heading.3' } | ||
G.RenderMarkdownH4 = { link = '@markup.heading.4' } | ||
G.RenderMarkdownH5 = { link = '@markup.heading.5' } | ||
G.RenderMarkdownH6 = { link = '@markup.heading.6' } | ||
G.RenderMarkdownH1Bg = { bg = U.blend(C.yellow.base, C.grey0, 0.3) } | ||
G.RenderMarkdownH2Bg = { bg = U.blend(C.orange.base, C.grey0, 0.3) } | ||
G.RenderMarkdownH3Bg = { bg = U.blend(C.magenta.base, C.grey0, 0.3) } | ||
G.RenderMarkdownH4Bg = { bg = U.blend(C.green.base, C.grey0, 0.3) } | ||
G.RenderMarkdownH5Bg = { bg = U.blend(C.blue2, C.grey0, 0.3) } | ||
G.RenderMarkdownH6Bg = { bg = U.blend(C.cyan.base, C.grey0, 0.3) } | ||
5-pebbles marked this conversation as resolved.
Show resolved
Hide resolved
|
||
G.RenderMarkdownCode = { bg = C.black2 } | ||
G.RenderMarkdownCodeInline = { bg = C.gray1 } | ||
G.RenderMarkdownTableHead = { fg = C.cyan.dim } | ||
G.RenderMarkdownTableRow = { fg = C.cyan.base } | ||
|
||
return G | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see why you did this, and I think it makes it easier to edit the rendering (by making those things noticeable). However, I think it should just occur on rendered text because it is distracting otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. That might just be a personal preference, but I noticed it adds so much to a markdown if emphasis, bold, and italic are different colors. Will see if I can make it only apply to rendered text