diff options
| author | Yong He <yonghe@outlook.com> | 2022-06-30 14:19:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-30 14:19:39 -0700 |
| commit | 2c09275388d4c88ea26bf709132b8be4a9e342bc (patch) | |
| tree | ac0049c3bc484aca9e36b489337771e90973bf0a /source/slang/slang-language-server.h | |
| parent | 5eee6b03c391d0bb6ed0ded2d8d91c2e525fdb97 (diff) | |
Language server: extract documentation from ordinary comments (#2308)
* Language server: improved documentation formatting.
* Extend doc extractor to search in ordinary comments.
Reuse language server instance between tests.
* Fix test case.
* Fix comment.
* Fix crash.
* Fix enum case doc extraction.
* Doc extractor fixes.
* Fix.
* Fix.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-language-server.h')
| -rw-r--r-- | source/slang/slang-language-server.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/slang/slang-language-server.h b/source/slang/slang-language-server.h index 963df65f6..7f297d18b 100644 --- a/source/slang/slang-language-server.h +++ b/source/slang/slang-language-server.h @@ -1,9 +1,8 @@ #pragma once - +#include <chrono> #include "../../slang.h" #include "../compiler-core/slang-json-rpc.h" #include "../compiler-core/slang-json-rpc-connection.h" - #include "slang-workspace-version.h" #include "slang-language-server-completion.h" #include "slang-language-server-auto-format.h" @@ -79,15 +78,22 @@ class LanguageServer { private: static const int kConfigResponseId = 0x1213; - + public: + enum class TraceOptions + { + Off, + Messages, + Verbose + }; bool m_initialized = false; + TraceOptions m_traceOptions = TraceOptions::Messages; CommitCharacterBehavior m_commitCharacterBehavior = CommitCharacterBehavior::MembersOnly; RefPtr<JSONRPCConnection> m_connection; ComPtr<slang::IGlobalSession> m_session; RefPtr<Workspace> m_workspace; Dictionary<String, String> m_lastPublishedDiagnostics; - time_t m_lastDiagnosticUpdateTime = 0; + std::chrono::time_point<std::chrono::system_clock> m_lastDiagnosticUpdateTime; FormatOptions m_formatOptions; Slang::InlayHintOptions m_inlayHintOptions; bool m_quit = false; @@ -136,6 +142,7 @@ private: void updateCommitCharacters(const JSONValue& value); void updateFormattingOptions(const JSONValue& clangFormatLoc, const JSONValue& clangFormatStyle); void updateInlayHintOptions(const JSONValue& deducedTypes, const JSONValue& parameterNames); + void updateTraceOptions(const JSONValue& value); void sendConfigRequest(); void registerCapability(const char* methodName); |
