ishan9299 / nvim-solarized-lua Goto Github PK
View Code? Open in Web Editor NEWsolarized colorscheme in lua for nvim 0.5
License: MIT License
solarized colorscheme in lua for nvim 0.5
License: MIT License
Error sign in ALE a bit "noisy"?
Which i achived by adding this to the bottom of my config:
hi Error cterm=bold,reverse ctermfg=23 ctermbg=203 gui=bold,reverse guifg=#002b36 guibg=#dc322f
If changed in the theme it would be this and im not sure why fg vs bg seems swapped.
syntax['Error'] = {fg=colors.base03,bg=colors.red,style='bold,reverse'}
I am not sure, if this is the place to ask for this but; is it possible to have different colours depending not only on Treesitter
, but on both Treesitter
& Syntax
?
Here is a sample code from Ruby on Rails project:
scope :ok_world, -> { where(ok_world: true) }
def hello
puts "Hello world!"
end
Treesitter Enabled | Treesitter Disabled |
---|---|
![]() |
![]() |
call [266, 2] - [266, 41]
method: identifier [266, 2] - [266, 7]
arguments: argument_list [266, 8] - [266, 41]
simple_symbol [266, 8] - [266, 14]
lambda [266, 16] - [266, 41]
body: block [266, 19] - [266, 41]
call [266, 21] - [266, 39]
method: identifier [266, 21] - [266, 26]
arguments: argument_list [266, 26] - [266, 39]
pair [266, 27] - [266, 38]
key: hash_key_symbol [266, 27] - [266, 32]
value: true [266, 34] - [266, 38]
method [268, 2] - [270, 5]
name: identifier [268, 6] - [268, 11]
call [269, 4] - [269, 23]
method: identifier [269, 4] - [269, 8]
arguments: argument_list [269, 9] - [269, 23]
string [269, 9] - [269, 23]
string_content [269, 10] - [269, 22]
scope |
hello |
---|---|
![]() |
![]() |
As shown above, Treesitter thinks both scope
and hello
is a TSFunction
–which is technically true–, but they are not only a TSFunction
:
scope
is a TSFunction
and rubyMacro
.hello
is a TSFunction
and rubyMethodName
.I hoped maybe lua/solarized/solarized-normal/highlights.lua
file is similar to how CSS works and assigning Ruby specific colours after TSFunction
like
syntax['TSFunction'] = syntax['Function']
syntax['rubyClassBlock'] = {fg=colors.red}
syntax['rubyMacro'] = {fg=colors.red}
can change how words are highlighted, but that did not work.
So, is it possible to override Treesitter
highlighting with the Syntax
one, whenever it is needed?
Hey,
I just switched from NeoSolarized to this theme to get support for nvim-treesitter in the colorscheme.
One thing that I directly noticed that I miss is to have the tab bar stylized in solarized colors.
In this theme the tab bar is gray:
However in NeoSolarized the tab bar looked more pleasing by applying the solarized colors to the tab bar as well:
It would be great to have a nicer tab bar! :)
searching everywhere, usually plugins have example config files to tweak from. but this one has none. so i dont know how to really disable italics. even after trying to tweak it many times.
I'd like to be able to add additional highlights (for example for https://github.com/lukas-reineke/indent-blankline.nvim), in way that respects the solarized color palate.
it white is available (seems like it from the screenshots), please add instructions to switch in readme.
I updated my plugins and it suddenly stopped working.
I get the following error when starting neovim: Cannot find color scheme 'solarized'
.
Other colorscheme works properly.
Cheers on the colorscheme ! I've noticed colour differences between terminals initiated from within Neovim relative to a regular terminal. I think it's because of missing terminal_color_
definitions in the colour scheme. Would you be interested in adding these ?
Hi,
Due to a color variable non initialized to 'none'
, the string.format
fails when initializing any theme:
Error detected while processing /home/anthony/.local/share/nvim/plugged/nvim-solarized-lua/colors/solarized.lua:
E5113: Error while calling lua chunk: ...gged/nvim-solarized-lua/lua/solarized/utils/init.lua:31: bad argument #5 to 'format' (string expected, got nil)
stack traceback:
[C]: in function 'format'
...gged/nvim-solarized-lua/lua/solarized/utils/init.lua:31: in function '?'
...ed-lua/lua/solarized/solarized-normal/highlights.lua:417: in function 'load_syntax'
...nvim/plugged/nvim-solarized-lua/colors/solarized.lua:52: in main chunk
Forcing the guisp
and style
to default to 'none'
fixes the issue.
in commit 0a076f8 the .vim files in colors/
were removed.
When I tried to use master I got the error E185: Cannot find color scheme 'solarized'
If I use commit aae6d8d then it works as expected
Was this intentional? Am I doing something wrong?
my init.lua
require('packer').startup(function()
use 'wbthomason/packer.nvim' -- Packer can manage itself
use "ishan9299/nvim-solarized-lua"
end)
vim.opt.termguicolors = true
vim.opt.background = "dark"
vim.cmd("colorscheme solarized")
tl;dr similar to darkplus.nvim add support for https://github.com/SmiteshP/nvim-navic
Running lazyvim with neotest for python, while toggling the summary the folder names are a light blue and hard to read. Looks fine in dark mode.
It would make it easier to contribute if everyone was on the same page style-wise.
A .lua-format
file would be fantastic for this, or whatever other formatter you use.
Hello,
As per the title I've been unable to get the dark mode to work. I am using iTerm2 with Solarized Dark colour scheme. I can't find any references in README.md that tells me how to change to a dark theme, so perhaps it's not implemented?
:version
NVIM v0.5.0
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-u
nused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-pro
tector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVI
M_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210702-97973-1wtbty6/neovim-0.5.0/build/config -I/tmp/neovim-20210702-97973
-1wtbty6/neovim-0.5.0/src -I/opt/homebrew/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/opt/homebre
w/opt/gettext/include -I/tmp/neovim-20210702-97973-1wtbty6/neovim-0.5.0/build/src/nvim/auto -I/tmp/neovim-20210702-97973-1wtbty6/n
eovim-0.5.0/build/include
Compiled by [email protected]
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.5.0/share/nvim"
Run :checkhealth for more info
removing them fixes the colorscheme resetting issue i mentioned.
There are 3 other colorschemes that vim-solarized8 provides.
All schemes also need to be added..
There seems to have been some breaking changes in the new 0.8 release.
When enabling tree-sitter highlights, almost all the code gets highlighted (mostly blue) and only the ;
stays in the normal text color. I joined a screenshot of lua code, but it is the same with python (almost all in blue) and for .vim
files it is mostly orange/yellow but still almost nothing in the normal color.
Using Neovim v0.5.0-dev+1318-g61aefaf29, I would like to darken whitespace characters using the solarized
variant, but I don't know how to do that.
I used a minimal init.test.vim
for reproducing it (by running nvim -u ~/.config/nvim/init.test.vim --noplugin init.test.vim
) with the following content:
" Load plugin
let $PLUGIN_DIRECTORY = '~/.local/share/nvim/plugtest'
set runtimepath^=$PLUGIN_DIRECTORY/indent-blankline.nvim
" Initialize
set termguicolors
colorscheme solarized
" Whitespace
set list
lua vim.g.solarized_visibility = 'low'
highlight Whitespace guifg=black
" Test area
" trailing space
" trailing tabs
Screenshots (notice how vim.g.solarized_visibility = 'low'
is actually much brighter than normal
):
Another thing to note is that highlight Whitespace guifg=black
doesn't seem to do anything, only if I :source
the init file while Neovim is already running.
I'm using this theme with neovim 0.8.x from the nightly releases and alacritty as my terminal.
Overall it looks neat, but I have an issue with the LSP completion (I use https://github.com/hrsh7th/nvim-cmp/ for autocompletion) floating list of suggestions which are "invisible" in light mode. Dark mode works well.
My config is as shown on the screenshots above, and I have:
vim.o.termguicolors = true
vim.o.background = 'dark'
in my init.lua
(I toggle the background value to light
as needed).
Any tips on what might be causing this? I haven't managed to figure out which element in the theme I need to change to fix this, but happy to send a PR if someone can point me in the right direction.
This only happens with solarized-high
, the other variants work fine.
this goes against solarized being easy on the eyes. in lua, strings are highlighted yellow when i cursor over them using the standard lsp.
CursorLineNr highlights get messed when using the solarized theme with visibility high. Also affects solarized-light.
I was using this on a remote server, and it was terribly laggy. By disabling this color scheme nvim became much snappier
Hello,
I have started using this plugin for markdown with nvim-treesitter and noticed that strikethrough ~~STRIKETHROUGH~~
, italic *ITALIC*
and bold **BOLD**
seem to work badly.
This one seems to be a bug, the line defining the strikethrough highlight is:
syntax['Strikethrough'] = {fg=colors.base01,strikethrough=true}
instead of
syntax['Strikethrough'] = {fg=colors.base01,style='strikethrough'}
It is later used in syntax['@text.strike'] = syntax['Strikethrough']
.
This one might be a bug but I'm not sure, the line defining the italic highlight is:
syntax['@text.emphasis'] = {fg=colors.base1,bg=colors.base03,style='bold'}
instead of
syntax['@text.emphasis'] = {fg=colors.base1,bg=colors.base03,style=utils.italics()}
Both italics and bold set bg=colors.base03
, this doesn't seem like a bug but it is a little ugly, maybe this should be removed?
The other solarized variants do not contain the -- Text {{{
section with the syntax['@text...
highlight definitions, I'm not sure if this is intentional or not.
In Neovim v0.5.0-dev+1318-g61aefaf29, using the solarized
variant of this theme, the borders become inverted while using FTerm and SnipRun.
At the beginning, I didn't know where to report this because I also noticed this behaviour in older, built-in colorschemes, so I opened an issue with screenshots and steps to reproduce for FTerm and later for SnipRun.
This is working great! Thanks! However just ran into one issue: the TermCursorNC highlight group is missing (using on nvim 0.5 stable):
:hi TermCursorNC
TermCursorNC xxx cleared
It is defined in vim-solarized8 theme.
For rationale on why TermCursorNC is needed, please see http://vimcasts.org/episodes/neovim-terminal-paste/
Thanks!
What license is this released under please?
it's grey with dotted black line in between. is there something that gives a sort of smoother blend?
I have this error message when starting neovim under windows with this pluggin enabled:
E5113: Error while calling lua chunk: ...led-packages\opt\nvim-solarized-lua\colors\solarized.lua:1: module 'solarized.solarized-normal.highlights' not found:
no field package.preload['solarized.solarized-normal.highlights']
no file '.\solarized\solarized-normal\highlights.lua'
no file 'C:\tools\neovim\Neovim\bin\lua\solarized\solarized-normal\highlights.lua'
no file 'C:\tools\neovim\Neovim\bin\lua\solarized\solarized-normal\highlights\init.lua'
no file '.\solarized\solarized-normal\highlights.dll'
no file 'C:\tools\neovim\Neovim\bin\solarized\solarized-normal\highlights.dll'
no file 'C:\tools\neovim\Neovim\bin\loadall.dll'
no file '.\solarized.dll'
no file 'C:\tools\neovim\Neovim\bin\solarized.dll'
no file 'C:\tools\neovim\Neovim\bin\loadall.dll'
Hello, and thank you for your contribution. I have a question (comes from the issue I've faced). How to setup/configure the plugin using packer properly? My issue is that I couldn't specify plugin options, such as, vim.g.solarized_italics, vim.g.solarized_termtrans and so on. Even default option for italic font doesn't work for me.
After nvim has loaded the values are set to the options correctly, but it's probably performed after the color scheme has loaded. With tradition color scheme plugins (not lua) I didn't see such an issue. May you @ishan9299 pls a bit elaborate in this regard?
I use alacritty, which for some reason nvim doesn't pick up from the terminfo database, and so I got 8-bit colors. But the colors I got are not correct. Your convert.js
does not use the correct formula:
The biggest problems here:
New implementation (I changed the console.log()
line to demo the truecolor as well):
let c8 = 16 + Math.floor(red*6/256)*36 + Math.floor(green*6/256)*6 + Math.floor(blue*6/256)
// don't shoot me i'm not a js dev
console.log("\x1b[38;2;" + red + ";" + green + ";" + blue + "m" + str + "\x1b[0m -> \x1b[38;5;" + c8 + "m" + c8);
Hi, I've noticed some differences between nvim-solarized-lua (flat) and solarized8 (or the original solarized)
Here's a reference of how the original solarized looks like (there are no symbols, but it's should look like a string):
The main thing is that having symbols rendered as a type make it a bit hard to read (and different from the original).
There are other two differences, but for me they don't change much: The def/end color and true
being different from a string.
can you highlight EndOfBuffer to completely hide the tildes?
sometimes whitespace and certain text backgrounds don't properly become transparent
working correctly:
(im using my pager because the init.vim for it is very small, my main nvim config doesnt have vim-solarized8 installed so there's no chance its a plugin conflict, im just using it to illustrate how it should look wrt transparency)
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.