added telescope
authorGeorgios Atheridis <atheridis@tutamail.com>
Sun, 5 Jun 2022 07:03:19 +0000 (10:03 +0300)
committerGeorgios Atheridis <atheridis@tutamail.com>
Sun, 5 Jun 2022 07:03:19 +0000 (10:03 +0300)
nvim/lua/nvim/keymaps.lua
nvim/lua/nvim/options.lua
nvim/lua/nvim/plugins.lua
nvim/lua/nvim/telescope.lua [new file with mode: 0644]

index fdce5391cd7a4fe84f0b60581895bf8f1dd61b06..f6e25cf28939edea9785aa38bbb5d32789a0414f 100644 (file)
@@ -53,10 +53,10 @@ vnoremap("p", "\"_dP")
 vnoremap("<M-j>", ":m .+1<CR>==")
 vnoremap("<M-k>", ":m .-2<CR>==")
 
-xnoremap("J", ":move '>+1<CR>gv-gv", opts)
-xnoremap("K", ":move '<-2<CR>gv-gv", opts)
-xnoremap("<A-j>", ":move '>+1<CR>gv-gv", opts)
-xnoremap("<A-k>", ":move '<-2<CR>gv-gv", opts)
+xnoremap("J", ":move '>+1<CR>gv-gv")
+xnoremap("K", ":move '<-2<CR>gv-gv")
+xnoremap("<A-j>", ":move '>+1<CR>gv-gv")
+xnoremap("<A-k>", ":move '<-2<CR>gv-gv")
 
 -- Terminal --
 -- Better terminal navigation
@@ -64,3 +64,7 @@ tnoremap("<C-h>", "<C-\\><C-N><C-w>h")
 tnoremap("<C-j>", "<C-\\><C-N><C-w>j")
 tnoremap("<C-k>", "<C-\\><C-N><C-w>k")
 tnoremap("<C-l>", "<C-\\><C-N><C-w>l")
+
+-- Telescope
+nnoremap("<leader>f", "<cmd>lua require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ previewer = false }))<CR>")
+nnoremap("<C-t>", "<cmd>Telescope live_grep<CR>")
index 3345b79fcc6532600a20671a46ef1d0f0e226f2a..20e85abcd400762ea33491ec16afc78a6c36acb6 100644 (file)
@@ -10,7 +10,6 @@ local options = {
     pumheight = 10,
     smartcase = true,
     smartindent = true,
-    smartindent = true,
     splitbelow = true,
     splitright = true,
     swapfile = false,
index 836e0ac422efedbb1f0bd7a806a5fd4517368c0b..b87e6a27fcc3c8167ec4053dfe8c4b9eba4cc8e8 100644 (file)
@@ -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 (file)
index 0000000..e69de29