Adding a custom function to run build only calls, staring with rust.

Adding a keymapping for the new build only shortcut.
This commit is contained in:
Finch 2024-03-26 19:15:32 -05:00
parent 2a97dd9901
commit 0db81d6874
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,9 @@
return {
execute = function(type)
local command_table = {
build = {
rust = 'cargo build',
},
run = {
java = 'java %',
python = 'python %',

View File

@ -51,7 +51,8 @@ vim.keymap.set('n', '<space>', 'za')
-- Keymaps for custom functions
vim.keymap.set('n', '<leader>et', function() cf.execute('test') end)
vim.keymap.set('n', '<leader>er', function() cf.execute('run') end)
vim.keymap.set('n', '<leader>eb', function() cf.execute('benchmark') end)
vim.keymap.set('n', '<leader>eb', function() cf.execute('build') end)
vim.keymap.set('n', '<leader>em', function() cf.execute('benchmark') end)
vim.keymap.set('n', '<leader>eo', ':Lexplore<CR>', options)