aboutsummaryrefslogtreecommitdiff
path: root/src/server/types.odin
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2025-04-05 20:02:58 +0200
committerDanielGavin <danielgavin5@hotmail.com>2025-04-05 20:02:58 +0200
commita500226c10e991506c42a4858ffd7d1d33f552e6 (patch)
tree56f2df9234eeb0f00eb49848edc6c676cfba34ee /src/server/types.odin
parent1e44e3d78ad8a74ef09c7f54a6f6d3f7df517f8e (diff)
Add support for filewatching from the client
Diffstat (limited to 'src/server/types.odin')
-rw-r--r--src/server/types.odin45
1 files changed, 44 insertions, 1 deletions
diff --git a/src/server/types.odin b/src/server/types.odin
index 2dd75b4..c9107ff 100644
--- a/src/server/types.odin
+++ b/src/server/types.odin
@@ -33,6 +33,15 @@ ResponseParams :: union {
common.Range,
}
+RequestMessage :: struct {
+ jsonrpc: string,
+ method: string,
+ id: RequestId,
+ params: union {
+ RegistrationParams,
+ },
+}
+
ResponseMessage :: struct {
jsonrpc: string,
id: RequestId,
@@ -84,6 +93,33 @@ RequestInitializeParams :: struct {
clientInfo: ClientInfo,
}
+FileChangeType :: enum {
+ Created = 1,
+ Changed = 2,
+ Deleted = 3,
+}
+
+FileEvent :: struct {
+ uri: string,
+ type: int,
+}
+
+DidChangeWatchedFilesParams :: struct {
+ changes: [dynamic]FileEvent,
+}
+
+Registration :: struct {
+ id: string,
+ method: string,
+ registerOptions: union {
+ DidChangeWatchedFilesRegistrationOptions,
+ },
+}
+
+RegistrationParams :: struct {
+ registrations: []Registration,
+}
+
ClientInfo :: struct {
name: string,
}
@@ -109,11 +145,14 @@ ServerCapabilities :: struct {
documentLinkProvider: DocumentLinkOptions,
}
+DidChangeWatchedFilesRegistrationOptions :: struct {
+ watchers: []FileSystemWatcher,
+}
+
RenameOptions :: struct {
prepareProvider: bool,
}
-
CompletionOptions :: struct {
resolveProvider: bool,
triggerCharacters: []string,
@@ -341,6 +380,10 @@ TextDocumentSyncOptions :: struct {
save: SaveOptions,
}
+FileSystemWatcher :: struct {
+ globPattern: string,
+}
+
OlsConfig :: struct {
collections: [dynamic]OlsConfigCollection,
thread_pool_count: Maybe(int),