A plugin for Neovim allowing to jump to files that contain errors according to a terminal buffer.
This plugin has been tested with Neovim v0.9.0-dev-71-gd9a80b8e2.
Using packer:
return require("packer").startup(function(use)
use {
"JulienLecoq/nvim_terminal_errors",
requires = {
{ "wsdjeg/vim-fetch" },
{ "nvim-telescope/telescope.nvim" },
{ "nvim-lua/plenary.nvim" }
}
}
end)
In a lua file:
local nvim_terminal_errors = require('nvim_terminal_errors')
nvim_terminal_errors.setup()
local options = {
noremap = true,
silent = true
}
vim.api.nvim_set_keymap("n", "<leader>ep", '<cmd>GoToPreviousErrorFileFromTerminal<cr>', options)
vim.api.nvim_set_keymap("n", "<leader>en", '<cmd>GoToNextErrorFileFromTerminal<cr>', options)
vim.api.nvim_set_keymap("n", "<leader>ef", '<cmd>ListErrorsFromTerminal<cr>', options)
The list of projects that are supported by this plugin:
project types | Go to next error file | Go to previous error file | List errors |
---|---|---|---|
Ionic with Angular | Yes | Yes | Yes |
The following commands are exposed:
- GoToNextErrorFileFromTerminal
- GoToPreviousErrorFileFromTerminal
- ListErrorsFromTerminal
You can easily maps them to keys in your .vim or .lua configuration code.
The errors taken into account by the plugin are only the errors from the last build of the terminal.
Calling this command makes you jump to the next error file according to your cursor position and the errors reported by the terminal.
If your cursor position is at the end of the terminal, it jumps to the first error reported by the terminal.
Calling this command makes you jump to the first error file according to the errors reported by the first terminal that you opened.
Calling this command makes you jump to the previous error file according to your cursor position and the errors reported by the terminal.
If your cursor position is at the beginning of the terminal, it jumps to the last error reported by the terminal.
Calling this command makes you jump to the last error file according to the errors reported by the first terminal that you opened.
Calling this command open a list via Telescope of all the errors reported by the terminal. Clicking on an error opens the error file corresponding to that error.
Calling this command open a list via Telescope of all the errors reported by the first terminal that you opened. Clicking on an error opens the error file corresponding to that error.