Changes on vims

Signed-off-by: TiagoRG <tiago.rgarcia@ua.pt>
This commit is contained in:
Tiago Garcia 2024-03-03 23:27:09 +00:00 committed by Tiago Garcia
parent 3fe09ae302
commit 2cd8074d4a
Signed by: TiagoRG
GPG Key ID: FF0A53A30B1ADF82
6 changed files with 23 additions and 15 deletions

View File

@ -14,3 +14,9 @@ vim.keymap.set('n', '<leader>gs', builtin.git_stash, {})
-- LSP pickers
vim.keymap.set('n', '<leader>pe', trouble.open_with_trouble, {})
-- Help pickers
vim.keymap.set('n', '<leader>sh', builtin.help_tags, {})
vim.api.nvim_create_user_command('Help',function()
builtin.help_tags()
end,{})

View File

@ -19,7 +19,10 @@ return require('packer').startup(function(use)
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.1',
requires = { 'nvim-lua/plenary.nvim' }
requires = {
'nvim-lua/plenary.nvim',
'catgoose/telescope-helpgrep.nvim'
}
}
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
use("nvim-treesitter/nvim-treesitter-context")
@ -41,7 +44,9 @@ return require('packer').startup(function(use)
{ 'rafamadriz/friendly-snippets' },
}
}
use "folke/trouble.nvim"
use "stevearc/aerial.nvim"
use 'numToStr/Comment.nvim'
use 'm4xshen/autoclose.nvim'
-- Extras
@ -49,14 +54,12 @@ return require('packer').startup(function(use)
use "andrewferrier/wrapping.nvim"
use "lukas-reineke/indent-blankline.nvim"
use "HiPhish/nvim-ts-rainbow2"
use "folke/trouble.nvim"
use "FotiadisM/tabset.nvim"
use 'nvim-tree/nvim-web-devicons'
use 'nvim-tree/nvim-tree.lua'
use 'lewis6991/gitsigns.nvim'
use 'romgrk/barbar.nvim'
use { "akinsho/toggleterm.nvim", tag = '*' }
use 'numToStr/Comment.nvim'
use({
"kylechui/nvim-surround",
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
@ -80,6 +83,4 @@ return require('packer').startup(function(use)
"nvim-telescope/telescope.nvim"
}
}
use 'TiagoRG/liveshare.nvim'
end)

View File

@ -36,11 +36,6 @@ vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
vim.keymap.set("n", "<leader>af", "ggVG")
vim.keymap.set("n", "<leader>ab", "GVgg")
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
-- vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
-- vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
vim.keymap.set("v", "<leader>rs", [[:s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
vim.keymap.set("n", "<leader>ra", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
vim.keymap.set("n", "<leader>rc", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gcI<Left><Left><Left><Left>]])
@ -56,7 +51,7 @@ vim.keymap.set("n", "<S-Tab>", "<C-w>w")
vim.api.nvim_exec([[
augroup SearchHighlight
autocmd!
autocmd CmdlineLeave /,\? :nnoremap <buffer> <Esc> :nohls<CR>
autocmd CmdlineChanged /,\? :nnoremap <buffer> <Esc> :nohls<CR>
autocmd CmdlineLeave /,\? :nnoremap <buffer> <Esc> :noh<CR>
autocmd CmdlineChanged /,\? :nnoremap <buffer> <Esc> :noh<CR>
augroup END
]], false)

View File

@ -2,7 +2,7 @@ vim.g.mapleader = " "
vim.g.mouse = "a"
vim.opt.updatetime = 50
vim.opt.wrap = false
vim.opt.compatible = false
vim.opt.number = true
vim.opt.relativenumber = true
@ -18,6 +18,7 @@ vim.opt.scs = true
vim.opt.smartindent = true
vim.opt.autoindent = true
vim.opt.wrap = false
vim.opt.showmode = false
vim.opt.wildmenu = true

View File

@ -259,6 +259,11 @@ _G.packer_plugins = {
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/tabset.nvim",
url = "https://github.com/FotiadisM/tabset.nvim"
},
["telescope-helpgrep.nvim"] = {
loaded = true,
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/telescope-helpgrep.nvim",
url = "https://github.com/catgoose/telescope-helpgrep.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/telescope.nvim",

4
.vimrc
View File

@ -57,7 +57,7 @@ nnoremap <leader>m :!make<CR>
augroup SearchHighlight
autocmd!
autocmd CmdlineLeave /,\? :nnoremap <buffer> <Esc> :nohls<CR>
autocmd CmdlineChanged /,\? :nnoremap <buffer> <Esc> :nohls<CR>
autocmd CmdlineLeave /,\? :nnoremap <buffer> <Esc> :noh<CR>
autocmd CmdlineChanged /,\? :nnoremap <buffer> <Esc> :noh<CR>
augroup END