mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
HackStudio: Allow toggling between simple and semantic highlighting
Until it becomes enough stable and performant, semantic highlighting is disabled by default. It can be toggled on via the "Project" menu in HackStudio.
This commit is contained in:
parent
81dcf6c58b
commit
8ec4328fcb
4 changed files with 33 additions and 8 deletions
|
@ -57,6 +57,7 @@ public:
|
|||
return *m_language_client;
|
||||
}
|
||||
virtual void set_cursor(const GUI::TextPosition& a_position) override;
|
||||
void set_semantic_syntax_highlighting(bool value);
|
||||
|
||||
private:
|
||||
virtual void focusin_event(GUI::FocusEvent&) override;
|
||||
|
@ -105,6 +106,8 @@ private:
|
|||
void on_token_info_timer_tick();
|
||||
void on_tokens_info_result(Vector<GUI::AutocompleteProvider::TokenInfo> const& tokens_info);
|
||||
void create_tokens_info_timer();
|
||||
ErrorOr<void> initialize_documentation_tooltip();
|
||||
ErrorOr<void> initialize_parameters_hint_tooltip();
|
||||
|
||||
explicit Editor();
|
||||
|
||||
|
@ -120,10 +123,8 @@ private:
|
|||
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();
|
||||
ErrorOr<void> initialize_parameters_hint_tooltip();
|
||||
bool m_use_semantic_syntax_highlighting { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue