🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@rchl
Copy link
Member

@rchl rchl commented Nov 17, 2025

#1034 introduced workspace/configuration requests asking for file-specific options (indent size, use spaces for indent).

This caused an issue with one particular editor where it dead locks until certain timeout due to server triggering a request from within client-initiated request. While this is clearly a bug in the editor, I've decided to help the cause and avoid those requests if possible.

Instead of re-triggering it all the time on certain actions, trigger it initially during handling of the textDocument/didOpen notification and then cache and use the cache response from then. While this could result in wrong indentation settings if user changes those after opening the file, I think it's a corner case that is not that important. The cached options are dropped when the file is closed.

Also respect client's workspace/configuration capability and don't make the configuration request if it's not supported.

Fixes #1049

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

size-limit report 📦

Path Size
lib/cli.mjs 846.2 KB (+0.16% 🔺)

@rchl rchl merged commit 9a366df into master Nov 18, 2025
9 checks passed
@rchl rchl deleted the fix/cache-format-options branch November 18, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disable configuration but still received ConfigurationRequest

2 participants