Skip to content

telescope.nvim extension for browsing, installing, and uninstalling tree-sitter parsers

License

Notifications You must be signed in to change notification settings

roycrippen4/telescope-treesitter-info.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Telescope Treesitter Info

👎 Are you tired of the crappy experience navigating the builtin TSInstallInfo window? 👎

👍 When you just want to search to see if you have a parser installed? 👍

🚫 But instead you have to scroll, scroll, and scroll some more until you find the language you're looking for? 🚫

shit
Searching to see if a parser is installed with TSInstallInfo

What if I told you it didn't have to be this way?

What if I told you that you could browse, install, and uninstall treesitter parsers from the comfort telescope.nvim?

🚀 WELL SEARCH NO MORE! 🚀

Well, I guess I mean continue to search, but specifically for treesitter parsers inside telescope... I digress.

INTRODUCING Treesitter Install Info!

good
Searching for a parser using :Telescope treesitter_info

Installation

Setup is easy! Add the extension as a dependency to your telescope config!

-- using lazy.nvim
return {
  'nvim-telescope/telescope.nvim',
  ...
  dependencies = {
    'nvim-lua/plenary.nvim',
    'roycrippen4/telescope-treesitter-info.nvim',
  },
  ...
  config = function()
    require('telescope').load_extension('treesitter_info')
  end

Configuration

We don't support configuration! SIMPLE

Usage

Use the following command to open the treesitter parser list in telescope!

:Telescope treesitter_info

We also took the liberty of deciding you don't need the old command anymore now that you are stuck in our walled garden!

🔥 You can also use the original command to open the parser list in telescope because we overrode it! 🔥

:TSInstallInfo

You can even set it up as a keymap!!!

  vim.keymap.set(
      'n',
      '<leader>fp',
      '<cmd> Telescope treesitter_info <CR>',
      { desc = 'Find treesitter info' }
  )

Not Convinced?

Well let me tell you this!

You can select a language with <cr> in telescope's results and the plugin will autofill the corresponding Install or Uninstall command for that language in the command line!

Let's say you don't have the java parser installed (because who would, am I right?).

You can open the picker using any of the methods described above, search for java, and hit <cr>.

The plugin will have autofilled :TSInstall java. All you have to do now, and this is important, is hit <esc> to exit, because why the fuck would you install the parser for java! It's that simple!

About

telescope.nvim extension for browsing, installing, and uninstalling tree-sitter parsers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages