You've already forked dotfiles
feat: A working state during the transfer between the old neovim
configurations and using newer built-in functionality in the 0.12.x versions of Neovim. Further work is needed for treesitter updates, cleanup of the conversion work and testing to verify old functionality isn't lessened to get the benefits of a cleaner config and vastly faster load times.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
return {
|
||||
execute = function(type)
|
||||
-- Mapping of filetypes to commands
|
||||
local command_table = {
|
||||
build = {
|
||||
rust = 'cargo build',
|
||||
@@ -21,11 +22,15 @@ return {
|
||||
cpp = 'make upload',
|
||||
}
|
||||
}
|
||||
|
||||
-- Save the file
|
||||
vim.api.nvim_command('write')
|
||||
|
||||
local command = command_table[type][vim.bo.filetype]
|
||||
|
||||
if command ~= nil then
|
||||
vim.cmd('FloatermNew --autoclose=0 --height=0.9 --width=0.9 ' .. command)
|
||||
-- Run command in a new terminal buffer
|
||||
vim.cmd('terminal ' .. command)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user