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

Support for ols.json #26

Closed
MineBill opened this issue May 5, 2024 · 2 comments
Closed

Support for ols.json #26

MineBill opened this issue May 5, 2024 · 2 comments
Assignees
Milestone

Comments

@MineBill
Copy link

MineBill commented May 5, 2024

This is similar to #25 but needs some extra thought.

A project can have custom collections such as packages and needs some way to let this plugin know about them. OLS accomplishes this with an ols.json file that is defined per-project. In that file, it is possible to describe a list of collections and their path (relative to that file), which makes OLS aware of them and can provide completions. In an ideal world, there would be an odin build system with a configuration file that all editor plugins could parse and figure out what collections are used for the project but sadly, we do not live in such a world. This plugin could come up with it's own project file that describes these collection but since it's ultimately a map[string]string and a lot of odin users and project already use OLS and have an ols.json, i don't think it would be a terrible idea to temporarily parse it to figure out the collections. Then, at later date, if an odin-build system emerges and is accepted by the community we could switch to that.

@obiwan87
Copy link
Owner

obiwan87 commented May 6, 2024

Your suggestion makes a lot of sense, I'll definitely look into how re-using the ols.json settings when opening a project folder with IDEA.

@obiwan87 obiwan87 changed the title Support for custom collections. Support for ols.json Aug 15, 2024
@obiwan87 obiwan87 added this to the 0.7.0 milestone Oct 2, 2024
@obiwan87
Copy link
Owner

obiwan87 commented Oct 5, 2024

When opening a project that has an ols.json but not configured source directories, the plugin will prompt the user to auto-detect the roots. Auto-detecting will set the collection and source paths according to ols.json.
Also a new action in the project view context menu has been added: "Import Ols config"

@obiwan87 obiwan87 self-assigned this Oct 5, 2024
@obiwan87 obiwan87 closed this as completed Oct 5, 2024
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