From a0fb670397dcc832d1e100fcc5a6177d875d42d9 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sat, 27 May 2023 16:47:25 +0000 Subject: [PATCH 1/2] Added custom conf for telescope (search box at the bottom) --- config/nvim/lua/user/plugins/user.lua | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/config/nvim/lua/user/plugins/user.lua b/config/nvim/lua/user/plugins/user.lua index e19f8a8..fa35ebb 100644 --- a/config/nvim/lua/user/plugins/user.lua +++ b/config/nvim/lua/user/plugins/user.lua @@ -20,4 +20,47 @@ return { } end, }, + { + "nvim-telescope/telescope.nvim", + opts = function() + local actions = require "telescope.actions" + local get_icon = require("astronvim.utils").get_icon + return { + defaults = { + prompt_prefix = string.format("%s ", get_icon "Search"), + selection_caret = string.format("%s ", get_icon "Selected"), + path_display = { "truncate" }, + sorting_strategy = "ascending", + layout_config = { + horizontal = { + prompt_position = "bottom", + preview_width = 0.55, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + + mappings = { + i = { + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + }, + n = { ["q"] = actions.close }, + }, + }, + } + end, + -- the first parameter is the plugin specification + -- the second is the table of options as set up in Lazy with the `opts` key + config = function(plugin, opts) + -- run the core AstroNvim configuration function with the options table + require "plugins.configs.telescope"(plugin, opts) + end, + }, } From d0a01dfe86f314e6c5003e73245b2bb959033c8b Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sat, 27 May 2023 16:47:46 +0000 Subject: [PATCH 2/2] Added fd so setup script --- update.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update.sh b/update.sh index 8043fbe..964e758 100755 --- a/update.sh +++ b/update.sh @@ -22,6 +22,9 @@ cargo install tree-sitter-cli && \ # Install ripgrep sudo apt install -y ripgrep && \ +# Install fd +sudo apt install -y fd-find && \ + # Install lazygit cd ~ && \ LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') && \