From 9e391ff431555b443f2d83dee12058fd65f5eb6e Mon Sep 17 00:00:00 2001 From: Imbus Date: Thu, 15 Dec 2022 22:13:03 +0100 Subject: [PATCH] Small fixes --- init.lua | 11 ++++++++--- lua/plugins.lua | 30 +++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 2e3b1f6..63e6d4c 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,7 @@ local packer = require("ensure-packer"); local plugins = require("plugins"); local settings = require("settings"); ---local telescope = require("telescope"); +local telescope = require("telescope"); -- Theme Section vim.cmd("colorscheme onedark") @@ -16,11 +16,16 @@ require('Comment').setup() -- Gitsigns require('gitsigns').setup() ---require('telescope').setup() ---require('telescope').setup {} + -- Mason -- require("mason").setup() -- require("mason-lspconfig").setup({ -- ensure_installed = { "rust_analyzer", "pylsp" }, -- automatic_installation = true, -- }) + +local builtin = require('telescope.builtin') +vim.keymap.set('n', 'ff', builtin.find_files, {}) +vim.keymap.set('n', 'fg', builtin.live_grep, {}) +vim.keymap.set('n', 'fb', builtin.buffers, {}) +vim.keymap.set('n', 'fh', builtin.help_tags, {}) diff --git a/lua/plugins.lua b/lua/plugins.lua index 64ca75c..505514d 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -11,6 +11,18 @@ require('packer').startup(function(use) opt = true } } + use { + 'nvim-telescope/telescope.nvim', + tag = '0.1.0', + -- or , branch = '0.1.x', + requires = {{'nvim-lua/plenary.nvim'}} + } + use { + "folke/which-key.nvim", + config = function() + require("which-key").setup() + end + } -- use { -- 'VonHeikemen/lsp-zero.nvim', -- requires = { @@ -34,15 +46,15 @@ require('packer').startup(function(use) -- } -- use 'neovim/lsp' -- use 'neovim/nvim-lspconfig' - -- use { - -- 'nvim-treesitter/nvim-treesitter', - -- run = function() - -- local ts_update = require('nvim-treesitter.install').update({ - -- with_sync = true - -- }) - -- ts_update() - -- end - -- } + use { + 'nvim-treesitter/nvim-treesitter', + run = function() + local ts_update = require('nvim-treesitter.install').update({ + with_sync = true + }) + ts_update() + end + } -- use 'williamboman/mason.nvim' -- use 'williamboman/mason-lspconfig.nvim' -- use 'hrsh7th/nvim-cmp'