jak-project/lsp/protocol/completion.h
Tyler Wilding 7dd716ded5
vscode: add snippets for supported ;; og:... comments (#1963)
Better documentation on what is supported / makes it faster to type them
without making mistakes.


![image](https://user-images.githubusercontent.com/13153231/195737915-1ed0fc15-e91d-4b35-a7df-0c31ebdc07d1.png)
2022-10-14 19:10:57 -04:00

33 lines
962 B
C++

#pragma once
#include "common_types.h"
// TODO - not fully implemented!
namespace LSPSpec {
/// @brief How a completion was triggered
enum class CompletionTriggerKind {
/// Completion was triggered by typing an identifier (24x7 code complete), manual invocation (e.g
/// Ctrl+Space) or via API.
Invoked = 1,
/// Completion was triggered by a trigger character specified by the `triggerCharacters`
/// properties of the `CompletionRegistrationOptions`.
TriggerCharacter = 2,
/// Completion was re-triggered as the current completion list is incomplete.
TriggerForIncompleteCompletions = 3,
};
// TODO - look into inheriting structs?
struct CompletionParams {
/// @brief The text document.
TextDocumentIdentifier m_textDocument;
/// @brief The position inside the text document.
Position m_position;
};
void to_json(json& j, const CompletionParams& obj);
void from_json(const json& j, CompletionParams& obj);
} // namespace LSPSpec