folke / styler.nvim

Simple Neovim plugin to set a different colorscheme per filetype.
Apache License 2.0
282 stars 7 forks source link

cannot select filetypes with a `-` in them #3

Closed darburgess closed 1 year ago

darburgess commented 1 year ago

Hello,

I am trying to set the colorscheme for neo-tree filetypes but it throws an error when I try to set the filetype properly.

Here is my styler config: require("styler").setup({ themes = { neorg = { colorscheme = "tokyonight-night", background = "dark" }, help = { colorscheme = "catppuccin-mocha", background = "dark" }, dashboard = { colorscheme = "tokyonight-night" }, lua = { colorscheme = "catppuccin" }, neo-tree = {colorscheme = "catppuccin"}, }, })

Thanks in-advance, I might just need to escape the dash somehow?

folke commented 1 year ago

it would be helpful to tell me the actual error?

folke commented 1 year ago

Dashes work for me.


      require("styler").setup({
        themes = {
          markdown = { colorscheme = "tokyonight-storm" },
          help = { colorscheme = "gruvbox", background = "dark" },
          -- noice = { colorscheme = "gruvbox", background = "dark" },
        },
      })
folke commented 1 year ago

I see now you have a Lua syntax error in your code. It should be ["neo-tree"] =

ca-mantis-shrimp commented 1 year ago

This did indeed fix it thank you