Ros plugin for neovim
require("lazy").setup({
...
{
'tadachs/ros-nvim',
config = function() require("ros-nvim").setup({only_workspace = true}) end,
dependencies = { "nvim-lua/plenary.nvim" },
},
...
})You have to install treesitter and
telescope separately. To install the
grammar for syntax highlighting run TSInstall ros.
Rosedcommand with tab completionRosSourcecommand for resourcing your workspaceRoscdcommand for changing directory- follow
$(find ...)links in launch files - show message and service definitions in floating windows
- autocmcds for setting
rosfiletype for definition files (messages, services, actions), sets commentstring as well - (optional) telescope finder
- (optional) syntax highlighting for definition using treesitter
- supports ROS2
{
lazy_load_package_list = true,
telescope = {
ws_filter = "current",
},
treesitter = {
enabled = true,
},
commands = {
enabled = true,
},
autocmds = {
enabled = true,
},
}-- telescope finder
vim.keymap.set('n', '<leader>tr', '<cmd>Telescope ros ros<cr>', { noremap = true })
-- follow links in launch files
vim.keymap.set('n', '<leader>rol', function() require("ros-nvim.ros").open_launch_include() end, { silent = true, noremap = true })
-- show definition for interfaces (messages/services) in floating window
vim.keymap.set('n', '<leader>rdi', function() require("ros-nvim.ros").show_interface_definition() end, { silent = true, noremap = true })