From 2cd8074d4aa32a3b9198630b79920baf95af8c73 Mon Sep 17 00:00:00 2001 From: TiagoRG Date: Sun, 3 Mar 2024 23:27:09 +0000 Subject: [PATCH] Changes on vims Signed-off-by: TiagoRG --- .config/nvim/after/plugin/telescope.lua | 6 ++++++ .config/nvim/lua/tiagorg/packer.lua | 11 ++++++----- .config/nvim/lua/tiagorg/remap.lua | 9 ++------- .config/nvim/lua/tiagorg/set.lua | 3 ++- .config/nvim/plugin/packer_compiled.lua | 5 +++++ .vimrc | 4 ++-- 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua index e079284..bf9d456 100644 --- a/.config/nvim/after/plugin/telescope.lua +++ b/.config/nvim/after/plugin/telescope.lua @@ -14,3 +14,9 @@ vim.keymap.set('n', 'gs', builtin.git_stash, {}) -- LSP pickers vim.keymap.set('n', 'pe', trouble.open_with_trouble, {}) + +-- Help pickers +vim.keymap.set('n', 'sh', builtin.help_tags, {}) +vim.api.nvim_create_user_command('Help',function() + builtin.help_tags() +end,{}) diff --git a/.config/nvim/lua/tiagorg/packer.lua b/.config/nvim/lua/tiagorg/packer.lua index 05ed569..9d245b5 100644 --- a/.config/nvim/lua/tiagorg/packer.lua +++ b/.config/nvim/lua/tiagorg/packer.lua @@ -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) diff --git a/.config/nvim/lua/tiagorg/remap.lua b/.config/nvim/lua/tiagorg/remap.lua index f41a5c3..1daca79 100644 --- a/.config/nvim/lua/tiagorg/remap.lua +++ b/.config/nvim/lua/tiagorg/remap.lua @@ -36,11 +36,6 @@ vim.keymap.set("n", "f", vim.lsp.buf.format) vim.keymap.set("n", "af", "ggVG") vim.keymap.set("n", "ab", "GVgg") --- vim.keymap.set("n", "", "cnextzz") --- vim.keymap.set("n", "", "cprevzz") --- vim.keymap.set("n", "k", "lnextzz") --- vim.keymap.set("n", "j", "lprevzz") - vim.keymap.set("v", "rs", [[:s/\<\>//gI]]) vim.keymap.set("n", "ra", [[:%s/\<\>//gI]]) vim.keymap.set("n", "rc", [[:%s/\<\>//gcI]]) @@ -56,7 +51,7 @@ vim.keymap.set("n", "", "w") vim.api.nvim_exec([[ augroup SearchHighlight autocmd! - autocmd CmdlineLeave /,\? :nnoremap :nohls - autocmd CmdlineChanged /,\? :nnoremap :nohls + autocmd CmdlineLeave /,\? :nnoremap :noh + autocmd CmdlineChanged /,\? :nnoremap :noh augroup END ]], false) diff --git a/.config/nvim/lua/tiagorg/set.lua b/.config/nvim/lua/tiagorg/set.lua index c413080..89c6e6f 100644 --- a/.config/nvim/lua/tiagorg/set.lua +++ b/.config/nvim/lua/tiagorg/set.lua @@ -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 diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index ce2fe9e..e983011 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -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", diff --git a/.vimrc b/.vimrc index b4593b5..d9d69ef 100644 --- a/.vimrc +++ b/.vimrc @@ -57,7 +57,7 @@ nnoremap m :!make augroup SearchHighlight autocmd! - autocmd CmdlineLeave /,\? :nnoremap :nohls - autocmd CmdlineChanged /,\? :nnoremap :nohls + autocmd CmdlineLeave /,\? :nnoremap :noh + autocmd CmdlineChanged /,\? :nnoremap :noh augroup END