From 618607ffd66c4a9786b0f128204d0d9df2270029 Mon Sep 17 00:00:00 2001 From: Louie Shprung Date: Tue, 3 Jan 2023 17:52:51 -0800 Subject: Enable telescope.nvim --- lua/user/jabs.lua | 5 +++++ lua/user/keymaps.lua | 8 ++++++++ lua/user/plugins.lua | 6 ++++-- lua/user/telescope.lua | 8 ++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 lua/user/telescope.lua (limited to 'lua/user') diff --git a/lua/user/jabs.lua b/lua/user/jabs.lua index 136796d..03863b6 100644 --- a/lua/user/jabs.lua +++ b/lua/user/jabs.lua @@ -1,3 +1,8 @@ +local status_ok, jabs = pcall(require, "jabs") +if not status_ok then + return +end + require 'jabs'.setup { -- Options for the main window position = {'left', 'bottom'}, diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index adb6470..fd9d2c2 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -93,6 +93,14 @@ keymap("n", "bl", ":JABSOpen", opts) --Open buffer switcher ('b'uf -- Toggle GUI colors keymap("n", "g", ":set termguicolors!:TSToggle highlight", opts) -- ('g'ui) +-- Telescope options +keymap("n", "tf", ":Telescope find_files", opts) -- ('f'ind_files) +keymap("n", "ts", ":Telescope live_grep", opts) -- ('s'tring) +keymap("n", "tb", ":Telescope buffers", opts) -- ('b'uffers) +keymap("n", "th", ":Telescope keymaps", opts) -- ('h'elp) +--keymap("n", "tld", ":Telescope lsp_document_diagnostics", opts) -- ('l'sp 'd'iagnostics) +keymap("n", "tt", ":Telescope treesitter", opts) -- ('t'reesitter) + -- Workspace Options keymap("n", "wsh", ":split", opts) --Horizontal split workspace ('s'plit 'h'orizontal) keymap("n", "wsv", ":vs", opts) --Vertical split workspace ('s'plit 'v'ertical) diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index ad9ba8e..03a5d2b 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -9,7 +9,7 @@ return packer.startup(function(use) -- My plugins here use "wbthomason/packer.nvim" -- Have packer manage itself --use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim - --use "nvim-lua/plenary.nvim" -- Useful lua functions used by lots of plugins + use "nvim-lua/plenary.nvim" -- Useful lua functions used by lots of plugins -- Colorschemes --use "lunarvim/colorschemes" -- Additional colorschemes @@ -36,8 +36,10 @@ return packer.startup(function(use) use "williamboman/mason.nvim" use "williamboman/mason-lspconfig.nvim" - -- TreeSitter use "nvim-treesitter/nvim-treesitter" --enable treesitter + -- Telescope + use { "nvim-telescope/telescope.nvim", tag = '0.1.0' } + end) diff --git a/lua/user/telescope.lua b/lua/user/telescope.lua new file mode 100644 index 0000000..396cd0a --- /dev/null +++ b/lua/user/telescope.lua @@ -0,0 +1,8 @@ +local status_ok, telescope = pcall(require, "telescope") +if not status_ok then + return +end + +local actions = require "telescope.actions" + +telescope.setup {} -- cgit