judge4c based on monaco-editor-lsp-next
Go to file
2025-02-24 13:34:56 +08:00
docker/lsp/clangd feat(docker): simplify docker compose commands and add compose.yml for service configuration 2025-02-21 19:56:49 +08:00
public docs: add placeholder .gitkeep file to 'public' folder 2025-02-20 01:31:14 +08:00
src fix(code-editor): simplify onMount callback parameters for clarity 2025-02-24 13:34:56 +08:00
.dockerignore feat(docker): add Dockerfile and .dockerignore for containerized environment setup 2025-02-19 17:13:31 +08:00
.env.example fix(language-server): update configuration to use environment variables for WebSocket settings 2025-02-24 00:22:34 +08:00
.gitignore chore: update .gitignore to explicitly commit env files 2025-02-20 08:42:01 +08:00
bun.lock feat(components/ui): add Badge and Tabs components from shadcn/ui 2025-02-23 16:37:12 +08:00
components.json chore: initialize shadcn/ui 2025-02-19 09:07:30 +08:00
compose.yml feat(docker): update docker-compose commands and add health checks for services 2025-02-22 00:10:47 +08:00
demo.png chore(demo): update demo image for improved visuals 2025-02-24 13:33:27 +08:00
Dockerfile chore: update Dockerfile to specify Node.js v20 or higher for resolving ReferenceError 2025-02-20 08:54:37 +08:00
eslint.config.mjs chore: initialize the project 2025-02-19 09:00:15 +08:00
LICENSE chore: add MIT License file to the repository 2025-02-19 18:38:49 +08:00
next.config.ts feat(config): enable standalone output mode for Docker builds in Next.js 2025-02-19 17:14:25 +08:00
package.json feat(components/ui): add Badge and Tabs components from shadcn/ui 2025-02-23 16:37:12 +08:00
postcss.config.mjs chore: initialize the project 2025-02-19 09:00:15 +08:00
README.md feat(docker): update docker-compose commands and add health checks for services 2025-02-22 00:10:47 +08:00
tailwind.config.ts chore: initialize shadcn/ui 2025-02-19 09:07:30 +08:00
tsconfig.json chore: initialize the project 2025-02-19 09:00:15 +08:00

monaco-editor-lsp-next

A Next.js integration of Monaco Editor with LSP support, free from SSR issues.

demo

⚠️ Important Notice for WSL Users!

If you're using Windows Subsystem for Linux (WSL), it's crucial to switch your network mode to "Mirrored".

Otherwise, the Monaco Editor might fail to connect to the LSP language servers.

This is typically due to IPv6 configuration issues.

To change your WSL network mode, follow these steps:

  1. Open WSL settings. ⚙️
  2. Navigate to the "Network" section. 🌐
  3. Change the network mode to "Mirrored". 🔄
  4. Restart WSL. 💻

After completing these steps, the Monaco Editor should be able to connect to the LSP language servers without any problems. 🎉

🚀 Quick Start

# Clone repository
git clone https://github.com/cfngc4594/monaco-editor-lsp-next
cd monaco-editor-lsp-next

# Start containers in detached mode
docker compose up -d --build

🔧 Manual Setup

# Clone repository
git clone https://github.com/cfngc4594/monaco-editor-lsp-next
cd monaco-editor-lsp-next

# Start specific containers (lsp-c and lsp-cpp) in detached mode
docker compose up -d --build lsp-c lsp-cpp

# Install project dependencies using Bun package manager
bun install

# Run the development server
bun run dev

⚙️ Configuration

LSP Server Settings

Language LSP Server Port
C clangd 4594
C++ clangd 4595