Skip to content

resolve relative paths in dynamic configurations#2331

Merged
Techatrix merged 5 commits into
zigtools:masterfrom
dotcarmen:resolve-configuration-relative-paths
Jun 22, 2025
Merged

resolve relative paths in dynamic configurations#2331
Techatrix merged 5 commits into
zigtools:masterfrom
dotcarmen:resolve-configuration-relative-paths

Conversation

@dotcarmen

Copy link
Copy Markdown
Contributor

closes #2329

this PR resolves relative paths in configurations when .allowRelative = true is passed to Server.updateConfiguration.

as discussed in #2329 (comment), this behavior only works when there's exactly 1 workspace assigned to the current zls server.

@dotcarmen
dotcarmen force-pushed the resolve-configuration-relative-paths branch from 06aeaa7 to a25ea3d Compare May 24, 2025 19:40

@Techatrix Techatrix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a single workspace folder, the scopeURI field should be set to it when requesting configuration items here.

Resolving relative paths should be done in the handleConfiguration function instead of updateConfiguration. That is the only place where we receive config options where relative paths would be allowed.

Comment thread src/Server.zig Outdated
Comment thread src/Server.zig Outdated
Comment thread src/Server.zig Outdated
Comment thread src/Server.zig Outdated
@Techatrix

Copy link
Copy Markdown
Member

In case you missed them, these comments have not been addressed yet.

@dotcarmen

Copy link
Copy Markdown
Contributor Author

these comments have not been addressed yet.

addressed now!

Comment thread src/Server.zig
@Techatrix
Techatrix force-pushed the resolve-configuration-relative-paths branch from 7eda252 to 9589e78 Compare June 18, 2025 05:12
@dotcarmen
dotcarmen requested a review from Techatrix June 18, 2025 08:56
@Techatrix
Techatrix merged commit a64c323 into zigtools:master Jun 22, 2025
4 checks passed
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.

zls should resolve relative paths for didChangeConfiguration

2 participants