removed ros2
This commit is contained in:
parent
9fe1fed8e8
commit
bb714228b2
132
init.lua
132
init.lua
|
|
@ -1,4 +1,4 @@
|
||||||
--[[
|
--[[ini
|
||||||
=====================================================================
|
=====================================================================
|
||||||
==================== READ THIS BEFORE CONTINUING ====================
|
==================== READ THIS BEFORE CONTINUING ====================
|
||||||
=====================================================================
|
=====================================================================
|
||||||
|
|
@ -285,15 +285,6 @@ require('lazy').setup({
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local ros_distro = vim.fn.expand '$ROS_DISTRO'
|
|
||||||
|
|
||||||
local function get_ros_distro()
|
|
||||||
if ros_distro and ros_distro ~= '$ROS_DISTRO' then
|
|
||||||
return ' ' .. ros_distro
|
|
||||||
else
|
|
||||||
return ''
|
|
||||||
end
|
|
||||||
end
|
|
||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
|
|
@ -314,7 +305,7 @@ require('lazy').setup({
|
||||||
lualine_a = { 'mode' },
|
lualine_a = { 'mode' },
|
||||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||||
lualine_c = { 'filename' },
|
lualine_c = { 'filename' },
|
||||||
lualine_x = { { get_venv }, { get_ros_distro }, 'fileformat', 'filetype' },
|
lualine_x = { { get_venv }, 'fileformat', 'filetype' },
|
||||||
lualine_y = { 'progress' },
|
lualine_y = { 'progress' },
|
||||||
lualine_z = { 'location' },
|
lualine_z = { 'location' },
|
||||||
},
|
},
|
||||||
|
|
@ -404,6 +395,32 @@ require('lazy').setup({
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
dependencies = { 'williamboman/mason.nvim' },
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
'clangd',
|
||||||
|
'clang-format',
|
||||||
|
'codelldb',
|
||||||
|
'cpplint',
|
||||||
|
'cpptools',
|
||||||
|
'csharpier',
|
||||||
|
'csharp-language-server',
|
||||||
|
'lua-language-server',
|
||||||
|
'netcoredbg',
|
||||||
|
'omnisharp',
|
||||||
|
'omnisharp-mono',
|
||||||
|
'prettier',
|
||||||
|
'ruff',
|
||||||
|
'rust-analyzer',
|
||||||
|
'sonarlint-language-server',
|
||||||
|
'stylua',
|
||||||
|
},
|
||||||
|
auto_update = false,
|
||||||
|
run_on_start = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'akinsho/toggleterm.nvim', -- Improve handling neovim terminals
|
'akinsho/toggleterm.nvim', -- Improve handling neovim terminals
|
||||||
opts = {},
|
opts = {},
|
||||||
|
|
@ -1115,10 +1132,10 @@ require('lazy').setup({
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
init_selection = '<M-space>',
|
init_selection = '<C-space>',
|
||||||
node_incremental = '<M-space>',
|
--node_incremental = '',
|
||||||
-- scope_incremental = '<C-s>',
|
scope_incremental = '<C-space>',
|
||||||
node_decremental = '<M-backspace>',
|
node_decremental = '<C-\\>',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
|
|
@ -1212,7 +1229,6 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
-- PERF:
|
-- PERF:
|
||||||
-- ===================================================
|
|
||||||
-- Configurations
|
-- Configurations
|
||||||
-- ====================================================
|
-- ====================================================
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
|
|
@ -1235,18 +1251,6 @@ require('lazy').setup({
|
||||||
pid = require('dap.utils').pick_process,
|
pid = require('dap.utils').pick_process,
|
||||||
args = {},
|
args = {},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name = 'C++: ROS Node',
|
|
||||||
type = 'codelldb',
|
|
||||||
request = 'launch',
|
|
||||||
-- Might need to consider using vim.ui.input
|
|
||||||
program = function()
|
|
||||||
local pkgName = vim.fn.input('ROS Package: ', '')
|
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/install/' .. pkgName .. '/lib/' .. pkgName .. '/', 'file')
|
|
||||||
end,
|
|
||||||
cwd = '${workspaceFolder}',
|
|
||||||
stopOnEntry = false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
-- PERF:
|
-- PERF:
|
||||||
-- ====================================================
|
-- ====================================================
|
||||||
|
|
@ -1285,13 +1289,6 @@ require('lazy').setup({
|
||||||
}
|
}
|
||||||
require('nvim-dap-virtual-text').setup()
|
require('nvim-dap-virtual-text').setup()
|
||||||
require('dap-python').setup()
|
require('dap-python').setup()
|
||||||
table.insert(require('dap').configurations.python, {
|
|
||||||
type = 'python',
|
|
||||||
request = 'launch',
|
|
||||||
name = 'Python: ROS2 lauch test',
|
|
||||||
program = '/opt/ros/humble/bin/launch_test',
|
|
||||||
args = { '${file}' },
|
|
||||||
})
|
|
||||||
|
|
||||||
require('dap-python').test_runner = 'pytest'
|
require('dap-python').test_runner = 'pytest'
|
||||||
|
|
||||||
|
|
@ -1344,21 +1341,6 @@ require('lazy').setup({
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- NOTE: Here you can add additional plugins that can enhance your Neovim Journey
|
|
||||||
{ -- ROS2 related plugin
|
|
||||||
'ErickKramer/nvim-ros2',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
autocmds = true,
|
|
||||||
telescope = true,
|
|
||||||
treesitter = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
--[[INFO: Editor Settingss
|
--[[INFO: Editor Settingss
|
||||||
|
|
@ -1568,15 +1550,6 @@ vim.keymap.set(
|
||||||
{ silent = true, noremap = true, desc = 'Trouble diagnostics for current document' }
|
{ silent = true, noremap = true, desc = 'Trouble diagnostics for current document' }
|
||||||
)
|
)
|
||||||
|
|
||||||
-- ====================================================
|
|
||||||
-- Uncrustify
|
|
||||||
-- ====================================================
|
|
||||||
vim.api.nvim_create_user_command(
|
|
||||||
'Uncrustify',
|
|
||||||
-- ":!uncrustify -c /home/ekramer/evobot_ecosystem/humble_ws/ament_code_style.cfg --replace %:p -q --no-backup", {}
|
|
||||||
':!ament_uncrustify --reformat %:p',
|
|
||||||
{}
|
|
||||||
)
|
|
||||||
|
|
||||||
-- ====================================================
|
-- ====================================================
|
||||||
-- Debugging -> dap
|
-- Debugging -> dap
|
||||||
|
|
@ -1628,15 +1601,6 @@ vim.keymap.set('n', '<leader>cp', ':cprevious<CR>', { desc = 'Previous quickfix
|
||||||
-- ====================================================
|
-- ====================================================
|
||||||
vim.keymap.set('n', '<leader>mp', ':MarkdownPreview<CR>', { desc = '[M]arkdown [P]review' })
|
vim.keymap.set('n', '<leader>mp', ':MarkdownPreview<CR>', { desc = '[M]arkdown [P]review' })
|
||||||
|
|
||||||
-- ====================================================
|
|
||||||
-- nvim-ros2
|
|
||||||
-- ====================================================
|
|
||||||
vim.keymap.set('n', '<leader>li', ':Telescope ros2 interfaces<CR>', { desc = '[ROS 2]: List interfaces' })
|
|
||||||
vim.keymap.set('n', '<leader>ln', ':Telescope ros2 nodes<CR>', { desc = '[ROS 2]: List nodes' })
|
|
||||||
vim.keymap.set('n', '<leader>la', ':Telescope ros2 actions<CR>', { desc = '[ROS 2]: List actions' })
|
|
||||||
vim.keymap.set('n', '<leader>lt', ':Telescope ros2 topics<CR>', { desc = '[ROS 2]: List topics' })
|
|
||||||
vim.keymap.set('n', '<leader>ls', ':Telescope ros2 services<CR>', { desc = '[ROS 2]: List services' })
|
|
||||||
|
|
||||||
-- ====================================================
|
-- ====================================================
|
||||||
-- git_coauthors
|
-- git_coauthors
|
||||||
-- ====================================================
|
-- ====================================================
|
||||||
|
|
@ -1644,32 +1608,6 @@ vim.keymap.set('n', '<leader>ga', ':Telescope coauthors<CR>', { desc = '[G]it co
|
||||||
|
|
||||||
-- NOTE: Custon User Commads
|
-- NOTE: Custon User Commads
|
||||||
|
|
||||||
-- ====================================================
|
|
||||||
-- ROS 2 related commands
|
|
||||||
-- ====================================================
|
|
||||||
vim.api.nvim_command [[
|
|
||||||
command! ColconBuild :! CC=clang CXX=clang++ colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
|
||||||
]]
|
|
||||||
vim.api.nvim_command [[
|
|
||||||
command! -nargs=1 ColconBuildSingle :! CC=clang CXX=clang++ colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --packages-up-to <args>
|
|
||||||
]]
|
|
||||||
vim.api.nvim_command [[
|
|
||||||
command! ColconBuildDebug :! CC=clang CXX=clang++ colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug
|
|
||||||
]]
|
|
||||||
vim.api.nvim_command [[
|
|
||||||
command! -nargs=1 ColconBuildDebugSingle :! CC=clang CXX=clang++ colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug --packages-up-to <args>
|
|
||||||
]]
|
|
||||||
|
|
||||||
-- Test
|
|
||||||
vim.api.nvim_command [[
|
|
||||||
command! ColconTest :! colcon test
|
|
||||||
]]
|
|
||||||
vim.api.nvim_command [[
|
|
||||||
command! -nargs=1 ColconTestSingle :! colcon test --packages-select <args>
|
|
||||||
]]
|
|
||||||
vim.api.nvim_command [[
|
|
||||||
command! ColconTestResult :! colcon test-result --all
|
|
||||||
]]
|
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
@ -1787,3 +1725,9 @@ vim.keymap.set('c', '<C-BS>', '<C-w>', { noremap = true })
|
||||||
-- switch buffers quicker with shift+tab
|
-- switch buffers quicker with shift+tab
|
||||||
vim.keymap.set('n', '<Tab>', '<cmd>BufferLineCycleNext<CR>')
|
vim.keymap.set('n', '<Tab>', '<cmd>BufferLineCycleNext<CR>')
|
||||||
vim.keymap.set('n', '<S-Tab>', '<cmd>BufferLineCyclePrev<CR>')
|
vim.keymap.set('n', '<S-Tab>', '<cmd>BufferLineCyclePrev<CR>')
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>is", ":TSNodeIncremental<CR>", { silent = true })
|
||||||
|
vim.keymap.set("x", "<leader>is", ":TSNodeIncremental<CR>", { silent = true })
|
||||||
|
vim.keymap.set("x", "<leader>ic", ":TSScopeIncremental<CR>", { silent = true })
|
||||||
|
vim.keymap.set("x", "<leader>id", ":TSNodeDecremental<CR>", { silent = true })
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue