From fb6a9f7ae15e7bd6b4d378aa1c2e02aebfe183ff Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Mon, 14 Aug 2023 11:43:36 -0400 Subject: [PATCH] More telescope keybindings --- nix/base-system/flake.nix | 1 + nix/base-system/init.lua | 17 ++++++++++++++--- nix/darwin/flake.lock | 12 ++++++------ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/nix/base-system/flake.nix b/nix/base-system/flake.nix index 480d9d2..00d8b8a 100644 --- a/nix/base-system/flake.nix +++ b/nix/base-system/flake.nix @@ -76,6 +76,7 @@ melange-nvim julia-vim # TODO I should get julia language server support set up instead. telescope-nvim + telescope-lsp-handlers-nvim plenary-nvim ] ++ (with nvim-treesitter-parsers; [ rust diff --git a/nix/base-system/init.lua b/nix/base-system/init.lua index f1567cb..bc3bf75 100644 --- a/nix/base-system/init.lua +++ b/nix/base-system/init.lua @@ -5,12 +5,14 @@ vim.cmd.colorscheme 'duskfox' -- turn on relative line numbers vim.opt.relativenumber = true +vim.opt.number = true --https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md local lspconfig = require("lspconfig") -- Nix language server support -lspconfig.nil_ls.setup{} +lspconfig.nil_ls.setup{{ +}} local vim_pid = vim.fn.getpid() @@ -226,13 +228,22 @@ vim.keymap.set("n", "mg", function() vim.cmd("MagitOnly") end) +-- Telelscope configuration +local telescope = require('telescope') local telescope_builtins = require('telescope.builtin') local telescope_actions = require('telescope.actions') --- Telelscope configuration -require('telescope').setup() +-- https://github.com/nvim-telescope/telescope.nvim +telescope.setup({ + defaults = { + initial_mode = "normal", + }, +}) vim.keymap.set("n", "nff", telescope_builtins.fd) +vim.keymap.set("n", "rl", telescope_builtins.lsp_references) +vim.keymap.set("n", "sl", telescope_builtins.lsp_workspace_symbols) +vim.keymap.set("n", "bl", function() telescope_builtins.buffers({}) end) -- Show whatever errors we have in our trouble pane vim.keymap.set("n", "se", "TroubleToggle", { silent = true, noremap = true }) diff --git a/nix/darwin/flake.lock b/nix/darwin/flake.lock index caf38b1..0199cc7 100644 --- a/nix/darwin/flake.lock +++ b/nix/darwin/flake.lock @@ -34,12 +34,12 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-qPinR/3+sjIfkgfGVaCmodNZsGTVrglMUnOq8pQ1+YI=", - "path": "/nix/store/nyhsl3jwbgx53wnwjqwq90dng16m6wsw-source/nix/base-system", + "narHash": "sha256-BVCBcsjnf6ByR/xBL+CaJVpSm4aYBa92F+yKvJ60afc=", + "path": "/nix/store/xx4azg7693rgqcb578lwfqfmm1jp2x8v-source/nix/base-system", "type": "path" }, "original": { - "path": "/nix/store/nyhsl3jwbgx53wnwjqwq90dng16m6wsw-source/nix/base-system", + "path": "/nix/store/xx4azg7693rgqcb578lwfqfmm1jp2x8v-source/nix/base-system", "type": "path" } }, @@ -501,11 +501,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1661365192, - "narHash": "sha256-5f700J5W4bGpuZd4PieEDP4WZjXYfL+YjKPsrRqfvrA=", + "lastModified": 1692062428, + "narHash": "sha256-0n/BRDjMP/iRPghtAJ07ah+dySnpXcxMC2EygSJE+Ow=", "owner": "zaphar", "repo": "runwhen", - "rev": "9829d0f38f8ccc91428b566993b8a010d9ef9ca5", + "rev": "c5f339cd27284b426bb732ef9369813976d1392d", "type": "github" }, "original": {