Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual File Sysytem and BIG Repos #3407

Open
askerdev opened this issue Feb 3, 2025 · 0 comments
Open

Virtual File Sysytem and BIG Repos #3407

askerdev opened this issue Feb 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@askerdev
Copy link

askerdev commented Feb 3, 2025

Description

I work at big company and we have monorepo working with vfs

I use neovim. In project where i work ( not at root of monorepo ) and run telescope

Files work well, because i wrote telescope plugin and there is about 4000 files with ignored things ( we have our own version control system )

But live grep is just broken, it does not work at all

Neovim version

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1732813678

Operating system and version

macOS 14.4

Telescope version / branch / rev

telescope 0.1.8

checkhealth telescope

==============================================================================
telescope: health#telescope#check

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 14.1.1
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities

===== Installed extensions ===== ~

Telescope Extension: `arc` ~
- No healthcheck provided

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Steps to reproduce

I can't do this, because repo and code under NDA :(
But try like this

  1. Create a big VFS repo with 4000 js, css file ( react, vite project )
  2. Open neovim and run telescope.builtin.live_grep()

Expected behavior

i don't think the problem is in the VFS because fzf-lua plugin work well at this, i don't know why btw

It's nightmare to configure to use with something other that git, that's why i don't use it

Actual behavior

can't provide images, videos because of NDA

Minimal config

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	{
		"nvim-telescope/telescope.nvim",
		dependencies = {
			"nvim-lua/plenary.nvim",
			{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
		},
		config = function()
			-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
			require("telescope").setup({
				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"
						-- the default case_mode is "smart_case"
					},
				},
			})
			local builtin = require("telescope.builtin")
			vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "Find grep string" })
		end,
	},
}

require("lazy").setup(plugins, {
	root = root .. "/plugins",
})
@askerdev askerdev added the bug Something isn't working label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant