diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2020-12-07 00:52:15 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2020-12-07 00:52:15 +0100 |
| commit | 4abc7efc0d8089db35120a16b6fd8ae079db1104 (patch) | |
| tree | 0e7773d9f91d5894a5e685a97c25f44a8beca114 /src/server/requests.odin | |
| parent | a564f967118551f339cf00d107b45953e8c10505 (diff) | |
better detail on completion and signatures with documentation
Diffstat (limited to 'src/server/requests.odin')
| -rw-r--r-- | src/server/requests.odin | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin index 0a05bfc..ff540c7 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -229,7 +229,6 @@ handle_request :: proc(request: json.Value, config: ^common.Config, writer: ^Wri request_type: RequestType; request_type, ok = request_map[method]; - if !ok { response := make_response_message_error( id = id, @@ -338,9 +337,22 @@ handle_request :: proc(request: json.Value, config: ^common.Config, writer: ^Wri info.document = document; - common.pool_add_task(&pool, task_proc, info); + if !config.debug_single_thread { + common.pool_add_task(&pool, task_proc, info); + } + + else{ + task_proc(&task); + } case: - common.pool_add_task(&pool, task_proc, info); + + if !config.debug_single_thread { + common.pool_add_task(&pool, task_proc, info); + } + + else { + task_proc(&task); + } } } @@ -409,12 +421,21 @@ request_initialize :: proc(task: ^common.Task) { common.pool_init(&pool, thread_count); common.pool_start(&pool); + //ERROR can't go to defintion for format in initialize_params.capabilities.textDocument.hover.contentFormat { if format == .Markdown { config.hover_support_md = true; } } + + for format in initialize_params.capabilities.textDocument.completion.documentationFormat { + if format == .Markdown { + config.completion_support_md = true; + } + } + + config.signature_offset_support = initialize_params.capabilities.textDocument.signatureHelp.signatureInformation.parameterInformation.labelOffsetSupport; completionTriggerCharacters := [] string { "." }; @@ -749,8 +770,8 @@ request_semantic_token_full :: proc(task: ^common.Task) { } }; - //symbols: SemanticTokens; - symbols := get_semantic_tokens(document, range); + symbols: SemanticTokens; + //symbols := get_semantic_tokens(document, range); response := make_response_message( params = symbols, @@ -784,8 +805,8 @@ request_semantic_token_range :: proc(task: ^common.Task) { return; } - //symbols: SemanticTokens; - symbols := get_semantic_tokens(document, semantic_params.range); + symbols: SemanticTokens; + //symbols := get_semantic_tokens(document, semantic_params.range); response := make_response_message( params = symbols, |