projectmgr.nvim icon indicating copy to clipboard operation
projectmgr.nvim copied to clipboard

Feature request: telescope picker

Open mrdgo opened this issue 3 years ago • 2 comments

Well, I think the title says it all: I would love to see the project selection to be doable via telescope.

Advantages:

  • searchable
  • easily define custom actions
  • have a previewer (this might be a bit more work)

mrdgo avatar Aug 16 '22 07:08 mrdgo

Great idea. I'll definitely look into this, though it might be a while, I'm not overly familiar with telescope. I'm also a bit hesitant to make the project non-standalone, so maybe it should be a config option.

If you have any input on this, feel free to start a PR

charludo avatar Aug 29 '22 07:08 charludo

This line causes problems when you try to open a project without a window.

Otherwise this:

vim.ui.select(
	require("projectmgr.db_adapter").get_projects(),
	{ prompt = "Projects" },
	function(choice)
		require("projectmgr.manage").open_project(choice)
	end
)

can be used with telescope-ui-select. The advantage is native nvim API and your project would stay standalone :)

Edit: after testing this a bit with the above mentioned line commented out - this does not really work. It doesn't properly close buffers when opening a new project. I need more research on this.

mrdgo avatar Aug 31 '22 11:08 mrdgo

Have you tried using the above snippet to change project? I could not verify if it is me or require("projectmgr.manage").open_project(choice) just is not sufficient

mrdgo avatar Oct 18 '22 06:10 mrdgo

Have you tried using the above snippet to change project? I could not verify if it is me or require("projectmgr.manage").open_project(choice) just is not sufficient

Hi, super sorry about not getting back to you earlier. I haven't found time for side projects recently :( I'll do my best to try and integrate this this week.

charludo avatar Oct 19 '22 06:10 charludo

Hi, sorry again it took so long. Check out the feature branch and let me know if this works for you.

I haven't looked into previewers yet; what do you think would make sense here? Maybe just the config of the project?

charludo avatar Nov 14 '22 13:11 charludo