Code Monkey home page Code Monkey logo

neovim's Introduction

Rosé Pine for Neovim

All natural pine, faux fur and a bit of soho vibes for the classy minimalist

Getting started

Install rose-pine/neovim using your favourite plugin manager:

paq-nvim

{ "rose-pine/neovim", as = "rose-pine" }

lazy.nvim

{ "rose-pine/neovim", name = "rose-pine" }

Gallery

Rosé Pine

Rosé Pine with Neovim

Rosé Pine Moon

Rosé Pine Moon with Neovim

Rosé Pine Dawn

Rosé Pine Dawn with Neovim

Options

Important

Configure options before setting colorscheme.

Rosé Pine has three variants: main, moon, and dawn. By default, vim.o.background is followed, using dawn when light and dark_variant when dark.

Colour values accept named colours from the Rosé Pine palette, e.g. "foam", or valid hex, e.g. "#fa8072".

require("rose-pine").setup({
    variant = "auto", -- auto, main, moon, or dawn
    dark_variant = "main", -- main, moon, or dawn
    dim_inactive_windows = false,
    extend_background_behind_borders = true,

    enable = {
        terminal = true,
        legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
        migrations = true, -- Handle deprecated options automatically
    },

    styles = {
        bold = true,
        italic = true,
        transparency = false,
    },

    groups = {
        border = "muted",
        link = "iris",
        panel = "surface",

        error = "love",
        hint = "iris",
        info = "foam",
        note = "pine",
        todo = "rose",
        warn = "gold",

        git_add = "foam",
        git_change = "rose",
        git_delete = "love",
        git_dirty = "rose",
        git_ignore = "muted",
        git_merge = "iris",
        git_rename = "pine",
        git_stage = "iris",
        git_text = "rose",
        git_untracked = "subtle",

        h1 = "iris",
        h2 = "foam",
        h3 = "rose",
        h4 = "gold",
        h5 = "pine",
        h6 = "foam",
    },

    highlight_groups = {
        -- Comment = { fg = "foam" },
        -- VertSplit = { fg = "muted", bg = "muted" },
    },

    before_highlight = function(group, highlight, palette)
        -- Disable all undercurls
        -- if highlight.undercurl then
        --     highlight.undercurl = false
        -- end
        --
        -- Change palette colour
        -- if highlight.fg == palette.pine then
        --     highlight.fg = palette.foam
        -- end
    end,
})

vim.cmd("colorscheme rose-pine")
-- vim.cmd("colorscheme rose-pine-main")
-- vim.cmd("colorscheme rose-pine-moon")
-- vim.cmd("colorscheme rose-pine-dawn")

Note

Visit the wiki for plugin configurations and recipes.

Contributing

We welcome and appreciate contributions of any kind. Create an issue or start a discussion for any proposed changes. Pull requests are encouraged for supporting additional plugins or treesitter improvements.

Feel free to update the wiki with any recipes.

neovim's People

Contributors

0oastro avatar akthe-at avatar atinylittleshell avatar briandipalma avatar danymat avatar eaxly avatar fitrh avatar fvrests avatar hectorovid avatar ikws4 avatar kabouzeid avatar kaplanz avatar matze avatar mrtnvgr avatar mvllow avatar myuwi avatar nanozuki avatar niamhferns avatar nicejji avatar ntbbloodbath avatar pcattori avatar piersolenski avatar pkcarreno avatar rgruyters avatar slotos avatar swiegandt avatar theimerj avatar tommarien avatar wahyuwiyoko avatar will avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

neovim's Issues

Support bufferline highlights config

Hello !

Bufferline seems to be widely used, and I tried it out (loving it so far!): https://github.com/akinsho/bufferline.nvim (cc @akinsho)
It seems that rose-pine does not support it, so I wanted to add some custom highlights to it.
But it seems that placing the highlights directly in the rose-pine plugin does not work.

