Skip to content

Fix new view on open file URI with path not existing on disk - #2898

Merged
jwortmann merged 1 commit into
sublimelsp:mainfrom
jwortmann:fix-open-file-uri
May 13, 2026
Merged

jwortmann merged 1 commit into
sublimelsp:mainfrom
jwortmann:fix-open-file-uri

Conversation

@jwortmann

Copy link
Copy Markdown
Member

When opening a file URI for a document change in a WorkspaceEdit or from a link in the hover popup, but the file path doesn't exist as an actual file on disk, we should not silently open a new empty view.

If the server wants to create a new file in a WorkspaceEdit, it needs to use the CreateFile resource operation: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#resourceChanges

@jwortmann
jwortmann merged commit f295b6d into sublimelsp:main May 13, 2026
8 checks passed
@jwortmann
jwortmann deleted the fix-open-file-uri branch May 13, 2026 18:31
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.

2 participants