Repository navigation
Expand file tree
/
Copy pathatlassian.lua
More file actions
63 lines (61 loc) · 2 KB
/
Copy pathatlassian.lua
File metadata and controls
63 lines (61 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
local has_creds = vim.env.JIRA_API_TOKEN or vim.env.CONFLUENCE_API_TOKEN
if not has_creds then
return {}
end
return {
"FoamScience/conflira.nvim",
dependencies = { "folke/snacks.nvim", "MunifTanjim/nui.nvim", "grapp-dev/nui-components.nvim" },
ft = "csf",
cmd = {
"JiraSearch",
"JiraMe",
"JiraCreate",
"JiraRefresh",
"JiraStatus",
"JiraBoard",
"JiraTodoToIssue",
"JiraSearchEdit",
"ConfluenceSearch",
"ConfluenceSpaces",
"ConfluencePages",
"ConfluenceRecent",
"ConfluenceCreate",
"ConfluenceSearchCQL",
"ConfluenceCQLFilter",
"ConfluenceRefresh",
"ConfluenceStatus",
"ConfluenceSearchEdit",
},
config = function()
vim.schedule(function()
if vim.env.JIRA_API_TOKEN then
require("jira-interface").setup({
auth = {
url = vim.env.JIRA_URL,
email = vim.env.JIRA_EMAIL,
token = vim.env.JIRA_API_TOKEN,
},
display = {
mode = "vsplit",
width = "60%",
},
default_project = vim.env.JIRA_PROJECT or nil,
})
end
if vim.env.CONFLUENCE_API_TOKEN or vim.env.JIRA_API_TOKEN then
require("confluence-interface").setup({
auth = {
url = vim.env.CONFLUENCE_URL or vim.env.JIRA_URL,
email = vim.env.CONFLUENCE_EMAIL or vim.env.JIRA_EMAIL,
token = vim.env.CONFLUENCE_API_TOKEN or vim.env.JIRA_API_TOKEN,
},
display = {
mode = "vsplit",
width = "60%",
},
default_space = vim.env.CONFLUENCE_SPACE or nil,
})
end
end)
end,
}