mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Added toggle-term plugin for neovim
This commit is contained in:
@@ -6,6 +6,18 @@ o.tabstop = 2
|
||||
o.softtabstop = 2
|
||||
o.shiftwidth = 2
|
||||
|
||||
keymap('n', '<C-b>', '<cmd>!swift build<CR>', default_options)
|
||||
keymap('n', '<C-T>', '<cmd>!swift test<CR>', default_options)
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
local swifttest = Terminal:new({
|
||||
cmd = "swift test",
|
||||
hidden = true,
|
||||
close_on_exit = false,
|
||||
})
|
||||
|
||||
function _SWIFT_TEST_TOGGLE()
|
||||
swifttest:toggle()
|
||||
end
|
||||
|
||||
keymap('n', '<C-b>', '<cmd>!swift build<CR>', default_options)
|
||||
keymap('n', '<C-u>', ':lua _SWIFT_TEST_TOGGLE()<CR>', default_options)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user