cameron-wags / rainbow_csv.nvim

Neovim port of mechatroner/rainbow_csv
MIT License
80 stars 4 forks source link

AstroVim & Lazy => Invalid plugin spec error #8

Closed Robert-M-Muench closed 1 year ago

Robert-M-Muench commented 1 year ago

I'm using AstroVim, which uses Lazy to load and manage plugins. I have the following config:

return {
  -- You can also add new plugins here as well:
  -- Add plugins, the lazy syntax
  -- "andweeb/presence.nvim",
  -- {
  --   "ray-x/lsp_signature.nvim",
  --   event = "BufRead",
  --   config = function()
  --     require("lsp_signature").setup()
  --   end,
  -- },
  "sitiom/nvim-numbertoggle",
  {

  },
  "nanotee/zoxide.vim",
  {

  },
  "cameron-wags/rainbow_csv.nvim",
  {
    lazy = false,
    config = true,
    ft = {
         'csv',
         'tsv',
         'csv_semicolon',
         'csv_whitespace',
         'csv_pipe',
         'rfc_csv',
         'rfc_semicolon'
     },
     cmd = {
         'RainbowDelim',
         'RainbowDelimSimple',
         'RainbowDelimQuoted',
         'RainbowMultiDelim'
     },
  },
}

which gives an error during load:

Fehler beim Ausführen von "/Users /robby/.config/nvim/init.lua":
Invalid plugin spec {
cmd = { "RainbowDelim", "RainbowDelimSimple", "RainbowDelimQuoted", "RainbowMultiDelim" },
config = true,
ft = { "csv", "tsv", "csv_semicolon", "csv _whitespace", "csv_pipe", "pfc_csv", "rfc_semicolon" },
lazv = false
Betätigen Sie die EINGABETASTE oder geben Sie einen Befehl in

And I don't understand why there is an Invalid plugin spec. Any hint?

cameron-wags commented 1 year ago

I appreciate you wanting to try this plugin!

When configuring plugins with Lazy, the plugin name & options should be in the same set of curly braces.

From the readme:

{
    'cameron-wags/rainbow_csv.nvim',
    config = true,
    ft = {
        'csv',
        'tsv',
        'csv_semicolon',
        'csv_whitespace',
        'csv_pipe',
        'rfc_csv',
        'rfc_semicolon'
    },
    cmd = {
        'RainbowDelim',
        'RainbowDelimSimple',
        'RainbowDelimQuoted',
        'RainbowMultiDelim'
    }
}

You can look in my config for an example with more context.

Robert-M-Muench commented 1 year ago

Thanks... the AstroNvim example of user.lua missed the additional braces. Got it now...