add support for unsaved buffers#12
Open
BehrRiley wants to merge 3 commits into
Open
Conversation
- add `{ scheme: 'untitled' }` to the LSP document selector
- update `WorkspaceTracker` to store and provide payloads for untitled files so `ScriptChecker` can lint them
- refactor extension string checks
- add an `IsDenizenDocument` helper
mcmonkey4eva
reviewed
Jul 1, 2026
| if (inTagCounter == 0) { | ||
| const tagText : string = arg.substring(tagStart + 1, i); | ||
| let autoColor : string = getTagColor(tagText, textColor); | ||
| const autoColor = getTagColor(tagText, textColor); |
Member
There was a problem hiding this comment.
bunch of stray edits in this file
mcmonkey4eva
reviewed
Jul 1, 2026
| { | ||
| "name": "denizenscript", | ||
| "version": "1.4.8", | ||
| "version": "1.4.9", |
Member
There was a problem hiding this comment.
this should not be touched by a PR
mcmonkey4eva
reviewed
Jul 1, 2026
| { | ||
| return; | ||
| } | ||
| if (file.Scheme == "untitled" && content != null) |
mcmonkey4eva
reviewed
Jul 1, 2026
- revert `package-lock.json` - fix `UntitledPayloads` memory leak - update `WorkspaceTracker.cs` - reverted unrelated ts edits in `extension.ts` to keep the pull request strictly focused on the unsaved buffers feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request adds support for syntax highlighting/linting/autocomplete features in unsaved (
untitled) files in VSCode; relevant discord conversationCurrently, the extension explicitly filtered for physical
.dscfiles both on the client and server side; users can't use the extension in quick notepads without saving them to disk first.Frontend/TypeScript changes
documentSelectorfor the client to explicitly include the missing/blank{ scheme: 'untitled', language: 'denizenscript' }.endsWith(".dsc")) inextension.tsto instead rely on VSCode's built-indocument.languageId === 'denizenscript'; this fixes the client's language auto detectingBackend/C# Changes
I'm not very experienced with C#, but i made sure to consistently reference docs and guides;
WorkspaceTracker.IsDenizenDocument(Uri uri)helper replacing repeated doc validation across the serverTextDocumentServiceandDiagnosticProviderto properly process docs with theuntitledscheme that was missingUntitledPayloadsdictionary toWorkspaceTracker; since untitled files don't exist on disk, their text payload is now cached here when updated so theScriptCheckercan successfully read and lint themTesting