updated and add vi-mongo plugin

This commit is contained in:
Oluwatobi 2024-11-14 11:25:16 +01:00
parent a717a047cb
commit 0dbbd56652
5 changed files with 295 additions and 167 deletions

View file

@ -16,3 +16,21 @@ require('lspconfig').jdtls.setup {
},
},
}
local function is_java_file()
return vim.bo.filetype == 'java'
end
-- Function to run the Maven Wildfly redeploy command
local function redeploy_wildfly()
vim.cmd '!mvn wildfly:redeploy'
end
-- Create the keymap
vim.keymap.set('n', '<leader>jd', function()
if is_java_file() then
redeploy_wildfly()
else
vim.notify 'This keymap only works for Java files.'
end
end, { desc = 'Redeploy Wildfly' })