mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
HackStudio: Use the C++ semantic syntax highlighter
HackStudio::Editor will now send a request to get semantic token information to the language server whenever there's a short pause in editing. The result is used by the semantic c++ syntax highlighter to provide better highlighting information.
This commit is contained in:
parent
10d75d7f21
commit
aba2e03b71
2 changed files with 49 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Itamar S. <itamar8910@gmail.com>
|
||||
* Copyright (c) 2018-2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -101,6 +102,9 @@ private:
|
|||
void set_language_client_for(const CodeDocument&);
|
||||
void set_autocomplete_provider_for(CodeDocument const&);
|
||||
void handle_function_parameters_hint_request();
|
||||
void on_token_info_timer_tick();
|
||||
void on_tokens_info_result(Vector<GUI::AutocompleteProvider::TokenInfo> const& tokens_info);
|
||||
void create_tokens_info_timer();
|
||||
|
||||
explicit Editor();
|
||||
|
||||
|
@ -115,6 +119,7 @@ private:
|
|||
bool m_autocomplete_in_focus { false };
|
||||
RefPtr<GUI::Action> m_evaluate_expression_action;
|
||||
RefPtr<GUI::Action> m_move_execution_to_line_action;
|
||||
RefPtr<Core::Timer> m_tokens_info_timer; // Used for querying language server for syntax highlighting info
|
||||
|
||||
OwnPtr<LanguageClient> m_language_client;
|
||||
ErrorOr<void> initialize_documentation_tooltip();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue