mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
docs: update README for improved quick start instructions and LSP server settings
This commit is contained in:
parent
8338ed2e8f
commit
d851bfa5cb
51
README.md
51
README.md
@ -1,30 +1,39 @@
|
|||||||
|
<div align="center">
|
||||||
|
|
||||||
# monaco-editor-lsp-next
|
# monaco-editor-lsp-next
|
||||||
|
|
||||||
A demo project demonstrating LSP integration using Nextjs + @monaco-editor/react + monaco-languageclient.
|
✨ A Next.js integration of Monaco Editor with LSP support, free from SSR issues.
|
||||||
|
|
||||||
## Quick Start
|
</div>
|
||||||
|
|
||||||
1. **Start LSP Containers**
|
## 🚀 Quick Start
|
||||||
```bash
|
|
||||||
cd docker
|
|
||||||
docker compose up -d
|
|
||||||
cd ..
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Install Dependencies**
|
### 🐳 Using Docker (Recommended)
|
||||||
```bash
|
|
||||||
bun install
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Start Development Server**
|
```sh
|
||||||
```bash
|
# Clone repository
|
||||||
bun run dev
|
git clone https://github.com/cfngc4594/monaco-editor-lsp-next
|
||||||
```
|
cd monaco-editor-lsp-next
|
||||||
|
|
||||||
## LSP Configuration
|
# Start containers in detached mode
|
||||||
|
docker compose -f ./docker/compose.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
The project includes preconfigured LSP servers for:
|
## 🔧 Development Setup
|
||||||
- C (port 4594)
|
|
||||||
- C++ (port 4595)
|
|
||||||
|
|
||||||
Using [jsonrpc-ws-proxy](https://github.com/wylieconlon/jsonrpc-ws-proxy) to bridge Monaco Editor with clangd.
|
```sh
|
||||||
|
git clone https://github.com/cfngc4594/monaco-editor-lsp-next
|
||||||
|
cd monaco-editor-lsp-next
|
||||||
|
docker compose -f ./docker/compose.yml up -d lsp-c lsp-cpp
|
||||||
|
bun install
|
||||||
|
bun run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## ⚙️ Configuration
|
||||||
|
|
||||||
|
### LSP Server Settings
|
||||||
|
|
||||||
|
| **Language** | **LSP Server** | **Port** |
|
||||||
|
|----------------|------------------|------------|
|
||||||
|
| `C` | `clangd` | `4594` |
|
||||||
|
| `C++` | `clangd` | `4595` |
|
||||||
|
Loading…
Reference in New Issue
Block a user