MantisBT plugin for Neovim.
- Supports multiple MantisBT hosts
- Fully reactive UI powered by nui-components
- Cross-platform (Linux, macOS, Windows)
- Configurable issue properties
- Optional pagination for large result sets
- Assign issues to users
- Create and delete issues
- Open issues directly in your browser
- Update status, priority, severity, and category
- Add notes to existing issues
- Toggle grouped/ungrouped view
- Default filter setting (all, assigned, reported, monitored, unassigned)
- Select individual issues or select all on current page
- Batch change status, priority, severity, category
- Batch assign users to multiple issues
- Batch delete issues
- Assign users
- Set category
- Add summary and description
- Inspect full issue details
- Browse issue notes
- Review issue history
- Neovim 0.9.0 or higher
- MantisBT server with REST API enabled (v2.0+)
This plugin relies on the following external dependencies:
{
'whleucka/mantis.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
'MunifTanjim/nui.nvim',
'grapp-dev/nui-components.nvim',
},
config = function()
require('mantis').setup({
hosts = {
{
name = "My MantisBT",
url = "https://mantis.example.com",
env = "MANTIS_API_TOKEN",
},
},
})
end,
}use {
'whleucka/mantis.nvim',
requires = {
'nvim-lua/plenary.nvim',
'MunifTanjim/nui.nvim',
'grapp-dev/nui-components.nvim',
},
}To use mantis.nvim, you need to configure your MantisBT hosts. Each host entry should include:
name(optional): Display name for the hosturl(required): Base URL of your MantisBT instance (without/api/rest)tokenorenv(required): Either a hardcoded API token or the name of an environment variable containing the token
- Log in to your MantisBT instance
- Go to My Account β API Tokens
- Create a new token with appropriate permissions
- Copy the token and store it securely
require('mantis').setup({
hosts = {
{
name = "Work MantisBT",
url = "https://mantis.company.com",
env = "WORK_MANTIS_TOKEN", -- Reads from environment variable
},
{
name = "Personal MantisBT",
url = "https://my.mantisbt.org",
token = "your-api-token-here", -- Hardcoded token (less secure)
},
},
}){
debug = false,
hosts = {},
add_note = {
ui = {
width = 60,
height = 10,
},
keymap = {
quit = "q",
submit = "<C-CR>",
}
},
create_issue = {
ui = {
width = 80,
height = 21,
},
keymap = {
quit = "q",
submit = "<C-CR>",
}
},
view_issue = {
ui = {
width = 80,
height = 30,
},
keymap = {
quit = "q",
refresh = "r",
add_note = "N",
scroll_down = "j",
scroll_up = "k",
page_down = "<C-d>",
page_up = "<C-u>",
goto_top = "gg",
goto_bottom = "G",
}
},
view_issues = {
default_filter = 'all', -- 'all', 'assigned', 'reported', 'monitored', 'unassigned'
limit = 42, -- issues per page
ui = {
width = 150,
height = 50,
columns = {
priority = 1,
id = 7,
severity = 10,
status = 24,
category = 12,
summary = 69,
updated = 10
}
},
keymap = {
next_page = "L",
prev_page = "H",
add_note = "N",
create_issue = "C",
delete_issue = "D",
open_issue = "o",
assign_issue = "a",
change_summary = "S",
change_status = "s",
change_severity = "v",
change_priority = "p",
change_category = "c",
filter = "f",
toggle_group = "g",
help = "?",
refresh = "r",
quit = "q",
-- Selection
toggle_select = "<Space>",
select_all = "<C-a>",
clear_selection = "<C-x>",
-- Batch operations
batch_status = "bs",
batch_priority = "bp",
batch_severity = "bv",
batch_category = "bc",
batch_assign = "ba",
batch_delete = "bD",
}
},
issue_status_options = {},
issue_severity_options = {},
issue_priority_options = {},
issue_resolution_options = {},
issue_reproducibility_options = {},
issue_filter_options = {
'all',
'assigned',
'reported',
'monitored',
'unassigned',
},
priority_emojis = {
complete = "β
",
immediate = "π₯",
urgent = "β οΈ",
high = "πΊ",
low = "π»",
normal = "π΅",
default = "π£",
},
}| Command | Description |
|---|---|
:MantisIssues |
Open the issues view |
:MantisIssue <id> |
View a specific issue by ID |
:MantisSelectHost |
Switch between configured hosts |
| Key | Action |
|---|---|
? |
Toggle help |
<CR> |
View issue details |
o |
Open issue in browser |
C |
Create new issue |
N |
Add note to issue |
D |
Delete issue |
a |
Assign issue |
s |
Change status |
p |
Change priority |
v |
Change severity |
c |
Change category |
S |
Change summary |
f |
Filter issues |
g |
Toggle group by project |
r |
Refresh |
L |
Next page |
H |
Previous page |
q |
Quit |
| Key | Action |
|---|---|
<Space> |
Toggle select issue |
<C-a> |
Select all issues on page |
<C-x> |
Clear selection |
| Key | Action |
|---|---|
bs |
Batch change status |
bp |
Batch change priority |
bv |
Batch change severity |
bc |
Batch change category |
ba |
Batch assign user |
bD |
Batch delete issues |
| Key | Action |
|---|---|
j / k |
Scroll down/up |
<C-d> / <C-u> |
Page down/up |
gg / G |
Go to top/bottom |
N |
Add note |
r |
Refresh |
q |
Quit |
Make sure the environment variable specified in your env config is set before starting Neovim:
export MANTIS_API_TOKEN="your-token-here"
nvim- Verify your MantisBT URL is correct (should not include
/api/rest) - Check that your API token has the required permissions
- Ensure your MantisBT server has the REST API enabled
- Check your network connection
- Verify the MantisBT server is accessible
- If using HTTPS, ensure SSL certificates are valid
## License
MIT