diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index fc655e4..d4ee163 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -76,9 +76,6 @@ map.n.nore[']q'] = ':cnext' -- Location list map.n.nore['[l'] = ':lprevious' map.n.nore[']l'] = ':lnext' --- Hunks (from gitsigns) -map.n.nore.expr['[h'] = [[&diff ? ']c' : 'Gitsigns prev_hunk']] -map.n.nore.expr[']h'] = [[&diff ? '[c' : 'Gitsigns next_hunk']] -- set our leader key to space since with hjkl, space is largely useless vim.g.mapleader = " " @@ -131,11 +128,9 @@ map.n.nore['s'] = map.n.nore['S'] = [[:lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())]] -- fuzzy find files in cwd -map.n.nore['f'] = - [[:lua require 'telescope.builtin'.find_files({follow=true, hidden=true})]] +map.n.nore['f'] = [[:lua require 'telescope.builtin'.find_files()]] -- general full-text search in cwd with rg -map.n.nore['F'] = - [[:lua require 'telescope'.extensions.fzf_writer.grep()]] +map.n.nore['F'] = [[:lua require 'telescope.builtin'.live_grep()]] -- git status map.n.nore['gs'] = [[:lua require 'telescope.builtin'.git_status()]] @@ -187,9 +182,6 @@ map.n.nore.silent[''] = ':TZMinimalist' -- map @@ to automatically insert citation reference at cursor map.i.nore.silent['@@'] = 'u:CiteRef' -- map cc to insert a complete citation at cursor -map.n.nore.silent['cc'] = ':CiteRef' --- map cm to insert markdown prettified citation -map.n.nore.silent['cm'] = ':CiteMarkdown' -- SPELL CHECKING -- Spell check set to O, 'o' for 'orthography': diff --git a/nvim/.config/nvim/lua/plug/_telescope.lua b/nvim/.config/nvim/lua/plug/_telescope.lua index 4b5e4ed..89e2269 100644 --- a/nvim/.config/nvim/lua/plug/_telescope.lua +++ b/nvim/.config/nvim/lua/plug/_telescope.lua @@ -1,32 +1,36 @@ +-- Setup up telescope fuzzy finding settings +-- +-- Makes use of optionally installed external programs to work fully: +-- rg (ripgrep) for in-text searches +-- fd for quicker directory structure searches +-- lsp for a variety of lsp queries require("telescope").setup { defaults = { - file_sorter = require("telescope.sorters").get_fzy_sorter, vimgrep_arguments = { - 'rg', - '--ignore-vcs', - '--hidden', - '--color=never', - '--no-heading', - '--with-filename', - '--line-number', - '--column', - '--smart-case' - }, - }, - extensions = { - fzy_native = { - override_generic_sorter = false, - override_file_sorter = true - }, - fzf_writer = { - minimum_grep_characters = 2, - minimum_files_characters = 2, - - -- Disabled by default. - -- Will probably slow down some aspects of the sorter, but can make color highlights. - use_highlighter = true, + 'rg', '--ignore-vcs', '--hidden', '--color=never', '--no-heading', + '--with-filename', '--line-number', '--column', '--smart-case' } - } + }, + pickers = { + buffers = {theme = "ivy"}, + oldfiles = {theme = "ivy"}, + find_files = { + theme = "dropdown", + -- nice minimal picker design + borderchars = { + {'─', '│', '─', '│', '┌', '┐', '┘', '└'}, + prompt = {"─", "│", " ", "│", '┌', '┐', "│", "│"}, + results = { + "─", "│", "─", "│", "├", "┤", "┘", "└" + }, + preview = { + '─', '│', '─', '│', '┌', '┐', '┘', '└' + } + }, + width = 0.8, + previewer = false, + prompt_title = false + } + } } -require("telescope").load_extension("fzy_native") -require("telescope").load_extension("fzf_writer") +require("telescope").load_extension("fzf") diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 0afdee0..d77650e 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -159,11 +159,12 @@ require("packer").startup(function() -- fuzzy matching use { "nvim-telescope/telescope.nvim", - requires = {{"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}}, + requires = { + {"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}, + {"nvim-telescope/telescope-fzf-native.nvim", run = 'make'} + }, config = function() require('plug._telescope') end } - use "nvim-telescope/telescope-fzy-native.nvim" - use "nvim-telescope/telescope-fzf-writer.nvim" -- snippeting use {"hrsh7th/vim-vsnip", event = "InsertEnter"} -- snippet engine