Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-12-02 13:42:07 -05:00
lua/cmp_jira Update defaults, remove print 2025-12-02 13:42:07 -05:00
tests fix(cmp): add more tests 2022-02-28 22:47:35 +01:00
cmp-jira-screenshot.png docs(cmp): add screenshot 2022-02-28 23:14:32 +01:00
LICENSE initial commit 2022-02-24 00:37:31 +01:00
README.md Add note about fork 2025-12-02 13:35:05 -05:00

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

This repo was forked from https://gitlab.com/msvechla/cmp-jira