From ac9d77f59bc64699e053efcc1a3f101cd43567ad Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 28 Aug 2020 19:21:42 +0530 Subject: [PATCH] nvim: Re-introduce floaterm Commit f977b8a while dropping all python dependencies also dropped floaterm. However it has a dependency on python based neovim-remote only if integration with git or floaterm is required from command line which we do not. So add it back. Using the previous toggle bindings with this gives a nice floating terminal which can be easily hidden. Signed-off-by: Sanchayan Maity --- nvim/.config/nvim/init.vim | 2 +- nvim/.config/nvim/keymappings.vim | 4 ++-- nvim/.config/nvim/plugin_settings.vim | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index deca353..150dc82 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -61,7 +61,7 @@ Plug 'liuchengxu/vim-which-key' " Clipboard Plug 'christoomey/vim-system-copy' " Toggle terminal -Plug 'caenrique/nvim-toggle-terminal' +Plug 'voldikss/vim-floaterm' " LSP Plug 'neovim/nvim-lsp' Plug 'nvim-lua/diagnostic-nvim' diff --git a/nvim/.config/nvim/keymappings.vim b/nvim/.config/nvim/keymappings.vim index cd5248e..73eaeda 100644 --- a/nvim/.config/nvim/keymappings.vim +++ b/nvim/.config/nvim/keymappings.vim @@ -69,8 +69,8 @@ nnoremap zms :set foldmethod=syntax " Key Bindings to help with terminal mode tnoremap jk -nnoremap :ToggleTerminal -tnoremap :ToggleTerminal +nnoremap :FloatermToggle +tnoremap :FloatermToggle " Key bindings to move between window splits for key in range(0, 9) diff --git a/nvim/.config/nvim/plugin_settings.vim b/nvim/.config/nvim/plugin_settings.vim index 7f4496b..80f4d86 100644 --- a/nvim/.config/nvim/plugin_settings.vim +++ b/nvim/.config/nvim/plugin_settings.vim @@ -54,6 +54,14 @@ let g:vimtex_view_general_viewer = 'qpdfview' let g:vimtex_view_general_options = '--unique @pdf\#src:@tex:@line:@col' let g:vimtex_view_general_options_latexmk = '--unique' +" Floaterm +let g:floaterm_open_in_root = 0 +let g:floaterm_position = 'center' +let g:floaterm_width = 0.8 +let g:floaterm_height = 0.8 +let g:floaterm_winblend = 0 +let g:floaterm_borderchars = ['─', '│', '─', '│', '╭', '╮', '╯', '╰'] + " Neovim LSP Diagnostics let g:diagnostic_enable_virtual_text = 0 let g:diagnostic_show_sign = 1