Skip to content

lttr/cmp-jira

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmp-jira

nvim-cmp completion source for Jira.

screenshot

Getting started

Use your favorit plugin manager to install the plugin:

use 'https://gitlab.com/msvechla/cmp-jira.git'

Then setup the cmp source by following these steps:

require'cmp'.setup {
  sources = {
    { name = 'cmp_jira' }
  }
}

require("cmp_jira").setup()

Configuration

To authenticate to the JIRA API, an API-Key is required. Setup your API-Key at: https://id.atlassian.com/manage/api-tokens

Then set the JIRA_USER_API_KEY environment variable, e.g.:

export JIRA_USER_API_KEY='MyAPIKey'

Additionally, the following can be configured via environment variables:

export JIRA_WORKSPACE_URL=https://jira.example.com
export JIRA_USER_EMAIL=test.user@example.com

Alternatively the workspace url and email can be configured during the setup as well:

require("cmp_jira").setup({
    file_types = {"gitcommit"}
    jira = {
        -- email: optional, alternatively specify via $JIRA_USER_EMAIL
        email = "test.user@example.com"
        -- url: optional, alternatively specify via $JIRA_WORKSPACE_URL
        url = "https://jira.example.com"
        -- jql: optional, lua format string, escaped username/email will be passed to string.format()
        jql = "assignee=%s+and+resolution=unresolved"
    }
})

To filter the issues that are retrieved, you can optionally tweak the JQL.

The config.jql is treated as a lua format string, which will get the escaped username/email passed. Defaults to: assignee=%s+and+resolution=unresolved

Acknowledgements

About

Jira source for nvim-cmp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages