install nvim telescope

This commit is contained in:
Pim Kunis 2023-02-12 14:42:51 +01:00
parent 95fa8e2628
commit 486c785523
3 changed files with 37 additions and 2 deletions

View file

@ -54,4 +54,12 @@ return require('packer').startup(function()
-- Automatic settings depending on file type
use 'tpope/vim-sleuth'
-- Fuzzy finder
use {
'nvim-telescope/telescope.nvim',
requires = {
'nvim-lua/plenary.nvim'
}
}
end)

View file

@ -28,8 +28,8 @@ local on_attach = function(client, bufnr)
vim.keymap.set('n', '<leader>t', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>c', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>ref', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
-- vim.keymap.set('n', '<leader>ref', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>fmt', function() vim.lsp.buf.format { async = true } end, bufopts)
end
require("lspconfig").pylsp.setup{ on_attach = on_attach }

View file

@ -0,0 +1,27 @@
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fr', builtin.lsp_references, {})
vim.keymap.set('n', '<leader>fs', builtin.lsp_document_symbols, {})
require('telescope').setup{
pickers = {
find_files = {
theme = "dropdown"
},
live_grep = {
theme = "dropdown"
},
buffers = {
theme = "dropdown"
},
lsp_references = {
theme = "dropdown"
},
lsp_document_symbols = {
theme = "dropdown"
}
}
}