diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 20ce50e..7b5e947 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -19,13 +19,9 @@ local cmp = require('cmp') local cmp_select = { behavior = cmp.SelectBehavior.Select } cmp.setup({ sources = { - {name = 'nvim_lsp'}, - {name = 'cmp-buffer'}, - {name = 'cmp-path'}, - {name = 'copilot'}, - {name = 'buffer'}, - {name = 'path'}, {name = 'treesitter'}, + {name = 'nvim_lsp'}, + {name = 'copilot'}, }, mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.select_prev_item(cmp_select), @@ -35,7 +31,7 @@ cmp.setup({ [''] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false, - }) + }), }) }) diff --git a/lua/zak/remap.lua b/lua/zak/remap.lua index 0a40bf5..c0b8fbe 100644 --- a/lua/zak/remap.lua +++ b/lua/zak/remap.lua @@ -28,14 +28,17 @@ function toggleTerminal() -- If the terminal is open in the current window, hide it if vim.api.nvim_get_current_buf() == term_buf then vim.cmd("close") + vim.cmd("wincmd w") else -- Otherwise, open the terminal buffer in a split at the bottom + vim.cmd("wincmd w") vim.cmd("belowright split | resize " .. math.floor(vim.o.lines * 0.25)) vim.api.nvim_set_current_buf(term_buf) vim.cmd("startinsert") end else -- If no terminal buffer exists, create a new one + vim.cmd("wincmd w") vim.cmd("belowright split | resize " .. math.floor(vim.o.lines * 0.25)) vim.cmd("terminal") vim.cmd("startinsert")