Skip to content

Dkendal/nvim-kitty

Repository files navigation

Nvim-Kitty

Neovim plugin to pull paths, quickfix data from another kitty terminal split.

image

Installation

Using vim-plug

Plug 'dkendal/nvim-kitty'

Using dein

call dein#add('dkendal/nvim-kitty')

Using packer.nvim

use { 'dkendal/nvim-kitty' }

Using lazy.nvim

-- init.lua:
require('lazy').setup({
    -- ...
    {
        'dkendal/nvim-kitty',
	dependencies = {
		"nvim-telescope/telescope.nvim",
	},
	opts = {},
	maps = {
	    { "<leader>pq", "<plug>(kitty-paths)" }
	}
    }
}, opts)

Usage

Nvim-kitty provides a telescope plugin to select a path from the kitty terminal. There is an API that you can use to build your own UI if you wish.

Integrations

Telescope

You can enable the telescope plugin by running:

require("telescope").load_extension("kitty")

Then you can use the :Telescope kitty command to open the telescope picker.

Null-ls

Adds diagnostics from the nearest kitty window.

require("null-ls").setup({
	sources = {
	    require("nvim-kitty.null-ls")
	}
})

Keybindings

There are no default keybindings, instead bind the provided plug mappings to your liking.

-- Requires telescope (not the extension though)
vim.keymap.set("n", "<leader>pq", "<plug>(kitty-paths)", { noremap = true, silent = true })

Commands

  • :KittyPaths - Open the telescope picker to select a path from the kitty terminal.

  • :KittyInfo - Print diagnostic information, current filetype, available parsers, etc.

Available Parsers

  • rust
    • cargo
  • elixir
    • mix
  • vimgrep (grep, ripgrep, ag, etc)
  • generic (for any tool that outputs a list of paths)

Contributing

Don't see a parser for your tool or laguage? Feel free to open a PR or issue.

Use one of the existing parsers from ./lua/nvim-kitty/parsers/ as a template and register it in ./lua/nvim-kitty/parsers/init.lua.

About

Extract paths from a neighbouring Kitty split

Resources

Stars

Watchers

Forks