feat(nvim): Use native fzf for Telescope
This commit is contained in:
@@ -2,6 +2,8 @@ local builtin = require("telescope.builtin")
|
|||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
require("telescope").load_extension("fzf")
|
||||||
|
|
||||||
M.project_files = function()
|
M.project_files = function()
|
||||||
local opts = require("telescope.themes").get_ivy({})
|
local opts = require("telescope.themes").get_ivy({})
|
||||||
opts.find_command = { "rg", "--files", "--hidden", "--follow", "--glob", "!.git/*" }
|
opts.find_command = { "rg", "--files", "--hidden", "--follow", "--glob", "!.git/*" }
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
local fzf_make_cmd = "make"
|
||||||
|
if vim.loop.os_uname().machine == "arm64" then
|
||||||
|
fzf_make_cmd = " arch -arm64 make"
|
||||||
|
end
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
@@ -20,7 +25,26 @@ return require("lazy").setup({
|
|||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
tag = "0.1.1",
|
tag = "0.1.1",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
file_ignore_patterns = {
|
||||||
|
".git/worktrees",
|
||||||
|
".git/COMMIT_EDITMSG",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true, -- false will only do exact matching
|
||||||
|
override_generic_sorter = true, -- override the generic sorter
|
||||||
|
override_file_sorter = true, -- override the file sorter
|
||||||
|
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = fzf_make_cmd }, -- Fzf native
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- theme
|
-- theme
|
||||||
|
|||||||
Reference in New Issue
Block a user