1
0
Fork 0

nvim: Add telescope-toggleterm

This commit is contained in:
Daniel Kempkens 2022-04-21 18:55:53 +02:00
parent 93d5fcad2f
commit ef775d615c
3 changed files with 8 additions and 0 deletions

View file

@ -6,6 +6,7 @@
telescope-builtin (require :telescope.builtin) telescope-builtin (require :telescope.builtin)
telescope-themes (require :telescope.themes) telescope-themes (require :telescope.themes)
telescope-nifoc (require :nifoc.telescope) telescope-nifoc (require :nifoc.telescope)
telescope-toggleterm (require :telescope-toggleterm)
telescope-ivy (telescope-themes.get_ivy) telescope-ivy (telescope-themes.get_ivy)
telescope-dropdown (telescope-themes.get_dropdown) telescope-dropdown (telescope-themes.get_dropdown)
npairs (require :nvim-autopairs) npairs (require :nvim-autopairs)
@ -30,6 +31,9 @@
{:description "Toggle Undotree"}) {:description "Toggle Undotree"})
(map-entry :<leader>c repl.toggle-shell (map-entry :<leader>c repl.toggle-shell
{:description "Toggle Shell"}) {:description "Toggle Shell"})
(map-entry :<leader>cs
#(telescope-toggleterm.open telescope-dropdown)
{:description "Select Terminal"})
(map-entry :<leader>r repl.toggle-repl (map-entry :<leader>r repl.toggle-repl
{:description "Toggle REPL"}) {:description "Toggle REPL"})
;; Buffer ;; Buffer

View file

@ -13,6 +13,7 @@
:mappings {:i {:<esc> actions.close}}} :mappings {:i {:<esc> actions.close}}}
:extensions {:ui-select [(themes.get_dropdown {})]}}) :extensions {:ui-select [(themes.get_dropdown {})]}})
(telescope.load_extension :ui-select) (telescope.load_extension :ui-select)
(telescope.load_extension :toggleterm)
(let [augroup (vim.api.nvim_create_augroup :NifocTelescope {:clear true}) (let [augroup (vim.api.nvim_create_augroup :NifocTelescope {:clear true})
aucmd vim.api.nvim_create_autocmd] aucmd vim.api.nvim_create_autocmd]
(aucmd :FileType {:pattern :TelescopePrompt (aucmd :FileType {:pattern :TelescopePrompt
@ -26,3 +27,4 @@
(set vim.opt_local.relativenumber false) (set vim.opt_local.relativenumber false)
(set vim.opt_local.wrap true)) (set vim.opt_local.wrap true))
:group augroup}))) :group augroup})))

View file

@ -10,6 +10,8 @@
(set vim.opt_local.number false) (set vim.opt_local.number false)
(set vim.opt_local.relativenumber false) (set vim.opt_local.relativenumber false)
(set vim.opt_local.cursorline false) (set vim.opt_local.cursorline false)
(vim.api.nvim_buf_set_var opts.buf
:toggle_line_style 0)
(keymap.terminal-open opts.buf)) (keymap.terminal-open opts.buf))
:group augroup}))) :group augroup})))