Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background_clear for bufferline issue #70

Closed
skmtkytr opened this issue Jul 20, 2023 · 1 comment
Closed

background_clear for bufferline issue #70

skmtkytr opened this issue Jul 20, 2023 · 1 comment

Comments

@skmtkytr
Copy link
Contributor

error here

Error detected while processing /Users/kyotaro.sakamoto/dotfiles/config/nvim/init.lua:
E5113: Error while calling lua chunk: vim/_editor.lua:0: /Users/kyotaro.sakamoto/dotfiles/config/nvim/init.lua..nvim_exec2() called at /Users/kyotaro.sakamoto/dotfiles/config/nvim/init.lua:0../Users/kyotaro.saka
moto/.local/share/nvim/lazy/monokai-pro.nvim/colors/monokai-pro.lua: Vim(colorscheme):E5113: Error while calling lua chunk: ...m/lazy/monokai-pro.nvim/lua/monokai-pro/color_helper.lua:34: attempt to perform arit
hmetic on field 'r' (a nil value)
stack traceback:
        ...m/lazy/monokai-pro.nvim/lua/monokai-pro/color_helper.lua:34: in function 'lighten'
        ...ai-pro.nvim/lua/monokai-pro/theme/plugins/bufferline.lua:52: in function 'setup'
        ...vim/lazy/monokai-pro.nvim/lua/monokai-pro/theme/init.lua:58: in function 'generate_hl_groups'
        ...vim/lazy/monokai-pro.nvim/lua/monokai-pro/theme/init.lua:77: in function 'setup'
        ...hare/nvim/lazy/monokai-pro.nvim/lua/monokai-pro/init.lua:9: in function 'load'
        .../share/nvim/lazy/monokai-pro.nvim/colors/monokai-pro.lua:1: in main chunk
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        /Users/kyotaro.sakamoto/.config/nvim/lua/colorscheme.lua:11: in main chunk
        [C]: in function 'require'
        /Users/kyotaro.sakamoto/dotfiles/config/nvim/init.lua:8: in main chunk
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        /Users/kyotaro.sakamoto/.config/nvim/lua/colorscheme.lua:11: in main chunk
        [C]: in function 'require'
        /Users/kyotaro.sakamoto/dotfiles/config/nvim/init.lua:8: in main chunk

my monokai-pro configs

 {
    "loctvl842/monokai-pro.nvim",
    lazy = true,
    dependencies = {
      { "nvim-tree/nvim-web-devicons" },
      { "nvim-telescope/telescope.nvim" },
      { "nvim-tree/nvim-tree.lua" },
      { "akinsho/bufferline.nvim" },
    },
    config = function()
      require("monokai-pro").setup({
        transparent_background = true,
        terminal_colors = false,
        devicons = true, -- highlight the icons of `nvim-web-devicons`
        styles = {
          comment = { italic = true },
          keyword = { italic = true }, -- any other keyword
          type = { italic = true },    -- (preferred) int, long, char, etc
          storageclass = { italic = true }, -- static, register, volatile, etc
          structure = { italic = true }, -- struct, union, enum, etc
          parameter = { italic = true }, -- parameter pass in function
          annotation = { italic = true },
          tag_attribute = { italic = true }, -- attribute of tag in reactjs
        },
        filter = "spectrum",           -- classic | octagon | pro | machine | ristretto | spectrum
        -- Enable this will disable filter option
        day_night = {
          enable = false,      -- turn off by default
          day_filter = "pro",  -- classic | octagon | pro | machine | ristretto | spectrum
          night_filter = "spectrum", -- classic | octagon | pro | machine | ristretto | spectrum
        },
        inc_search = "background", -- underline | background
        background_clear = {
          -- "float_win",
          -- "toggleterm",
          "telescope",
          -- "which-key",
          -- "renamer",
          -- "notify",
          "nvim-tree",
          -- "neo-tree",
          "bufferline",
          -- better used if background of `neo-tree` or `nvim-tree` is cleared
        }, -- "float_win","toggleterm", "telescope", "which-key", "renamer", "neo-tree", "nvim-tree", "bufferline"
        plugins = {
          bufferline = {
            underline_selected = false,
            underline_visible = false,
          },
          indent_blankline = {
            context_highlight = "default", -- default | pro
            context_start_underline = false,
          },
        },
        ---@param c Colorscheme
        override = function(c) end,
      })
    end
  },

my bufferline configs

  -- Tab UIs
  {
    'akinsho/bufferline.nvim',
    tag = "v4.2.0",
    dependencies = 'nvim-tree/nvim-web-devicons',
    config = function()
      local bufferline = require('bufferline')
      bufferline.setup {
        options = {
          mode = "tabs", -- set to "tabs" to only show tabpages instead
          separator_style = 'slant',
          always_show_bufferline = true,
          style_preset = bufferline.style_preset.default, -- or bufferline.style_preset.minimal,
          max_name_length = 18,
          tab_size = 18,
          diagnostics = "nvim_lsp",
          diagnostics_indicator = function(count, level, diagnostics_dict, context)
            local icon = level:match("error") and " " or " "
            return " " .. icon .. count
          end,
          color_icons = true -- whether or not to add the filetype icon highlights
        }
      }
    end
  },

any solution?

@loctvl842
Copy link
Owner

I tried your config and have no problems.

image

Please update to the latest release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants