Comments (13)
Ok good !
Feel free to come back if you think that something is missing :)
from nixvim.
Yes, I was able to get it working now. Not totally sure what changed, but it works. :)
from nixvim.
@dwarfmaster we switched to using nvim-base16
for the backend of colorschemes.base16
.
When #504 will be merged, your setup can become:
programs.nixvim = {
colorschemes.base16 = {
enable = true;
colorscheme = colors.scheme-slug;
customColorScheme = {
base00 = "#${colors.base00}";
base01 = "#${colors.base01}";
base02 = "#${colors.base02}";
base03 = "#${colors.base03}";
base04 = "#${colors.base04}";
base05 = "#${colors.base05}";
base06 = "#${colors.base06}";
base07 = "#${colors.base07}";
base08 = "#${colors.base08}";
base09 = "#${colors.base09}";
base0A = "#${colors.base0A}";
base0B = "#${colors.base0B}";
base0C = "#${colors.base0C}";
base0D = "#${colors.base0D}";
base0E = "#${colors.base0E}";
base0F = "#${colors.base0F}";
};
};
};
from nixvim.
If you're using an official base16 theme, you can do :
{ config, lib, ... }:
{
programs.nixvim = {
colorschemes.base16 = {
enable = true;
useTruecolor = true;
colorscheme = lib.toLower config.colorScheme.name;
};
};
}
For a more robust solution, it would be possible to package nvim-base16 and create a colorscheme based on it, since it directly takes the individual colors as arguments. I'll probably do that at some point if I find the time.
from nixvim.
Thanks!
from nixvim.
I'll probably open a PR at some point, but for the moment you can copy this to set it up. Another advantage is that you can just set lualine theme to base16
and it just works with this plugin.
from nixvim.
alright, I'll try that.
from nixvim.
Is it relevant to add this feature to nixvim ?
If so, I guess I could easily port the implementation of @dwarfmaster or look for another solution.
Else, we might close this issue.
from nixvim.
I will go ahead and close it - so far the implementation that @dwarfmaster has is working for me.
from nixvim.
If you're using an official base16 theme, you can do :
{ config, lib, ... }: { programs.nixvim = { colorschemes.base16 = { enable = true; useTruecolor = true; colorscheme = lib.toLower config.colorScheme.name; }; }; }For a more robust solution, it would be possible to package nvim-base16 and create a colorscheme based on it, since it directly takes the individual colors as arguments. I'll probably do that at some point if I find the time.
@dwarfmaster Does this also work for a custom Base16 setup, when i copy your code, it gives me an infinite recursion error.
from nixvim.
I had also noticed infinite recursion with that setup, even when using an official colorscheme (gruvbox-dark-hard in my case).
from nixvim.
@jhilker98, I tested the following setup and it works fine:
{ config, lib, ... }:
{
programs.nixvim = {
colorschemes.base16 = {
enable = true;
useTruecolor = true;
colorscheme = "gruvbox-dark-hard";
};
};
}
Do you still encounter this issue ?
from nixvim.
If you're using an official base16 theme, you can do :
{ config, lib, ... }: { programs.nixvim = { colorschemes.base16 = { enable = true; useTruecolor = true; colorscheme = lib.toLower config.colorScheme.name; }; }; }For a more robust solution, it would be possible to package nvim-base16 and create a colorscheme based on it, since it directly takes the individual colors as arguments. I'll probably do that at some point if I find the time.
@dwarfmaster Does this also work for a custom Base16 setup, when i copy your code, it gives me an infinite recursion error.
I am now using something based on nvim-base16
that supports custom colors, see here. Note that I am not using nix-colors
anymore but stylix
, however the code should be easy to adapt.
from nixvim.
Related Issues (20)
- [BUG] Example for plugins.gitsigns.onAttach is wrong / confusing
- [BUG] Unable to set obsidian.followUrlFunc using if statement
- [PLUGIN REQUEST] virt-column.nvim
- [BUG] attribute 'base16-nvim' missing HOT 2
- [BUG] Can't install nixvim, "option ... does not exist" HOT 2
- [BUG] Alpha terminal
- [BUG] Conform plugin does not install enabled formatters
- [PLUGIN REQUEST] indent-o-matic
- [PLUGIN REQUEST] direnv.vim
- [PLUGIN REQUEST] crates.nvim HOT 2
- Running `nix flake show` fails to evaluate on `x86_64-linux` HOT 2
- [BUG] copilot-vim.keymaps do not work properly
- LSP keymaps should use keymap-helpers submodule HOT 2
- [PLUGIN REQUEST] lsp-status.nvim
- [BUG] error: `phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`. HOT 14
- [PLUGIN REQUEST] vim-sandwich
- [BUG] Treesitter configures custom parser lists incorrectly HOT 4
- plugins/whichkey: Support window and layout fields HOT 1
- [PLUGIN REQUEST] <auto-save fork>
- [BUG] [nvim-cmp] unable to pass a function in sources entryFilter HOT 3
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 nixvim.