Skip to content

Commit

Permalink
fix: improve syntax highlighting for jsx/tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
sidwebworks committed Jun 11, 2022
1 parent 67d5702 commit cd16a1a
Show file tree
Hide file tree
Showing 7 changed files with 1,731 additions and 842 deletions.
8 changes: 4 additions & 4 deletions src/components/editor/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useEditor } from "@hooks/use-editor";
import MonacoEditor, { OnMount } from "@monaco-editor/react";
import React, { Fragment, useMemo } from "react";
import { useTypedSelector } from "../../lib/store/store";
import React, { Fragment } from "react";
import { onBeforeEditorMount } from "../../lib/monaco/plugins";
import theme from "../../lib/monaco/themes/night_owl.json";
import WelcomeScreen from "./WelcomeScreen";
import theme from "../../lib/monaco/themes/night-owl.json";
import { useTypedSelector } from "../../lib/store/store";


const Editor: React.FC = () => {
const options = useTypedSelector((s) => s.editor.options);
Expand Down
10 changes: 1 addition & 9 deletions src/lib/monaco/plugins/typings.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ const plugin = (monaco: Monaco, deps: Record<string, string>) => {

let timeout: void | NodeJS.Timeout = setTimeout(stop, 2500);


console.log(deps);

Object.keys(deps).forEach((name) => {
count++;
store.dispatch(START_TYPE_FETCH());
console.log(name);

worker.postMessage({
name,
version: deps[name],
Expand All @@ -40,7 +37,6 @@ const plugin = (monaco: Monaco, deps: Record<string, string>) => {
// typings: result,

const entries = Object.keys(event.data.typings);
console.log(entries);

const types = entries.reduce((acc, curr) => {
const libUri = `file:///${curr}`;
Expand All @@ -66,8 +62,6 @@ const plugin = (monaco: Monaco, deps: Record<string, string>) => {
return acc;
}, {});

console.log(types);

count--;
if (count < 1) {
stop();
Expand Down Expand Up @@ -99,5 +93,3 @@ const plugin = (monaco: Monaco, deps: Record<string, string>) => {
};

export default plugin;


Loading

1 comment on commit cd16a1a

@vercel
Copy link

@vercel vercel bot commented on cd16a1a Jun 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web-pen – ./

web-pen-git-master-sidwebworks.vercel.app
web-pen.vercel.app
web-pen-sidwebworks.vercel.app

Please sign in to comment.