docs: update README for improved quick start instructions and LSP server settings

This commit is contained in:
cfngc4594 2025-02-19 18:22:27 +08:00
parent 8338ed2e8f
commit d851bfa5cb

View File

@ -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 ### 🐳 Using Docker (Recommended)
docker compose up -d
cd .. ```sh
# Clone repository
git clone https://github.com/cfngc4594/monaco-editor-lsp-next
cd monaco-editor-lsp-next
# Start containers in detached mode
docker compose -f ./docker/compose.yml up -d
``` ```
2. **Install Dependencies** ## 🔧 Development Setup
```bash
```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 install
```
3. **Start Development Server**
```bash
bun run dev bun run dev
``` ```
## LSP Configuration ## ⚙️ Configuration
The project includes preconfigured LSP servers for: ### LSP Server Settings
- C (port 4594)
- C++ (port 4595)
Using [jsonrpc-ws-proxy](https://github.com/wylieconlon/jsonrpc-ws-proxy) to bridge Monaco Editor with clangd. | **Language** | **LSP Server** | **Port** |
|----------------|------------------|------------|
| `C` | `clangd` | `4594` |
| `C++` | `clangd` | `4595` |