zaldih / themery.nvim

A colorscheme picker with live preview and persistence for neovim ✨
https://imzaldih.com/en/post/how-to-change-neovim-colorscheme-with-themery/
GNU General Public License v3.0
209 stars 8 forks source link

Bro it shows error on setting before #13

Open abrarishere opened 5 months ago

abrarishere commented 5 months ago
      name = 'night-owl',
      colorscheme='night-owl',
      before = function()
        local night_owl = require('night-owl')
        night_owl.setup({
            bold = true,
            italics = false,
            underline = true,
            undercurl = true,
            transparent_background = true,
        })
        end

Error:


Themery config has some errors in their config:
  - Before in "night-owl" should be a text.

Check "help" and fix them.
zaldih commented 5 months ago

Try this:

      name = 'night-owl',
      colorscheme='night-owl',
      before = [[
        local night_owl = require('night-owl')
        night_owl.setup({
            bold = true,
            italics = false,
            underline = true,
            undercurl = true,
            transparent_background = true,
        })]]
        end
abrarishere commented 5 months ago

No,It throws an error if we type end at the end as we have removed functions.After removing end keyword it works fine but when i switch between two themes in split it applies new color on every thing except one side. Like I have split screen in two and i change theme it will change theme but only 1 side of split will never change and on switching side it apply theme on second. May be you have understand

Sorry for my bad English

On Mon, 1 Jul 2024, 10:07 pm Juan Torres, @.***> wrote:

Try this:

  name = 'night-owl',
  colorscheme='night-owl',
  before = [[        local night_owl = require('night-owl')        night_owl.setup({            bold = true,            italics = false,            underline = true,            undercurl = true,            transparent_background = true,        })]]
    end

— Reply to this email directly, view it on GitHub https://github.com/zaldih/themery.nvim/issues/13#issuecomment-2200645841, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEUJSI2RSAYZPUYLGD37KRDZKGEFHAVCNFSM6AAAAABKF6LWW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQGY2DKOBUGE . You are receiving this because you authored the thread.Message ID: @.***>

abrarishere commented 5 months ago

What's funny is that when I move from the bottom to the top, the theme live preview works fine, but when I move from the top to the bottom, it doesn't.

On Tue, 2 Jul 2024, 5:52 am Muhammad Abrar, @.***> wrote:

No,It throws an error if we type end at the end as we have removed functions.After removing end keyword it works fine but when i switch between two themes in split it applies new color on every thing except one side. Like I have split screen in two and i change theme it will change theme but only 1 side of split will never change and on switching side it apply theme on second. May be you have understand

Sorry for my bad English

On Mon, 1 Jul 2024, 10:07 pm Juan Torres, @.***> wrote:

Try this:

  name = 'night-owl',
  colorscheme='night-owl',
  before = [[        local night_owl = require('night-owl')        night_owl.setup({            bold = true,            italics = false,            underline = true,            undercurl = true,            transparent_background = true,        })]]
    end

— Reply to this email directly, view it on GitHub https://github.com/zaldih/themery.nvim/issues/13#issuecomment-2200645841, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEUJSI2RSAYZPUYLGD37KRDZKGEFHAVCNFSM6AAAAABKF6LWW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQGY2DKOBUGE . You are receiving this because you authored the thread.Message ID: @.***>

zaldih commented 5 months ago

Interesting...

I've tried the theme but I can't replicate your problem. In fact, I think the problem might be in the themes above night-owl.

Could you share the complete Themery configuration with the other themes? In the meantime, are there any changes if you change before to after in night-owl?

abrarishere commented 5 months ago

Yes, See my configuration Is there any way so that i can use for loop if yes please send me updated version using for loop

return { 'zaldih/themery.nvim', lazy = false, priority = 1000,

config = function() require("themery").setup({ themes = {{ name = 'tokyonight', colorscheme='tokyonight', }, { name = 'material', colorscheme='material', }, { name = 'night-owl', colorscheme='night-owl', before = [[ local night_owl = require('night-owl') night_owl.setup({ bold = true, italics = false, underline = true, undercurl = true, transparent_background = true, })]] }, { name = 'rose-pine-main', colorscheme='rose-pine-main', before = [[ local rose_pine = require('rose-pine') rose_pine.setup({ variant = "main", styles = { italic = false, }, })]] },

  {
      name = 'rose-pine-moon',
      colorscheme='rose-pine-moon',
      before = [[
        local rose_pine = require('rose-pine')
        rose_pine.setup({
          variant = "moon",
          styles = {
          italic = false,
          },
        })]]
  },
  {
      name = 'rose-pine-dawn',
      colorscheme='rose-pine-dawn',
      before = [[
        local rose_pine = require('rose-pine')
        rose_pine.setup({
          variant = "dawn",
          styles = {
          italic = false,
          },
        })]]
  },
  {
      name = 'lackluster',
      colorscheme='lackluster'
  },
  {
      name = 'catppuccin-light',
      colorscheme='catppuccin',
      before = [[
        local catppuccin = require('catppuccin')
        catppuccin.setup({
            flavour = "latte",
            transparent_background = false,
            show_end_of_buffer = false,
            term_colors = false,
            styles = {
                comments = { 'bold' },
                conditionals = { 'bold' },
            },
            integrations = {
                cmp = true,
                gitsigns = true,
                nvimtree = true,
                treesitter = true,
                },
        })]]
  },

  {
      name = 'catppuccin-mocha',
      colorscheme='catppuccin',
      before = [[
        local catppuccin = require('catppuccin')
        catppuccin.setup({
            flavour = "mocha",
            transparent_background = false,
            show_end_of_buffer = false,
            term_colors = false,
            styles = {
                comments = { 'bold' },
                conditionals = { 'bold' },
            },
            integrations = {
                cmp = true,
                gitsigns = true,
                nvimtree = true,
                treesitter = true,
                },
        })]]
  },
  {
      name = 'catppuccin-frappe',
      colorscheme='catppuccin',
      before = [[
        local catppuccin = require('catppuccin')
        catppuccin.setup({
            flavour = "frappe",
            transparent_background = false,
            show_end_of_buffer = false,
            term_colors = false,
            styles = {
                comments = { 'bold' },
                conditionals = { 'bold' },
            },
            integrations = {
                cmp = true,
                gitsigns = true,
                nvimtree = true,
                treesitter = true,
                },
        })]]
  },
  {
      name = 'catppuccin-macchiato',
      colorscheme='catppuccin',
      before = [[
        local catppuccin = require('catppuccin')
        catppuccin.setup({
            flavour = "macchiato",
            transparent_background = false,
            show_end_of_buffer = false,
            term_colors = false,
            styles = {
                comments = { 'bold' },
                conditionals = { 'bold' },
            },
            integrations = {
                cmp = true,
                gitsigns = true,
                nvimtree = true,
                treesitter = true,
                },
        })]]
  }},
  themeConfigFile = "~/.config/nvim/lua/abrar/core/themery.lua",
  livePreview = true,
})

end, }

On Tue, 2 Jul 2024, 1:11 pm Juan Torres, @.***> wrote:

Interesting...

I've tried the theme but I can't replicate your problem. In fact, I think the problem might be in the themes above night-owl.

Could you share the complete Themery configuration with the other themes? In the meantime, are there any changes if you change before to after in night-owl?

— Reply to this email directly, view it on GitHub https://github.com/zaldih/themery.nvim/issues/13#issuecomment-2202266777, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEUJSIYR7GCIKMUNDY6GCDLZKJOC7AVCNFSM6AAAAABKF6LWW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBSGI3DMNZXG4 . You are receiving this because you authored the thread.Message ID: @.***>