It seems to do with the way the plugin wants us to change highlights:

    lua require'bufferline'.setup{
        highlights = {
            fill = {
                guifg = '<color-value-here>',
                guibg = '<color-value-here>',
            },
            background = {
                guifg = '<color-value-here>',
                guibg = '<color-value-here>'
            },
...

Do you have any ideas how we could make this work ?

A simple highlight to check is with BufferLineFill

Support nvim-cmp

Hi,

A recent merge of nvim-cmp make use of new floating windows. It would be great to have the theme support it. I'm aware that I could do it my own but it will not be in sync with your mind.

The following is its highlight group:

CmpItemAbbr
CmpItemMenu
CmpItemKind
CmpItemAbbr
CmpItemAbbrDeprecated 
CmpItemAbbrMatch
CmpItemAbbrMatchFuzzy 

Link for reference: https://github.com/hrsh7th/nvim-cmp#highlights

Thank you.

Hot reload lualine theme when variant changes

Hi, I am a user of macOS. My system support auto light & dark mode switch.
So I'm writing a script to match the system theme, by using the vim command:
:lua require('rose-pine.functions').select_variant('dawn') at running time.

But I noticed that command will only change the theme of the editor,
the lualine theme still keeps the original...

I'm a noob of vim and Lua, I think I do not refresh the lualine theme correctly.
Could you please give me some advice...? Thank you very much : )

Better highlights for rose-pine

Hello !

I stumbled across this, and I thought it would be cool to have a better appearance of rose-pine, for each type of CmpKind.

What do you think ?

Support toggleterm highlights config

A recent patch to toggleterm made it so that, without any custom config, the background would always be dark even if neovim started up with bg=light and rose-pine correctly auto went into the light alt.

I was able to work around the problem with the help of the toggleterm author akinsho/toggleterm.nvim#166 (comment)

However, I don't really understand vim theming. I'm happy to keep my manual fixes for toggle term. But also I know rose-pine sets some themes for other plugins. Should (or even can?) rose-pine come with specific settings for toggleterm?

Diff highlighting is hard to read

Hi, the Diff highlighting is not good. I understand the theme goes for a minimal approach but the background should be properly highlighted in redish or greenish way depending on the additions and deletions. The diff area looks kind of broke. It's not really usable, I tend to change to another theme briefly so I can really see easily the changes and reason about them.

As an example, this is tokyonight:

image

And this is rose-pine:

image

It's quite difficult to see because the rose.foam color is already used heavily for other things. I think background colors for the diffs are pretty much needed.

On another hand, terrific work. The theme is lovely, this is the only flaw I see.

Adding a license

Hello there, I'm planning to use your amazing color scheme in my project that contains multiple color schemes, and I can't use your project legally unless you have a license, I'd recommend adding it as soon as possible, it's almost a most to get your rights in the open source world.

I personally recommend MIT license as it's the simplest one and it's very easy to handle and use in other projects as well, you won't need to think much about that license as it gives you all the right to have your project the way you want it to be.

Thanks, With all respect.

Change in current line highlight

Hello, it seems that some of the last commits did change the line highlight (in moon theme).

If is a lot stronger than before:

Before:

Capture d’écran 2022-02-08 à 15 38 38

After:

image

Is this part of a ref? If so, I preferred the default behavior.

PS: I really love the new highlights for telescope 💘

(canary) errors without setup function

I figured I'd help try canary, and ran into this when starting nvim after adding branch = "canary" to packer, and doing a sync and compile:

Error detected while processing /Users/will/code/dotfiles/config/nvim/init.lua:
E5113: Error while calling lua chunk: /Users/will/.config/nvim/lua/user/colorscheme.lua:7: Vim(lua):E5108: Error executing lua .../site/pack/pack
er/start/rose-pine/lua/rose-pine/util.lua:8: Expected lua string
stack traceback:
        [C]: in function 'nvim_get_color_by_name'
        .../site/pack/packer/start/rose-pine/lua/rose-pine/util.lua:8: in function 'get_color'
        .../site/pack/packer/start/rose-pine/lua/rose-pine/util.lua:22: in function 'blend'
        ...site/pack/packer/start/rose-pine/lua/rose-pine/theme.lua:28: in function 'get'
        .../site/pack/packer/start/rose-pine/lua/rose-pine/init.lua:141: in function 'colorscheme'
        [string ":lua"]:1: in main chunk
        [C]: in function 'cmd'
        /Users/will/.config/nvim/lua/user/colorscheme.lua:7: in main chunk
        [C]: in function 'require'
        /Users/will/.config/nvim/init.lua:14: in main chunk
stack traceback:
        [C]: in function 'cmd'
        /Users/will/.config/nvim/lua/user/colorscheme.lua:7: in main chunk
        [C]: in function 'require'
        /Users/will/.config/nvim/init.lua:14: in main chunk
Press ENTER or type command to continue
nvim --version
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@BigSur

Wildcard tag

From: wbthomason/packer.nvim#797 (comment)

Tried setting:

		use({
			"rose-pine/neovim",
			-- "~/Developer/neovim/",
			as = "rose-pine",
			config = function()
				vim.g.rose_pine_variant = "moon"
				vim.g.rose_pine_bold_vertical_split_line = true
				vim.g.rose_pine_disable_float_background = true
				vim.cmd([[ colorscheme rose-pine ]])
			end,
            tag = "v1.0.0-canary.*"
		})

Seems to work well on my end. I did:

git tag -l "v1.0.0*"
v1.0.0-canary.0

Maybe it's your git version here that's causing bugs (seems to require git > 1.9.2, as shown here: https://github.com/junegunn/vim-plug/pull/476/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R92)

Color Column

The color of the set colorcolumn is, I believe default, which is ugly. I would suggest to make it the same color line length in Vs-code

Weird display when installing with vim-plug

I'm using vim-plug to install every nvim plugins.

I installed the color scheme like this inside my .vimrc

call plug#begin(stdpath('data') . '/plugged')
	...
	Plug 'rose-pine/neovim', {'as': 'rose-pine', 'tag': 'v1.*'}
call plug#end()

colorscheme rose-pine

Rose-pine is correctly installed but there is a weird black background and not the correct colors displayed.

Screenshot 2022-07-10 at 4 17 01 PM

Did I miss something ?

Font used in screenshots?

What it says in the title; it's a very clean font and I found myself wondering where it might be found, but couldn't find crediting information for it anywhere in the README.

Clean up group api

It would be nice to partially override all group values. Currently, the exposed groups focus on fg only, eg. comment = '#282828'. This becomes less intuitive when considering a float group where we may want float = { fg = '#fff', bg = '#000' }.

Plan

  • Custom groups accept a table with some or all of the following: { fg = '', bg = '', style = '' }
  • Default config should be used as a fallback for any omitted values

Before

vim.g.rose_pine_colors = {
  comment = '#282828'
}

After

vim.g.rose_pine_colors = {
  comment = { fg = '#282828' }
}

Move config to lua setup

Idea

local palette = require('rose-pine.palette')
require('rose-pine').setup({
    variant = 'dawn',
    colors = {
        comment = palette.foam,
    }
})

Unfortunately, I am struggling to get this working properly without a dependency loop. With my attempts, config.lua requires palette.lua to set default colours and palette.lua requires config.lua for the variant to return the correct palette.

First search result is unreadable when over cursorline highlight

I'm guessing it's these two, but when I inc search and the value is on the cursor line I can barely see the inc search. It also affects highlight yank, IMO inc search should stand out more.

CursorLine = { bg = p.highlight_inactive },
IncSearch = { bg = p.highlight },

Little problem for FloatWin with Rosé Pine Dawn

image

I see the 'rose pine' to set highlight like this:

FloatBorder  guifg=#dfdad9
FloatTitle   links to FloatBorder
NormalFloat  guifg=#575279 guibg=#fffaf3

Because don't set FloatBorder(FloatTitle)'s background, and the FloatTitle uses the background color from NormalFloat. The text becomes hard to recognize.

Lsp_signature support

I don't know if it's possible to do, but lsp_signature is quite weird with rose-pine. I would love true rose pine support for it.

Btw, can you for your wonderful work, I use rose pine dawn daily and fully ! Such a beautiful color scheme .

W18: Invalid character in group name

I installed rose-pine with vim-plug (Plug 'rose-pine/neovim', { 'as': 'rose-pine' }) and I get the following error when running neovim:

Error detected while processing nvim_exec() called at /Users/jjantdev/.vim/plugged/rose-pine/colors/rose-pine.vim:3:
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name

Relevant init.vim lines:

lua <<EOF
require('rose-pine').setup({
  dark_variant = 'main',
})

vim.cmd("colorscheme rose-pine")
EOF

Neovim version:

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by _nixbld3

Allow colour overrides

Please add a lua api to override custom colors. I know we can always do hi! ... but it would be neat if I could do it using api native to the plugin.

implement theme overrides

Hello!

As stated on other issues, I do really enjoy this theme and I'm using it daily but I'm still not happy with the diffs. I've been thinking that theme overrides should be implemented as other themes do, it's a missing feature within rose pine. The example I copy below does work but I think your theme is coded very nicely so I just give my tip for you to implement it instead of sending a proper PR:

theme.lua:

image

config.lua:

image

So then users can make stuff like this on their nvim configs:

image

Add support for markid plugin

Hello, it's been a while ! I hope you're doing good

I propose this small snippet to add to the plugin dir (plugin: https://github.com/David-Kunz/markid)

                local function palette()
                    local p = require("rose-pine.palette")
                    return { p.foam, p.rose, p.iris }
                end

                require("nvim-treesitter.configs").setup({
                    markid = {
                        -- enable = true, (will not be in the PR, but necessary for test)
                        colors = palette(),
                    },
                })

If you're okay and you like it, i can open a PR to implement the idea

Do not set variant nor background unless explicitly requested

In response to setting background option (n)vim reloads colors.
With init.lua handling of background matching, switching to light background enforces dawn variant, ignoring further background changes.

A straightforward fix would be to remove the code that sets variant and background without user input and update palette.lua to factor in vim.o.background value when deciding on palette.

As an improvement, I'd like to propose two modes of operation:

  • respect background (default) - if variant doesn't match background, use default variant for background
  • respect variant - if variant doesn't match background, set matching background

barbar buffer picking

image
barbar has implemented a buffer-picking option which highlights the key required to select the particular buffer.

the highlight color seems a bit jarring (see image). can this color be changed to be more cohesive with the colorscheme?

Use separate color for syntax elements and comments

At the moment the color scheme uses the same color as for comments which is also used for inlay hints. This makes longer combinator chains in Rust really hard to read:

example

Ideally there would be separate colors for syntactical elements and comments to better differentiate them.

Options are not being applied

Hello !

I just saw that you moved the config to a Lua setup call, however I have some options that are not being applied.

My Lua config:

		use({
			"rose-pine/neovim",
			as = "rose-pine",
			config = function()
				require("rose-pine").setup({
                    dark_variant = 'moon',
                    bold_vert_split = true,
                    disable_float_background = true,
                    disable_background = true,
                    dim_nc_background = true
                })
				vim.cmd([[ colorscheme rose-pine ]])
			end,
		})

I think that all options are not applied except the dark_variant option.
Could you take a look ?

Config is ignored

Hello, I have a setup such as:

require("rose-pine").setup({
    --- @usage 'main' | 'moon'
    dark_variant = "moon",
    bold_vert_split = false,
    dim_nc_background = false,
    disable_background = false,
    disable_float_background = false,
    disable_italics = false,
})

However, the main dark variant is the one being applied, regardless of the fact I'm specifying the moon variant on the config.

Furthermore, I tried disabling italics with disable_italics = false but this also does not work, which makes me think none of the config is being loaded.

If it helps, you can find my whole config here; you may want to look at lua/plugins/init.lua for packer config and the list of plugins, and lua/plugins/configs/colorschemes/rose-pine/init.lua for this plugin's config.

Any ideas?

Update lua treesitter highlighting

A recent treesitter update included a new lua parser. There are several elements that look off now, including some punctuation not being themed correctly

Screen Shot 2022-01-20 at 19 31 40

Vertical Split Column

When I do a vertical Split I see a gray column like in the screenshot below. Is there a way to make it the same color of the background? Or Maybe a thin line just a little bit darken than the background?
I think those are the foldercolumn.

Thanks.

theme_lua_____config_nvim_plugged_github-nvim-theme_lua_github-theme__-_NVIM

Black Background

Hi, I have been using your color scheme for the past few days and I am quite liking it. However I like a complete black background, Is it possible to set a black background. I am using Ubuntu on WSL. Some how the background seems to have a slight bluish/purpleish tinge which it to my dislike.

Feature request: auto pick light theme if background=light on start

Neovim will look at the terminal's background color at boot and set background=light automatically if you happen to have a light terminal background at boot. folke/tokyonight.nvim will default to the light version of the theme if background is light, which together with the new neovim feature is very nice. When my terminals are bright during the day, neovim is bright, and when my terminals are dark at night, neovim is dark without me having to do anything. Can you please add this feature to Rosé Pine?

Strange highlight on entire blocks

Hey, thanks for the great theme.

I've just installed and I'm getting an odd highlight around entire code blocks/bracket pairs as I move the cursor, which I've not seen in any other theme before:

Screen.Recording.2022-07-20.at.21.37.11.mov

I can't find anything about this in any nvim docs—it doesn't seem to be related to cursorline or cursorcolumn which are the only things using the actual hex code in the theme, as I'm able to turn those on/off as expected.

Any ideas on how to disable this?! I find it really distracting. Thanks 🙌

Edit: this could be due to background colours mismatching between terminal and vim itself, anyone know how to resolve this?!

Lack of contrast in popups?

Honestly I've no idea if this thing is even called a popup but I notice all these type of popup like windows in Neovim have no contrast so it's hard to tell their bounding rectangle:

image

Compare that to:

image

Change non current window background colours?

I believe NightFox changes non current neovim windows another colour (option alt_nc I think).

It would be nice if they became muted so it's easier to spot the currently active window.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.