Update: Based on the discussion here and in other places I added the following (well, technically I did something different in my colorscheme, but in the end it translates to that)

vim.api.nvim_set_hl(0, 'Normal', {})

This reverts the weird text and background colors to the previous behavior of … not setting them.


With update 0.10 Neovim behavior changed regarding text color and background color.

I use a color theme that does not set those and previously this worked perfectly fine. Neovim simply used the font color defined in the terminal and had a transparent background.

Now the background is #14161b and the font color is #e0e2ea. Neither of the colors is configured ANYWHERE in my whole setup. Neither in the colorscheme, nor in my terminal configuration, nor in my Neovim configuration.

Is there a sane way to revert this to the old behavior? (i.e. use the font color configured in the terminal’s configuration and use transparent background.)

  • www-gem@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    This is my neovim visual config:

        -- General colors
        vim.api.nvim_set_hl( 0, "Normal", { bg = "none" } )
        vim.api.nvim_set_hl( 0, "NormalFloat", { bg = "none" } )
        vim.api.nvim_set_hl( 0, "NormalNC", { bg = "none" } )
        vim.api.nvim_set_hl( 0, "LineNr", { bg = "none" } )
        vim.api.nvim_set_hl( 0, "SignColumn", { bg = "none" } )
        vim.api.nvim_set_hl( 0, "Folded", { bg = "#4b4b4b" } )
        vim.api.nvim_set_hl( 0, "FoldColumn", { bg = "none" } )
        vim.api.nvim_set_hl( 0, "Visual", { fg = "#000000", bg = "#de935f" } )
        vim.api.nvim_set_hl( 0, "NotifyBackground", { bg = "#000000" } )```
    
        -- Spell checking 
        vim.api.nvim_set_hl( 0, "SpellLocal", { fg = default } )
        vim.api.nvim_set_hl( 0, "SpellRare", { fg = default } )
        vim.api.nvim_set_hl( 0, "SpellCap", { fg = "#de935f", italic=true } )
        vim.api.nvim_set_hl( 0, "SpellBad", { fg = "#ff0000", italic=true } )
       
       -- Markdown
       vim.api.nvim_set_hl( 0, "htmlBold", { bold=true } )
       vim.api.nvim_set_hl( 0, "htmlItalic", { italic=true } )
       vim.api.nvim_set_hl( 0, "htmlStrike", { fg = "#ff0000", strikethrough=true } )
    

    vim.api.nvim_set_hl( 0, “Normal”, { bg = “none” } ) is probably what would work for you.

  • LeroyJenkins@lemmy.world
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    7 months ago

    vim.opt.background = false

    vim.opt.guicfg = { background = “transparent”, foreground = “#<idiots_color_hex>”, }

    • 𝘋𝘪𝘳𝘬@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      vim.opt.background = false

      Unfortunately no.

      E5113: Error while calling lua chunk: vim/_options.lua:0: Invalid option type 'b
      oolean' for 'background', should be string 
      

      When setting to any string (a literal 'false', a hex color string with or without #, etc.) it prints

      E5113: Error while calling lua chunk: vim/_options.lua:0: E474: Invalid argument 
      

      vim.opt.guicfg = { background = “transparent”, foreground = “#<idiots_color_hex>”, }

      Also no.

      E5113: Error while calling lua chunk: vim/_options.lua:0: Invalid option (not found): 'guicfg'