Giter Club home page Giter Club logo

vim-mellow's Introduction

Mellow

A warm, minimalist colorscheme for (neo)vim

This colorscheme uses only 16 distinct colors for the dark or light theme. It looks best with termguicolors enabled, but a fallback theme is also provided if this option is not enabled (e.g. in the Linux vconsole). It should work on Vim version 8 or later, and supports additional highlight groups introduced in NeoVim 0.10.

This colorscheme is not affiliated with mellow.nvim.

Screenshots taken on alacritty with LiberationMono font:

For more screenshots, check the wiki, or vimcolorschemes.com.

Installation

If you use a vim plugin manager, consult the relevant documentation. Otherwise, please add at least the autoload, colors and doc folders to your (Neo)Vim package/runtime path.

After installing the colorscheme, please read :help mellow for information on usage and available options.

Statusline integration

Two statusline plugins are currently supported:

  • Lightline : set the Lightline colorscheme to 'mellow', requires termguicolors (I don't use this statusline, so please contribute patches or at least report an issue if the integration needs to be fixed)
  • mellow statusline : my simple ASCII statusline, requires let g:mellow_user_colors = 1

Miscellaneous

This theme was first motivated by a lack of bg=light option in vim-farout, which uses a similar minimalist set of warm red and yellow colors. I wanted a light theme with moderate contrast and warm colors, that didn't make me want to change every single syntax file. To me, Mellow lies mid-way between :syntax off and popular themes like solarized or gruvbox.

And that's just the way I like it :)

Since the theme uses only 16 colors, you can use the same colors in your terminal of choice. Check the wiki for an example Alacritty theme, as well as experimental Mellow colorschemes for some other Linux stuff.

vim-mellow's People

Contributors

adigitoleo avatar mvanderkamp avatar toniz4 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

Watchers

 avatar

vim-mellow's Issues

Dark mode support

Dark mode teaser:

2020-09-17_121308_014006154

I will try to use the existing palette as much as possible, but some of the darker colors will eventually need to be replaced. So the dark theme will probably get its own 16 colors.

Inspiration and alternatives:

  • vim-farout
  • yuejiu
  • colibri - it's very purple, but the contrast/lack of really bright colors is nicei
  • aerique - for emacs, maybe it has vim support?
  • alduin
  • ... (there are many dark themes, I will need to hunt for the minimalist ones)

TODO v1.0.0

Dark mode improvements

  • Fix foreground 4 (#805B7D = terminal "blue"): it is still too dark, since it's only used for SpellRare and User9 the fix will probably only be noticable in the terminal.
  • Consider changing foreground 5 (#66292F = terminal "magenta"): it also looks dark in the terminal, but was kept from the light theme to have a consistent statusline. The fix will be more difficult in this case, because it needs to avoid clashes with light magenta (terminal 13, #8A4B53) if it is meant to be used for visual selection (of comments). Won't fix: in both light and dark modes, one of the colors has compromised visibility since it is related to the coloring of comments.
  • Better Diff* colors, e.g. more distinct DiffDelete

General improvements

  • Implement airline/lightline support, either internally or via snippets in a wiki can't find easy templates on how to do this and am not willing to dive in at the moment
  • User2 (reversed StatusLine) is not used in vim-mellow-statusline, and User1 is also not needed if StatusLine gets a gui=bold attribute. These could be used to provide optional inline warning/error highlights (e.g. for ALE via hi link's) Used for more statusline colors.
  • Consider adding options for contrast variation (requires new low/high contrast palettes, probably too much work for v1) Doesn't make much sense, contrast should be controlled at the global graphical scope.

Add Lightline support

There has been some interest in support for airline and lightline, e.g. https://www.reddit.com/r/vim/comments/itqhs9/mellow_a_bglight_theme_and_statusline_combo/gav0m9h?utm_source=share&utm_medium=web2x&context=3.

They are quite popular plugins and it would be nice to support them. This issue is open for discussion about how to do it. I think it could be part of this plugin rather than pushed to the airline/lightline repos, since that might be easier to maintain.

It will be worth checking how others have done this, e.g.:

Other examples/templates welcome.

Neovim RGB (truecolor) `:term` colors.

The embedded terminal in neovim (TUI) is still using a 256 color palette, even when inside a fully RGB terminal [1]. This means that various TUI programs could look weird when run inside neovim. This happens regardless of set termguicolors. I found that this is a known issue, which is reported to be solved for neovim 0.5 (nightly): neovim/neovim#7018

In fact, :help termopen() even says:

termopen({cmd}[, {opts}])			*termopen()*
		Spawns {cmd} in a new pseudo-terminal session connected
		to the current buffer. [...]

		The {opts} dict is similar to the one passed to |jobstart()|,
		but [...] `$TERM` is set to "xterm-256color". [...]

The workaround for right now is to run export TERM=<your-RGB-terminal>, which results in the correct colors. I currently use the following construct in $MYVIMRC which automatically forces the correct $TERM setting for neovim v0.4.4 embedded terminals (use :Terminal instead of :terminal to launch them):

function! StartTUI(prog, ...) abort "{{{2
    " Execute a TUI program a:prog with optional arguments using termopen().
    " Forces the embedded terminal to inherit $TERM from the parent neovim instance.
    if executable(a:prog)
        let l:cmdstr = a:0 ? join(extend([a:prog], a:000)) : a:prog
        exec 'enew'
        call termopen('export TERM=' .. $TERM .. '&& ' .. l:cmdstr)
    endif
endfunction

command! -nargs=* Terminal if strlen(<q-args>) > 0 | call StartTUI($SHELL, <f-args>)
            \ | else | call StartTUI($SHELL) | endif

[1]: The screenshots below show the output of msgcat --color=test|head -11 in alacritty (truecolor, above) and the embedded terminal (below).

image
image

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.