Support modulepath imports #141
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #91
I saw #93 and #120 and adopted both approaches, the
SettingsManagerand theEvaluatorSettings. I decided to priorize theSettingsManager'smodulepathwhen resolving since that could offer a way to "override" a projectsmodulepathlocally.I also added completion for
import,amendsect.Addressing the feedback on #93
Should be solved, right? We do use the
SettingsManagerhere, and everything else would have to be done in pkl-vscode. While looking into the now-botched #93 I found that @sitepark-schaeper has a version of that, but I don't know if that works or not. It was trivial for neovim.This is covered specifically by the test cases
resolve relative field in modulepathandresolve modulepath field in modulepath.The implementation does exactly that. It iterates through all
modulepathentries (first from theSettingsManager, then from theEvaluatorSettings) and the first file that exists is used.Soley jar entries have not been tested, as I am unsure how to do so. If you need me to do that as well please help me setup a test to implement against.
Please let me know if there’s anything else I can improve or clarify to help move this feature forward. I’m happy to iterate further.