From: Georgios Atheridis Date: Sun, 5 Jun 2022 07:03:19 +0000 (+0300) Subject: added telescope X-Git-Url: https://git.atheridis.org/?a=commitdiff_plain;h=6e8925cdec56ed34c86639a41c3becfbf3a254bf;p=configs%2Fneovim.git added telescope --- diff --git a/nvim/lua/nvim/keymaps.lua b/nvim/lua/nvim/keymaps.lua index fdce539..f6e25cf 100644 --- a/nvim/lua/nvim/keymaps.lua +++ b/nvim/lua/nvim/keymaps.lua @@ -53,10 +53,10 @@ vnoremap("p", "\"_dP") vnoremap("", ":m .+1==") vnoremap("", ":m .-2==") -xnoremap("J", ":move '>+1gv-gv", opts) -xnoremap("K", ":move '<-2gv-gv", opts) -xnoremap("", ":move '>+1gv-gv", opts) -xnoremap("", ":move '<-2gv-gv", opts) +xnoremap("J", ":move '>+1gv-gv") +xnoremap("K", ":move '<-2gv-gv") +xnoremap("", ":move '>+1gv-gv") +xnoremap("", ":move '<-2gv-gv") -- Terminal -- -- Better terminal navigation @@ -64,3 +64,7 @@ tnoremap("", "h") tnoremap("", "j") tnoremap("", "k") tnoremap("", "l") + +-- Telescope +nnoremap("f", "lua require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ previewer = false }))") +nnoremap("", "Telescope live_grep") diff --git a/nvim/lua/nvim/options.lua b/nvim/lua/nvim/options.lua index 3345b79..20e85ab 100644 --- a/nvim/lua/nvim/options.lua +++ b/nvim/lua/nvim/options.lua @@ -10,7 +10,6 @@ local options = { pumheight = 10, smartcase = true, smartindent = true, - smartindent = true, splitbelow = true, splitright = true, swapfile = false, diff --git a/nvim/lua/nvim/plugins.lua b/nvim/lua/nvim/plugins.lua index 836e0ac..b87e6a2 100644 --- a/nvim/lua/nvim/plugins.lua +++ b/nvim/lua/nvim/plugins.lua @@ -26,7 +26,7 @@ vim.cmd [[ -- Use a protected call so we don't error out on the first use local status_ok, packer = pcall(require, "packer") if not status_ok then - vim.notify("Error with require packer") + vim.notify("Error with require packer") return end @@ -61,27 +61,35 @@ return packer.startup(function(use) use "navarasu/onedark.nvim" -- cmp Plugins - use 'hrsh7th/nvim-cmp' - use 'hrsh7th/cmp-buffer' - use 'hrsh7th/cmp-path' - use 'hrsh7th/cmp-cmdline' - use 'saadparwaiz1/cmp_luasnip' - use 'hrsh7th/cmp-nvim-lsp' - use 'hrsh7th/cmp-nvim-lua' + use "hrsh7th/nvim-cmp" + use "hrsh7th/cmp-buffer" + use "hrsh7th/cmp-path" + use "hrsh7th/cmp-cmdline" + use "saadparwaiz1/cmp_luasnip" + use "hrsh7th/cmp-nvim-lsp" + use "hrsh7th/cmp-nvim-lua" -- snippets - use 'L3MON4D3/LuaSnip' + use "L3MON4D3/LuaSnip" use "rafamadriz/friendly-snippets" -- a bunch of snippets to use -- LSP use "neovim/nvim-lspconfig" -- enable LSP use "williamboman/nvim-lsp-installer" -- simple to use language server installer + --Telescope + use { + "nvim-telescope/telescope.nvim", + requires = { {"nvim-lua/plenary.nvim"} }, + } + + use "BurntSushi/ripgrep" + -- Commenter use { - 'numToStr/Comment.nvim', + "numToStr/Comment.nvim", config = function() - require('Comment').setup() + require("Comment").setup() end } diff --git a/nvim/lua/nvim/telescope.lua b/nvim/lua/nvim/telescope.lua new file mode 100644 index 0000000..e69de29