[nvim] Install telescope
Add these bindings: - find_files to ,ff - live_grep to ,fg - buffers to ,fb - help_tags to ,fh
This commit is contained in:
		
							parent
							
								
									b233d52b6d
								
							
						
					
					
						commit
						440efbf8fc
					
				
					 3 changed files with 12 additions and 0 deletions
				
			
		|  | @ -59,6 +59,7 @@ local keys = require 'keys' | |||
| keys.init_key_opts() | ||||
| keys.init_window_key_mappings() | ||||
| keys.init_diagnostic_key_mappings() | ||||
| keys.init_telescope_mappings() | ||||
| 
 | ||||
| local gui = require 'gui' | ||||
| gui.init() | ||||
|  |  | |||
|  | @ -62,9 +62,18 @@ local function local_lsp_mappings(buffer_number) | |||
|     end, options) | ||||
| end | ||||
| 
 | ||||
| local function telescope_mappings() | ||||
|     local builtin = require('telescope.builtin') | ||||
|     map('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) | ||||
|     map('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' }) | ||||
|     map('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' }) | ||||
|     map('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' }) | ||||
| end | ||||
| 
 | ||||
| return { | ||||
|     init_key_opts = init_key_opts, | ||||
|     init_window_key_mappings = window_key_mappings, | ||||
|     init_diagnostic_key_mappings = diagnostic_mappings, | ||||
|     init_lsp_key_mappings = local_lsp_mappings, | ||||
|     init_telescope_mappings = telescope_mappings, | ||||
| } | ||||
|  |  | |||
|  | @ -36,6 +36,8 @@ Plug 'honza/vim-snippets' | |||
| Plug 'dracula/vim', {'as': 'dracula'} | ||||
| 
 | ||||
| if has('nvim') | ||||
|     Plug 'nvim-lua/plenary.nvim' | ||||
|     Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' } | ||||
|     Plug 'neovim/nvim-lspconfig' | ||||
|     Plug 'hrsh7th/cmp-nvim-lsp' | ||||
|     Plug 'hrsh7th/cmp-nvim-lsp' | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue