diff --git a/docs/extending/create-plugin.mdx b/docs/extending/create-plugin.mdx index d82e95b0c..83cea383b 100644 --- a/docs/extending/create-plugin.mdx +++ b/docs/extending/create-plugin.mdx @@ -52,7 +52,7 @@ public class MyFlipperPlugin implements FlipperPlugin { @end ``` -```c++ +```cpp class MyFlipperPlugin : public FlipperPlugin { public: std::string identifier() const override { return "MyFlipperPlugin"; } @@ -130,7 +130,7 @@ connection.receive("getData", new FlipperReceiver() { @end ``` -```c++ +```cpp void MyFlipperPlugin::didConnect(std::shared_ptr conn) { conn->receive("getData", [](const folly::dynamic ¶ms, std::unique_ptr responder) { @@ -177,7 +177,7 @@ connection.send("MyMessage", [connection send:@"getData" withParams:@{@"message":@"hello"}]; ``` -```c++ +```cpp void MyFlipperPlugin::didConnect(std::shared_ptr conn) { dynamic message = folly::dynamic::object("message", "hello"); conn->send("getData", message); diff --git a/docs/extending/layout-inspector.mdx b/docs/extending/layout-inspector.mdx index b7129233c..24c547ed6 100644 --- a/docs/extending/layout-inspector.mdx +++ b/docs/extending/layout-inspector.mdx @@ -62,7 +62,7 @@ To expose an object to the layout inspector in Sonar you have to implement a `SK **Don't** -```objc +```objectivec @interface SKArbitraryViewDescriptor : SKViewDescriptor @end @@ -80,7 +80,7 @@ To expose an object to the layout inspector in Sonar you have to implement a `SK **Do** -```objc +```objectivec @interface SKArbitraryViewDescriptor : SKNodeDescriptor @end @@ -99,7 +99,7 @@ To expose an object to the layout inspector in Sonar you have to implement a `SK In order to register your descriptor for an object, you use `SKDescriptorMapper`. After registering all descriptors you pass on the descriptor-mapper object to the plugin during initialisation. -```objc +```objectivec [descriptorMapper registerDescriptor:[SKArbitraryViewDescriptor new] forClass:[AbritraryView class]]; @@ -118,7 +118,7 @@ Sometimes all you need is to extend the functionality of an existing descriptor. If you want to extend the `SKComponentKitLayoutDescriptor` and add an additional section based on the nodes of the `SKComponentLayoutDescriptor`, you can use `SKSubDescriptor`. -```objc +```objectivec #import NSString *YourSubDescriptor(SKComponentLayoutWrapper *)node { diff --git a/docs/extending/send-data.mdx b/docs/extending/send-data.mdx index 315d598ba..9c583019f 100644 --- a/docs/extending/send-data.mdx +++ b/docs/extending/send-data.mdx @@ -26,7 +26,7 @@ MyFlipperPlugin *myPlugin = [client pluginWithIdentifier:@"MyFlipperPlugin"]; [myPlugin sendData:myData]; ``` -```c++ +```cpp auto& client = FlipperClient::instance(); auto myPlugin = client.getPlugin("MyFlipperPlugin"); if (myPlugin) { diff --git a/docs/setup/shared-preferences-plugin.mdx b/docs/setup/shared-preferences-plugin.mdx index 12f43d8eb..597858c07 100644 --- a/docs/setup/shared-preferences-plugin.mdx +++ b/docs/setup/shared-preferences-plugin.mdx @@ -27,7 +27,7 @@ Initialize the plugin in the following way: -```objc +```objectivec #import [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:@"your_suitename"]]; diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 30f42d182..b7c240401 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -72,6 +72,9 @@ const siteConfig = { hitsPerPage: 5, }, }, + prism: { + additionalLanguages: ['groovy', 'java', 'kotlin', 'ruby', 'swift'], + }, }, favicon: 'img/icon.png', scripts: [