diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-03-08 20:59:05 +0000 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-03-11 13:22:57 +0000 |
commit | 08c1effc04c08735621394b571da508fce91bd7b (patch) | |
tree | 21d1a7fb3fce225c6a9a2dd161f9f755c0af3d34 /Userland/DevTools/HackStudio/LanguageClient.h | |
parent | ffce6cc9779c301bd91297dfc03f5578cf2a150a (diff) | |
download | serenity-08c1effc04c08735621394b571da508fce91bd7b.zip |
HackStudio: Use Syntax::Language instead of our own one
The one behavior difference here is that the statusbar used to display
"Unknown" for unknown file types, and "Markdown" for md, but we now
display "Plain Text" for all file types without syntax highlighters.
Diffstat (limited to 'Userland/DevTools/HackStudio/LanguageClient.h')
-rw-r--r-- | Userland/DevTools/HackStudio/LanguageClient.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageClient.h b/Userland/DevTools/HackStudio/LanguageClient.h index e918bd4351..a1d5fa15ed 100644 --- a/Userland/DevTools/HackStudio/LanguageClient.h +++ b/Userland/DevTools/HackStudio/LanguageClient.h @@ -7,7 +7,6 @@ #pragma once #include "AutoCompleteResponse.h" -#include "Language.h" #include <AK/Forward.h> #include <AK/LexicalPath.h> #include <AK/Types.h> @@ -16,6 +15,7 @@ #include <LibCore/ElapsedTimer.h> #include <LibCpp/Preprocessor.h> #include <LibIPC/ConnectionToServer.h> +#include <LibSyntax/Language.h> #include <DevTools/HackStudio/LanguageServers/LanguageClientEndpoint.h> #include <DevTools/HackStudio/LanguageServers/LanguageServerEndpoint.h> @@ -69,7 +69,7 @@ public: template<typename LanguageServerType> static ConnectionToServerWrapper& get_or_create(DeprecatedString const& project_path); - Language language() const { return m_language; } + Syntax::Language language() const { return m_language; } ConnectionToServer* connection(); void on_crash(); void try_respawn_connection(); @@ -83,7 +83,7 @@ private: void show_crash_notification() const; void show_frequent_crashes_notification() const; - Language m_language; + Syntax::Language m_language; Function<NonnullRefPtr<ConnectionToServer>()> m_connection_creator; RefPtr<ConnectionToServer> m_connection; @@ -125,7 +125,7 @@ public: m_connection_wrapper.set_active_client(*m_previous_client); } - Language language() const { return m_connection_wrapper.language(); } + Syntax::Language language() const { return m_connection_wrapper.language(); } void set_active_client(); bool is_active_client() const; virtual void open_file(DeprecatedString const& path, int fd); |