More telescope keybindings

This commit is contained in:
Jeremy Wall 2023-08-14 11:43:36 -04:00
parent 48dd1c44fb
commit fb6a9f7ae1
3 changed files with 21 additions and 9 deletions

View File

@ -76,6 +76,7 @@
melange-nvim melange-nvim
julia-vim # TODO I should get julia language server support set up instead. julia-vim # TODO I should get julia language server support set up instead.
telescope-nvim telescope-nvim
telescope-lsp-handlers-nvim
plenary-nvim plenary-nvim
] ++ (with nvim-treesitter-parsers; [ ] ++ (with nvim-treesitter-parsers; [
rust rust

View File

@ -5,12 +5,14 @@ vim.cmd.colorscheme 'duskfox'
-- turn on relative line numbers -- turn on relative line numbers
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.number = true
--https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md --https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
-- Nix language server support -- Nix language server support
lspconfig.nil_ls.setup{} lspconfig.nil_ls.setup{{
}}
local vim_pid = vim.fn.getpid() local vim_pid = vim.fn.getpid()
@ -226,13 +228,22 @@ vim.keymap.set("n", "<Leader>mg", function()
vim.cmd("MagitOnly") vim.cmd("MagitOnly")
end) end)
-- Telelscope configuration
local telescope = require('telescope')
local telescope_builtins = require('telescope.builtin') local telescope_builtins = require('telescope.builtin')
local telescope_actions = require('telescope.actions') local telescope_actions = require('telescope.actions')
-- Telelscope configuration -- https://github.com/nvim-telescope/telescope.nvim
require('telescope').setup() telescope.setup({
defaults = {
initial_mode = "normal",
},
})
vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd) vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd)
vim.keymap.set("n", "<Leader>rl", telescope_builtins.lsp_references)
vim.keymap.set("n", "<Leader>sl", telescope_builtins.lsp_workspace_symbols)
vim.keymap.set("n", "<Leader>bl", function() telescope_builtins.buffers({}) end)
-- Show whatever errors we have in our trouble pane -- Show whatever errors we have in our trouble pane
vim.keymap.set("n", "<Leader>se", "<cmd>TroubleToggle<cr>", { silent = true, noremap = true }) vim.keymap.set("n", "<Leader>se", "<cmd>TroubleToggle<cr>", { silent = true, noremap = true })

12
nix/darwin/flake.lock generated
View File

@ -34,12 +34,12 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-qPinR/3+sjIfkgfGVaCmodNZsGTVrglMUnOq8pQ1+YI=", "narHash": "sha256-BVCBcsjnf6ByR/xBL+CaJVpSm4aYBa92F+yKvJ60afc=",
"path": "/nix/store/nyhsl3jwbgx53wnwjqwq90dng16m6wsw-source/nix/base-system", "path": "/nix/store/xx4azg7693rgqcb578lwfqfmm1jp2x8v-source/nix/base-system",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/nyhsl3jwbgx53wnwjqwq90dng16m6wsw-source/nix/base-system", "path": "/nix/store/xx4azg7693rgqcb578lwfqfmm1jp2x8v-source/nix/base-system",
"type": "path" "type": "path"
} }
}, },
@ -501,11 +501,11 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1661365192, "lastModified": 1692062428,
"narHash": "sha256-5f700J5W4bGpuZd4PieEDP4WZjXYfL+YjKPsrRqfvrA=", "narHash": "sha256-0n/BRDjMP/iRPghtAJ07ah+dySnpXcxMC2EygSJE+Ow=",
"owner": "zaphar", "owner": "zaphar",
"repo": "runwhen", "repo": "runwhen",
"rev": "9829d0f38f8ccc91428b566993b8a010d9ef9ca5", "rev": "c5f339cd27284b426bb732ef9369813976d1392d",
"type": "github" "type": "github"
}, },
"original": { "original": {