Comments (14)
I appreciate your answer.
I see it handles tones but I was thinking it could be nice to use love, rose,
gold, iris mainly for the Dawn theme and colder tones like pine, foam, iris for
Regular and Moon themes.
I am continuing with the tone shifting approach for now, just wanted to share
this idea.
from neovim.
Sure thing, you should only need to modify ./lua/rose-pine/theme.lua
. If you look at lines 125-130 (at the time of writing) there are some html groups, eg. htmlTag = { fg = p.subtle },
. You could add your markdown highlight groups under those with a similar format.
To find highlight groups to add, open a markdown file in neovim and do :highlight markdown<Tab>
(tab completing through all available options). You could then do :highlight markdownBold guifg=#fa8072
to see bold text in a markdown file turn salmon coloured.
Next, add the group to that theme.lua
file mentioned above, using whatever colours you want in the Rosé Pine palette. For example:
...
htmlTagName = { fg = p.foam },
-- This would be your new line
markdownBold = { fg = p.iris },
DiagnosticHint = { fg = groups.hint },
...
Finally, if you want to test locally, update your plugin config to point to your local version of the theme. Using packer:
-- use('rose-pine/neovim')
use('~/dev/local-theme')
A bit much, so please feel free to reach out with any questions. Hope this helps 😌
from neovim.
I would take a look at some other themes. For example, tokyonight.nvim has the following:
htmlH1 = { fg = c.magenta, style = "bold" },
htmlH2 = { fg = c.blue, style = "bold" },
-- mkdHeading = { fg = c.orange, style = "bold" },
-- mkdCode = { bg = c.terminal_black, fg = c.fg },
mkdCodeDelimiter = { bg = c.terminal_black, fg = c.fg },
mkdCodeStart = { fg = c.teal, style = "bold" },
mkdCodeEnd = { fg = c.teal, style = "bold" },
-- mkdLink = { fg = c.blue, style = "underline" },
markdownHeadingDelimiter = { fg = c.orange, style = "bold" },
markdownCode = { fg = c.teal },
markdownCodeBlock = { fg = c.teal },
markdownH1 = { fg = c.magenta, style = "bold" },
markdownH2 = { fg = c.blue, style = "bold" },
markdownLinkText = { fg = c.blue, style = "underline" },
I think it should be enough to try :hi markdown<Tab>
, :hi mkd<Tab>
and :hi html<Tab>
to see available groups. I wish there was a guide with more exact information, every theme seems to be different.
from neovim.
That should be handled for you by using p.foam
for example in your theme. So testing locally mkdListItemLine = { fg = p.foam }
would be similar to :hi mkdListItemLine guifg=#9ccfd8
for Rosé Pine and :hi mkdListItemLine guifg=#56949f
for Rosé Pine Dawn. Hope that makes sense 😌
Edit: this would be a good time to add your local fork to your plugins:
require('packer').startup(function(use)
use({
'~/path/to-your-fork',
config = function()
vim.cmd('colorscheme rose-pine')
end,
})
end
If using packer, this may require a :PackerCompile
every time you update a colour in theme.lua
.
from neovim.
Hi!
I came across that markdown files are not exactly covered for some reason. I'll attach screenshot tomorrow. What can I do if I'd like to help improve on this?
Best regards
from neovim.
Any additions are welcome and appreciated. If you have questions on how to add something let us know; as far as what to add, that’s up to you and your judgement 😌
We generally want to avoid non-neutral colours for large blocks of text (eg. markdown paragraphs) but headings, links etc. are all open to be added/changed.
from neovim.
It would be my first neovim theme contribution. I am interested in working on it. Is there any good resource you'd suggest before starting? I am quite busy so it might take me some time to implement it.
from neovim.
Wow. I was not expecting this detailed instructions. I really appreciate it! I am sure this puts me on the right track. 😊
from neovim.
Hi @mvllow!
Tried fidgeting with the markdown highlight groups but for some reason it wont use what I set either on the :nvim command line
nor what I set in ~/git/rose-pine-markdown-fork/lua/rose-pine/theme.lua
.
On the following theme, gruvbox-material, I can see that nvim uses the highlightgroups I would like to set but when I set it, it won't work.
Here you can see nvim with rose-pine on the left, just installed vim without config on the right. When I set highlight colors on regular vim like you showed, it works but not on nvim.
I am on v0.6.0-dev+518-g1dbbaf89b build.
Here are the highlight changes I tested and would be cool if I can see them work so I can conftinue with more highlights.
Do you have any tips on why it is not working?
from neovim.
Found the issue. For some reason the highlight group in nvim for markdown headers is not markdownH1, instead htmlH1. I'll continue the work. :)
from neovim.
What is a good way to figure out what highlight groups are I am looking for apart from trying out a bunch, then stumbling upon the ones I am looking for?
from neovim.
I think I found a cool solution to get highlight group from under the cursor.
nvim-treesitter/playground
from neovim.
What should I do in order to separate the syntax group of dark/light bg or Regular/Dawn/Night themes?
The same highlight group colors doesn't play well with dark and light themes:
We could separate the highlight groups by rose-pine variant or background light/dark just like the palette in lua/rose-pine/palette.lua
. There might be better solution, that is why I am asking you. :)
from neovim.
I would say let's stick to same colours for each variant now but I like your idea of having a tailored experience per variant. May revisit in the future – will need to refactor our other syntax themes to match.
from neovim.
Related Issues (20)
- bug: StatusLine is responsible for inactive tab highlighting HOT 1
- Treesitter capture names changed
- feature: start up performance HOT 8
- bug: netrw directories do not have colours HOT 1
- feature: add testing
- feature: Revert back color for `@variable.builtin` from "text" to "love", and add highlight for `@lsp.type.selfKeyword` HOT 6
- bug: consts not highlighted in Rust HOT 2
- bug: Highlighting in markdown files not working as expected HOT 1
- bug: custom background isn't respected when a telescope window is open after v3.0.0 HOT 1
- bug: changed windows highlight groups HOT 1
- Issue: override a selection background
- feature: add non-italics variant HOT 1
- feature: add config option to disable syntax highlighting HOT 1
- bug: Setting transparency = false still has transparency HOT 8
- bug: rust constants not highlighted HOT 2
- bug: cursor "disappears" in indent-blankline situations, with cursorline enabled HOT 5
- Support for filetype-specific styling options HOT 9
- feature: maybe set DiagnosticOk highlights HOT 1
- bug: Semantic Highlight Token Issue with Python HOT 1
- bug: weird highlight behavior (Rust) HOT 2
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.