adding floating terminal

This commit is contained in:
ruben.galvan 2025-02-18 19:42:21 -06:00
parent 3e6536b564
commit 16615d8fa9
2 changed files with 78 additions and 1 deletions

View file

@ -220,6 +220,23 @@ vim.api.nvim_create_autocmd('TextYankPost', {
end,
})
vim.api.nvim_create_autocmd('TermOpen', {
group = vim.api.nvim_create_augroup('custom-term-open', { clear = true }),
callback = function()
vim.opt.number = false
vim.opt.relativenumber = false
vim.cmd.setlocal 'nospell'
end,
})
vim.keymap.set('n', '<leader>st', function()
vim.cmd.vnew()
vim.cmd.term()
vim.cmd.wincmd 'J'
vim.cmd.setlocal 'nospell'
vim.api.nvim_win_set_height(0, 5)
end, { desc = 'Move focus to the upper window' })
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
@ -403,7 +420,9 @@ require('lazy').setup({
require('telescope').setup {
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
defaults = {
file_ignore_patterns = { '.git', 'node_modules/.*', 'out/' },
},
-- defaults = {
-- mappings = {
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },