mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
refactor: remove unused editor and language config files
This commit is contained in:
parent
527c52abbc
commit
753422ebf4
@ -1,3 +0,0 @@
|
|||||||
import { SUPPORTED_LANGUAGES, SupportedLanguage } from "@/constants/language";
|
|
||||||
|
|
||||||
export const DEFAULT_EDITOR_LANGUAGE: SupportedLanguage = SUPPORTED_LANGUAGES[0].id;
|
|
@ -1,6 +0,0 @@
|
|||||||
import { SupportedLanguage } from "@/constants/language";
|
|
||||||
|
|
||||||
export const DEFAULT_EDITOR_PATH: Record<SupportedLanguage, string> = {
|
|
||||||
c: "file:///main.c",
|
|
||||||
cpp: "file:///main.cpp",
|
|
||||||
};
|
|
@ -1,16 +0,0 @@
|
|||||||
import { SupportedLanguage } from "@/constants/language";
|
|
||||||
|
|
||||||
export const DEFAULT_EDITOR_VALUE: Record<SupportedLanguage, string> = {
|
|
||||||
c: `/**
|
|
||||||
* Note: The returned array must be malloced, assume caller calls free().
|
|
||||||
*/
|
|
||||||
int* twoSum(int* nums, int numsSize, int target, int* returnSize) {
|
|
||||||
|
|
||||||
}`,
|
|
||||||
cpp: `class Solution {
|
|
||||||
public:
|
|
||||||
vector<int> twoSum(vector<int>& nums, int target) {
|
|
||||||
|
|
||||||
}
|
|
||||||
};`,
|
|
||||||
};
|
|
@ -1,29 +0,0 @@
|
|||||||
import { SupportedLanguage } from '@/constants/language'
|
|
||||||
|
|
||||||
export interface LanguageServerConfig {
|
|
||||||
id: SupportedLanguage
|
|
||||||
label: string
|
|
||||||
hostname: string
|
|
||||||
protocol: string
|
|
||||||
port: number | null
|
|
||||||
path: string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export const SUPPORTED_LANGUAGE_SERVERS: LanguageServerConfig[] = [
|
|
||||||
{
|
|
||||||
id: "c",
|
|
||||||
label: "C",
|
|
||||||
protocol: process.env.NEXT_PUBLIC_LSP_C_PROTOCOL || "ws",
|
|
||||||
hostname: process.env.NEXT_PUBLIC_LSP_C_HOSTNAME || "localhost",
|
|
||||||
port: process.env.NEXT_PUBLIC_LSP_C_PORT ? parseInt(process.env.NEXT_PUBLIC_LSP_C_PORT, 10) : 4594,
|
|
||||||
path: process.env.NEXT_PUBLIC_LSP_C_PATH || "/clangd",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "cpp",
|
|
||||||
label: "C++",
|
|
||||||
protocol: process.env.NEXT_PUBLIC_LSP_CPP_PROTOCOL || "ws",
|
|
||||||
hostname: process.env.NEXT_PUBLIC_LSP_CPP_HOSTNAME || "localhost",
|
|
||||||
port: process.env.NEXT_PUBLIC_LSP_CPP_PORT ? parseInt(process.env.NEXT_PUBLIC_LSP_CPP_PORT, 10) : 4595,
|
|
||||||
path: process.env.NEXT_PUBLIC_LSP_CPP_PATH || "/clangd",
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,16 +0,0 @@
|
|||||||
import { COriginal, CplusplusOriginal } from 'devicons-react'
|
|
||||||
|
|
||||||
export const SUPPORTED_LANGUAGES = [
|
|
||||||
{
|
|
||||||
id: "c",
|
|
||||||
label: "C",
|
|
||||||
icon: <COriginal size={16} aria-hidden="true" />
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "cpp",
|
|
||||||
label: "C++",
|
|
||||||
icon: <CplusplusOriginal size={16} aria-hidden="true" />,
|
|
||||||
},
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export type SupportedLanguage = (typeof SUPPORTED_LANGUAGES)[number]["id"];
|
|
Loading…
Reference in New Issue
Block a user