clo4 / tree-sitter-kitty-conf

Tree-sitter grammar for kitty.conf files
2 stars 1 forks source link

My lazy.nvim plugin spec #1

Open pearagit opened 2 months ago

pearagit commented 2 months ago

Hi! I found your repo from googling "treesitter kitty conf" and works great! I figured I should share my plugin spec for anyone's future reference:

-- lua/plugins/treesitter.lua
return {
  {
    'nvim-treesitter/nvim-treesitter',
    dependencies = {
      { 'clo4/tree-sitter-kitty-conf' },
    },
    opts = function(_, opts)
      -- register the kitty.conf parser
      ---@diagnostic disable-next-line: inject-field
      require('nvim-treesitter.parsers').get_parser_configs().kittyconf = {
        install_info = {
          url = 'https://github.com/clo4/tree-sitter-kitty-conf',
          files = { 'src/parser.c' },
          branch = 'main',
          generate_requires_npm = false,
          requires_generate_from_grammar = false,
        },
      }
      vim.list_extend(opts.ensure_installed, {
        -- ...
        'kittyconf'
      })
    end,
  },
}

Thanks!

pearagit commented 2 months ago

Just realized the detected filetype is bash, so this is only a starting point, and not a fully working example yet 🫠

clo4 commented 2 months ago

To be totally honest I entirely forgot this was still public - glad to see you're getting use out of it! From what I remember this repo was left in a pretty unfinished state, so (not promises) I'll see if I can get around to updating it :) At the moment I'm pretty tied up with a different project, so once I get it to a better state I'll reassess.