Skip to content

DukicDev/telescope-jsw.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telescope-jsw.nvim

Warning

Still in development!
No tests were written during the development of this plugin.
Just install and pray

telescope-jsw.nvim is a Neovim plugin that integrates with the Jira Cloud API to bring Jira ticket search and preview capabilities directly to your editor. Built on Telescope.nvim, this plugin enables you to quickly search, view, and interact with Jira issues, all from within Neovim.

Features

  • Jira Issue Search: Search Jira issues by key, summary, and status
  • Issue Preview: View the summary, assignee, description, and status of any Jira ticket directly within Telescope's preview window.
  • Customizable Search Filters: Use Jira Query Language (JQL) to set specific filters for your search.
  • Enhanced Navigation: Quickly navigate through your tasks and issues without leaving the editor.
  • Open Jira: Selecting an Entry opens the issue in your beloved Jira UI.

Installation

Important

Your User Mail and Jira API Token need to be set as environment variables.
JIRA_USER_EMAIL and JIRA_API_TOKEN

Requirements

Installation with lazy.nvim

Add telescope-jsw.nvim to your lazy.nvim setup:

require("lazy").setup({
  {
    "DukicDev/telescope-jsw",
    dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim" },
    config = function()
      require("telescope").load_extension("telescope-jsw")
      require("telescope-jsw").setup({
        url = "https://your-jira-domain.atlassian.net",
        jql = "project = MYPROJECT AND status = 'To Do'", -- Optional: Set default JQL filter, otherwise "assignee = currentUser() and Status != Done" is used
        cache_duration = 60 * 5 -- Optional: Cache duration in seconds. Default is 60*10 (10min)
      })
    end,
  },
})

Usage

require('telescope').extensions['telescope-jsw'].jira_issues()

gets the jira issues and opens telescope.

Options when calling jira_issues()

{
  no_cache = true -- Default: false
}

Note

The cache file is stored at vim.fn.stdpath("cache")/telescope_jsw_cache.json

To easily launch the plugin, add a keymap in your Neovim init.lua:

vim.keymap.set(
    "n",
    "<leader>ji",
    "<cmd>lua require('telescope').extensions['telescope-jsw'].jira_issues()<CR>",
    { noremap = true, silent = true }
)
vim.keymap.set(
    "n",
    "<leader>jr",
    "<cmd>lua require('telescope').extensions['telescope-jsw'].jira_issues({no_cache = true})<CR>",
    { noremap = true, silent = true }
)

This keymap binds the telescope-jsw extension to leader-ji, allowing you to quickly open the Jira issue search within Neovim. leader-jr always sends a request, refreshing the cache.

Screenshot

Screenshot

Planned Features

  • Caching
  • Transitioning Issues

About

Search through your Jira Issues in Nvim with telescope.

Topics

Resources

License

Stars

Watchers

Forks

Languages