-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
workspace/didChangeWatchedFiles
を使う (refs #9)
サーバーではなくクライアント側で監視すべきである理由はLSP Specificationに書いてある: https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles - ファイルシステムの監視はOSごとに方法が異なるので正しく実装するのが難しい。 また、監視することのコストは小さくない。 - クライアントは複数のサーバーを起動することがあるので (その逆はない)、 サーバーが監視するよりクライアントが監視するほうが効率がいい。 - サーバーの実装よりクライアントの実装のほうが数が少ないので、 クライアント側に実装させたほうが (全体的に作業の) 効率がいい。 従来の実装では起動時に存在しているすべてのファイルに対してCreatedイベントを 発行していたが、LSPクライアントのウォッチャーはそういう挙動をしないので、 起動時に存在しているファイルを列挙するコードを追加した。
- Loading branch information
Showing
6 changed files
with
163 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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