fix: terminal keys for init

This commit is contained in:
Matthew Leong 2022-12-29 18:54:18 -08:00
parent d9b173b42d
commit f53ef91d7c

View file

@ -1,14 +1,15 @@
local user_config = require('cosmic.core.user')
local g = vim.g
local title = vim.env.SHELL
return {
'voldikss/vim-floaterm',
cmd = { 'FloatermToggle', 'FloatermNew' },
init = function()
require('cosmic.plugins.terminal.mappings')
end,
keys = {
{ '<C-l>', '<cmd>FloatermToggle<cr>', desc = 'Floating Terminal' },
},
config = function()
local g = vim.g
local title = vim.env.SHELL
g.floaterm_width = 0.7
g.floaterm_height = 0.8
g.floaterm_title = '[' .. title .. ']:($1/$2)'
@ -16,6 +17,7 @@ return {
g.floaterm_opener = 'vsplit'
require('cosmic.plugins.terminal.highlights')
require('cosmic.plugins.terminal.mappings')
end,
enabled = not vim.tbl_contains(user_config.disable_builtin_plugins, 'terminal'),
}