-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: Add basic embedded support #38
Conversation
idillon-sfl
commented
Oct 26, 2023
- Add basic hover and completion support for Bash and Python
- Save embedded documents on disk (we would rather not do it)
- Delete embedded documents on original document deletion
It would be nice if you could add some |
Good idea. I dit it |
9d6edff
to
777ba07
Compare
const originalPath = originalUriString.replace('file://', '') | ||
const pathToEmbeddedDocumentsFolder = this.getPathToEmbeddedDocumentFolder(originalPath) | ||
fs.mkdirSync(pathToEmbeddedDocumentsFolder, { recursive: true }) | ||
const randomName = randomUUID() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure, you always use the same random file for each language document, or is a new random file generated each parsing?
fs.mkdirSync(pathToEmbeddedDocumentsFolder, { recursive: true }) | ||
fs.writeFileSync(pathToEmbeddedDocument, embeddedDocumentContent) | ||
} catch (error) { | ||
logger.error('Failed to create embedded document:', error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you want to exit the function or stop what you are doing at this point?
I think it would be nice if you could try to break down some commits a little bit since some commit messages don't completely cover every change under it. |
777ba07
to
738f0be
Compare
I am not forgetting about inline-python. Just not sure yet how to do it (but I have some ideas). I am now using promises for all the file system operations (create file, delete file, create directory, delete directory). I noticed the file deletion was async and it was giving inconsistent results for my tests. |
2324bb0
to
dff3c2e
Compare
- Add basic hover and completion support for Bash and Python - Save embedded documents on disk (we would rather not do it) - Delete embedded documents on original document deletion
…nguage documents - This fixes tests that would give inconsistent results for file deletion - This handles the case where storagePath is undefined
dff3c2e
to
e61f183
Compare
… languages support
e599b53
to
b2cf131
Compare