refactor: remove unused editor and language config files

This commit is contained in:
cfngc4594 2025-03-05 08:28:52 +08:00
parent 527c52abbc
commit 753422ebf4
5 changed files with 0 additions and 70 deletions

View File

@ -1,3 +0,0 @@
import { SUPPORTED_LANGUAGES, SupportedLanguage } from "@/constants/language";
export const DEFAULT_EDITOR_LANGUAGE: SupportedLanguage = SUPPORTED_LANGUAGES[0].id;

View File

@ -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",
};

View File

@ -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) {
}
};`,
};

View File

@ -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",
},
];

View File

@ -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"];