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

Auto discover projects #104

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Auto discover projects #104

wants to merge 3 commits into from

Conversation

pkkid
Copy link

@pkkid pkkid commented Apr 15, 2022

Added 3 new options:

  • auto_discover_base_directories - Similar format to projects setting, but will look in these directories for any git, hg, or svn repos and auto create project files for them in the primary_dir().
  • auto_discover_ignored_folders - Folder names to ignore when searching for repos in above paths.
  • auto_discover_max_recursion_depth - Max depth to search when searching for repos.

There are no new commands. This process is performed on Refresh which occurs when the plugin is loaded or refresh is manually called. If the auto_discover_base_directories is empty, nothing will be done.

@pkkid
Copy link
Author

pkkid commented Apr 15, 2022

This pull request would resolve issue #65

filename = '{}.sublime-project'.format(project_name)
filepath = os.path.join(self.primary_dir(), filename)
print('ProjectManager: Creating {} -> {}'.format(filename, folder))
with open(filepath, 'w') as handle:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might use JsonFile(path).save(data)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Updated to use JsonFile and removed the import above.

Copy link
Owner

@randy3k randy3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. It seems very promising. I will take a closer look as soon as possible.

@zillding
Copy link

zillding commented May 5, 2024

Any update on this? This would be a great feature!

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

Successfully merging this pull request may close these issues.

None yet

3 participants