opencode
opencode copied to clipboard
Add support for LSP workspace/didChangeWatchedFiles
Some LSP servers (e.g. pyright) rely on workspace/didChangeWatchedFiles to register new files/modules after creation to be able to resolve imports. Without this the LSP server will always return error diagnostics that it can't resolve the import until restarted. This makes working with python/pyright annoying since it will make the LLM go out of it's way to resolve this error.