From d851bfa5cb3100db414634a260ee1e12e1a14bf7 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Wed, 19 Feb 2025 18:22:27 +0800 Subject: [PATCH] docs: update README for improved quick start instructions and LSP server settings --- README.md | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 05a7032..b08bf12 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,39 @@ +
+ # 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 +
-1. **Start LSP Containers** - ```bash - cd docker - docker compose up -d - cd .. - ``` +## 🚀 Quick Start -2. **Install Dependencies** - ```bash - bun install - ``` +### 🐳 Using Docker (Recommended) -3. **Start Development Server** - ```bash - bun run dev - ``` +```sh +# Clone repository +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: -- C (port 4594) -- C++ (port 4595) +## 🔧 Development Setup -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` |