nvf icon indicating copy to clipboard operation
nvf copied to clipboard

transparency not working with any `base16`-theme

Open d4ve89 opened this issue 4 months ago • 1 comments

I have confirmed that this is a bug related to nvf

  • [x] This is a bug, and not an user error or a support request. I understand that my issue will be closed if it is not a bug in nvf.
  • [x] I have checked the issues tab and confirmed that my issue has not yet been reported. I understand that my issue will be closed if it is a duplicate.

Description

no transparency with base16-themes.

when setting vim.theme.name to "base16", and after defining vim.theme.base-colors with either nix-colors (base-colors = config.colorScheme.palette; with for example config.colorScheme = nix-colors.colorSchemes.ayu-mirage) or via stylix or even individually from base00 to base0F,

the theme colors get applied correctly, but there is no transparency even when vim.theme.transparency = true;

Installation Method

Home Manager Module (homeManagerModules.default)

Installation Method (Other)

No response

nvf Version

main

Reproduction steps

  1. programs.nvf.vim.transparent = true;
  2. programs.nvf.vim.theme = "base16";
  3. define programs.nvf.vim.base-colors either with the palette of nix-colors.colorSchemes, with stylix, or manually from base00 to base0F.

Expected behavior

transparency should be possible with theme.name = "base16";

Actual Behavior

the theme is applied correctly with base16 colors, but without transparency

System Information

❯ nix-info --markdown
 - system: `"aarch64-darwin"`
 - host os: `Darwin 24.6.0, macOS 15.6`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.28.3`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/store/10fj12280sppcwf846lnh7v0cbd0cpvb-source`

Relevant log output

https://termbin.com/cg96

d4ve89 avatar Aug 18 '25 19:08 d4ve89

Second. The relevant configuration can be found in nvf/modules/plugins/theme/supported-themes.nix.

Currently, there is no transparent configuration for base16:

base16 = {
    setup = {base16-colors, ...}: ''
      -- Base16 theme
      require('base16-colorscheme').setup(${toLuaObject base16-colors})
    '';
  };

As a temporary workaround, I applied the following configuration to make the background transparent:

[Edit] The configuration should use entryAfter ["theme"] to ensure it properly overrides the default theme settings.

{
  inputs,
  ...
}: let
  inherit (inputs.nvf.lib.nvim.dag) entryAfter;
in {
  programs.nvf = {
    settings.vim.luaConfigRC.transparentTheme = entryAfter [ "theme" ] 
     # lua
     ''
       vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
       vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
       vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" })
       vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "none" })
    '';
    # Other configuration ...
  };
}

DACHXY avatar Sep 05 '25 08:09 DACHXY