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

Add an option to build cscope.files #69

Open
Coconop opened this issue Feb 6, 2025 · 0 comments
Open

Add an option to build cscope.files #69

Coconop opened this issue Feb 6, 2025 · 0 comments
Assignees

Comments

@Coconop
Copy link

Coconop commented Feb 6, 2025

Is your feature request related to a problem? Please describe.
I've seen a couple of issues where users failed to build db because they didn't build the csope.files. I've ran into this issue myself.

Describe the solution you'd like
Add an option to set the commands to build this cscope.files like we have db_build_cmd. It could be files_list_cmd for example.

Describe alternatives you've considered
I've personnaly setup a keymap for this:

vim.keymap.set("n", "<leader>cl", function()
	-- List files with fd
	local cmd = 'fd -t f -e c -e h > cscope.files'
	-- List files with find
	-- local cmd = 'find . -type f \\( -name "*.c" -o -name "*.h" \\) > cscope.files'

	-- Run the command
	vim.fn.system(cmd)

	-- Notify the user
	print("cscope.files generated")
end, { desc = "Build cscope.files list" })
@Coconop Coconop changed the title Add a option to build cscope.files Add an option to build cscope.files Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants