{"id":34777349,"url":"https://github.com/heckmon/code_forge","last_synced_at":"2026-02-07T08:09:12.616Z","repository":{"id":328116986,"uuid":"1106629133","full_name":"heckmon/code_forge","owner":"heckmon","description":"A powerful, feature-rich code editor widget created using Flutter","archived":false,"fork":false,"pushed_at":"2026-02-03T17:36:47.000Z","size":11397,"stargazers_count":61,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-04T07:23:21.539Z","etag":null,"topics":["code-field","code-forge","flutter-code-editor","flutter-code-forge","flutter-code-snippet","flutter-syntax-highlighter"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/code_forge","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heckmon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-29T16:17:41.000Z","updated_at":"2026-02-03T17:35:28.000Z","dependencies_parsed_at":"2026-01-29T11:01:56.987Z","dependency_job_id":null,"html_url":"https://github.com/heckmon/code_forge","commit_stats":null,"previous_names":["heckmon/code_forge"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/heckmon/code_forge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckmon%2Fcode_forge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckmon%2Fcode_forge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckmon%2Fcode_forge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckmon%2Fcode_forge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heckmon","download_url":"https://codeload.github.com/heckmon/code_forge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckmon%2Fcode_forge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29189675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-field","code-forge","flutter-code-editor","flutter-code-forge","flutter-code-snippet","flutter-syntax-highlighter"],"created_at":"2025-12-25T08:37:09.224Z","updated_at":"2026-02-07T08:09:12.610Z","avatar_url":"https://github.com/heckmon.png","language":"Dart","readme":"\u003ch1 align=\"center\"\u003e⚒️ CodeForge\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA powerful, feature-rich code editor created using Flutter\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eBring VS Code-level editing experience to your Flutter apps\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A complete and better alternative for \u003ca href=https://pub.dev/packages/re_editor\u003ere_editor\u003c/a\u003e, \u003ca href=https://pub.dev/packages/flutter_code_crafter\u003eflutter_code_crafter\u003c/a\u003e, \u003ca href=https://pub.dev/packages/flutter_code_editor\u003eflutter_code_editor\u003c/a\u003e, \u003ca href =https://pub.dev/packages/code_text_field\u003ecode_text_field\u003c/a\u003e, etc\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pub.dev/packages/code_forge\"\u003e\n    \u003cimg src=\"https://img.shields.io/pub/v/code_forge.svg?style=for-the-badge\u0026logo=dart\u0026logoColor=white\u0026labelColor=0175C2\u0026color=02569B\" alt=\"Pub Version\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/heckmon/code_forge/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-green?style=for-the-badge\u0026labelColor=333333\u0026color=4CAF50\" alt=\"License\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/heckmon/code_forge/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/heckmon/code_forge.svg?style=for-the-badge\u0026logo=github\u0026labelColor=333333\u0026color=FFD700\" alt=\"GitHub Stars\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://flutter.dev\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Platform-Flutter-02569B?style=for-the-badge\u0026logo=flutter\u0026logoColor=white\" alt=\"Platform\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/heckmon/code_forge/refs/heads/main/gifs/code_forge_100k.gif\" alt=\"CodeForge Demo\" width=\"800\"/\u003e\u003csub\u003e\u003cbr\u003elarge code support (tested with 100k+ lines) and LSP based intelligent lazy highlighting\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003e [!NOTE]\n\u003e\n\u003e code_forge does **not** support Flutter web, as it relies on `dart:io` for core functionality. Use [code_forge_web](https://pub.dev/packages/code_forge_web) for web support.\n\n\n### What's new in 8.3.0\n  - FIX: [#37](https://github.com/heckmon/code_forge/issues/37)\n  - FIX: [#36](https://github.com/heckmon/code_forge/issues/36)\n  - FEATURE: [#38](https://github.com/heckmon/code_forge/issues/38)\n\n## Why CodeForge?\n**Feature demos:** [CodeForge Features Showcase](https://heckmon.github.io/code_forge_demo/)\n\n**CodeForge** is a next-generation code editor widget designed for developers who demand more. Whether you're building an IDE, a code snippet viewer, or an educational coding platform, CodeForge delivers:\n\n\n| Feature | CodeForge | Others |\n|---------|:---------:|:------:|\n| Syntax Highlighting | 180+ languages\u003cbr\u003e[Availabe languages](https://github.com/reqable/re-highlight/tree/main/lib/languages) | ✅ |\n| Code Folding | Smart detection | ⚠️ Limited |\n| LSP Integration | Full support | ❌ |\n| AI Completion | Multi-model | ❌ |\n| Semantic Tokens | Real-time | ❌ |\n| Diagnostics | Inline errors | ❌ |\n| Undo/Redo | Smart grouping | ⚠️ Basic |\n| Full Theming |[Available themes](https://github.com/reqable/re-highlight/tree/main/lib/styles) | ⚠️ Limited |\n\n### What makes CodeForge different from other editors:\n- Uses the rope data structure instead of regular char array to to handle large text.\n- Uses flutter's low level `RenderBox` and `ParagrahBuilder` to render text insted of `TextField` for efficiency.\n- Built in [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) client\n- AI Code completion.\n\n---\n\nTo see working examples of all CodeForge features including AI Code Completion, LSP Integration, Smart Code Folding, Syntax Highlighting, Search and Replace, and RTL Language Support, visit the features showcase page above.\n\n### 🌟 More Features\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e📋 Complete Feature List\u003c/strong\u003e\u003c/summary\u003e\n\n#### Editor Core\n- ⚡ **Rope Data Structure** — Optimized for large files\n- 🎨 **180+ Languages** — Via `re_highlight` package\n- 📁 **Code Folding** — Smart block detection\n- 📏 **Indentation Guides** — Visual code structure\n- 🔢 **Line Numbers** — With active line highlighting\n- ↩️ **Smart Undo/Redo** — Timestamp-based grouping\n- 🔍 **Search Highlighting** — Find and highlight matches\n- ✂️ **Line Operations** — Move, duplicate, delete lines\n\n#### LSP Features\n- 💡 **Intelligent Completions** — Context-aware code suggestions with auto-import\n- 📖 **Hover Documentation** — Rich markdown tooltips with type information\n- 🚨 **Real-time Diagnostics** — Errors and warnings with quick fixes\n- 🎨 **Semantic Highlighting** — Token-based coloring with modifiers\n- 💬 **Signature Help** — Function signatures and parameter hints\n- 🔧 **Code Actions** — Quick fixes and refactoring suggestions\n- ✨ **Inlay Hints** — Inline annotations for types and parameters\n- 🎯 **Document Highlight** — Highlight symbol occurrences\n- 🎨 **Document Colors** — Color value detection and picker\n- 📍 **Go to Definition** — Navigate to symbol definitions\n- ✏️ **Symbol Renaming** — Rename symbols across workspace\n- 📡 **Multiple Protocols** — Stdio and WebSocket support\n- ⚙️ **Capability Control** — Selectively enable/disable LSP features\n\n#### Customization\n- 🎨 **Full Theming** — Every element customizable\n- 📐 **Gutter Styling** — Colors, icons, sizes\n- ✨ **Selection Styling** — Cursor, selection, bubbles\n- 💬 **Popup Styling** — Suggestions, hover details\n\n\u003c/details\u003e\n\n---\n\n## 📦 Installation\n\nAdd CodeForge to your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  code_forge: ^8.3.0\n```\n\nThen run:\n\n```bash\nflutter pub get\n```\n\n---\n\n## 🚀 Quick Start\n\n### Basic Usage\n\nImport a theme and a language from the [re_highlight](https://pub.dev/packages/re_highlight) package and you are good to go. (Defaults to `langDart` and `vs2015Theme`):\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:code_forge/code_forge.dart';\nimport 'package:re_highlight/languages/python.dart';\nimport 'package:re_highlight/styles/atom-one-dark.dart';\n\nvoid main() =\u003e runApp(const MyApp());\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: CodeForge(\n          language: langPython, // Defaults to langDart\n          editorTheme: atomOneDarkTheme, // Defaults to vs2015Theme\n        ),\n      ),\n    );\n  }\n}\n```\n\n### With Controller\n\nFor more control over the editor:\n\n```dart\nclass _EditorState extends State\u003cEditor\u003e {\n  final _controller = CodeForgeController();\n  final _undoController = UndoRedoController();\n\n  @override\n  Widget build(BuildContext context) {\n    return CodeForge(\n      controller: _controller, // Optional controller for more features.\n      undoController: _undoController, // Optional undo controller to control the undo-redo operations.\n    );\n  }\n}\n```\n\n---\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003ch2\u003e🔌 LSP Integration\u003c/h2\u003e\u003c/summary\u003e\n\nConnect to any Language Server Protocol compatible server for intelligent code assistance.\n\nCodeForge provides a built-in LSP client that allows you to connect to any LSP server for intelligent highlighting, completions, hover details, diagnostics, and more.\n\n## Types\n#### There are two ways to configure LSP client with the `CodeForge`:\n1. Using WebSocket (easy and recommended)\n2. Using stdio\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e1. Using WebSocket\u003c/h3\u003e\u003c/summary\u003e\n\nThe class `LspSocketConfig` is used to connect to an LSP server using WebSocket. It takes the following parameters:\n- `serverUrl`: The WebSocket URL of the LSP server.\n- `filePath`: A filePath is required by the LSP server to provide completions and diagnostics.\n- `workspacePath`: The workspace path is the current directory or the parent directory which holds the `filePath` file.\n- `languageId`: This is a server specific parameter. eg: `'python'` is the language ID used in basedpyright/pyright language server.\n\nYou can easily start any language server using websocket using the  [lsp-ws-proxy](https://github.com/qualified/lsp-ws-proxy) package. For example, to start the basedpyright language server, you can use the following command:\u003cbr\u003e\n(On Android, you can use [Termux](https://github.com/termux/termux-app))\n\n```bash\ncd /Downloads/lsp-ws-proxy_linux # Navigate to the directory where lsp-ws-proxy is located\n\n./lsp-ws-proxy --listen 5656 -- basedpyright-langserver --stdio # Start the pyright language server on port 5656\n```\n\n#### Example:\ncreate a `LspSocketConfig` object and pass it to the `CodeForgeController` widget.\n\n```dart\nfinal lspConfig = LspSocketConfig(\n    workspacePath: \"/home/athul/Projects/lsp\",\n    languageId: \"python\",\n    serverUrl: \"ws://localhost:5656\"\n),\n```\nThen pass the `lspConfig` instance to the `CodeForgeController` widget:\n\n```dart\nfinal _controller = CodeForgeController(\n  lspConfig: lspConfig // Pass the LspConfig here.\n)\n\nCodeForge(\n    controller: _controller, // Pass the controller here.\n    theme: anOldHopeTheme,\n    filePath: \"/home/athul/Projects/lsp/example.py\"\n),\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e2. Using Stdio\u003c/h3\u003e\u003c/summary\u003e\n\nThis method is easy to start—no terminal setup or extra packages are needed—but it does require a bit more setup in your code. The `LspStdioConfig.start()` method connects to an LSP server using stdio and is asynchronous, so you'll typically use a `FutureBuilder` to handle initialization. It accepts the following parameters:\n- `executable`: Location of the LSP server executable file.\n- `args`: Arguments to pass to the LSP server executable.\n- `filePath`: A filePath is required by the LSP server to provide completions and diagnostics.\n- `workspacePath`: The workspace path is the current directory or parent directory which holds the `filePath` file.\n- `languageId`: This is a server specific parameter. eg: `'python'` is the language ID used in pyright language server.\n\nTo get the `executable` path, you can use the `which` command in the terminal. For example, to get the path of the `basedpyright-langserver`, you can use the following command:\n\n```bash\nwhich basedpyright-langserver\n```\n\n#### Example:\nCreate an async method to initialize the LSP configuration.\n```dart\nFuture\u003cLspConfig?\u003e _initLsp() async {\n    try {\n      final config = await LspStdioConfig.start(\n        executable: '/home/athul/.nvm/versions/node/v20.19.2/bin/basedpyright-langserver',\n        args: ['--stdio'],\n        workspacePath: '/home/athul/Projects/lsp',\n        languageId: 'python',\n      );\n      \n      return config;\n    } catch (e) {\n      debugPrint('LSP Initialization failed: $e');\n      return null;\n    }\n  }\n  ```\n  Then use a `FutureBuilder` to initialize the LSP configuration and pass it to the `CodeForgeController` widget:\n```dart\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: SafeArea(\n          child: FutureBuilder(\n            future: _initLsp(), // Call the async method to get the LSP config.\n            builder: (context, snapshot) {\n              if(snapshot.connectionState == ConnectionState.waiting) {\n                return Center(child: CircularProgressIndicator());\n              }\n              return CodeForge(\n                editorTheme: anOldHopeTheme,\n                controller: CodeForgeController(\n                  lspConfig: snapshot.data // Pass the config here.\n                ),\n                filePath: '/home/athul/Projects/lsp/example.py',\n                textStyle: TextStyle(fontSize: 15, fontFamily: 'monospace'),\n              );\n            }\n          ),\n        ) \n      ),\n    );\n  }\n```\n\u003c/details\u003e\n\n\u003chr style=\"height: 1px; border: none; border-top: 1px\"\u003e\n\n### Dart LSP Example Using Stdio\n\n```dart\nFuture\u003cLspConfig\u003e setupDartLsp() async {\n  return await LspStdioConfig.start(\n    executable: 'dart',\n    args: ['language-server', '--protocol=lsp'],\n    workspacePath: '/path/to/your/project',\n    languageId: 'dart',\n  );\n}\n\n// In your widget\n@override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: SafeArea(\n          child: FutureBuilder\u003cLspConfig\u003e(\n            future: setupDartLsp(),\n            builder: (context, snapshot) {\n              if (snapshot.connectionState == ConnectionState.waiting) {\n                return CircularProgressIndicator();\n              }\n              return CodeForge(\n                language: langDart,\n                textStyle: GoogleFonts.jetBrainsMono(),\n                controller: CodeForgeController(\n                  lspConfig: snapshot.data\n                ),\n                filePath: '/path/to/your/file.dart', // Mandatory field\n              )\n            },\n          ),\n        ),\n      ),\n    );\n  }\n```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch2\u003e🎨 Customization\u003c/h2\u003e\u003c/summary\u003e\n\nCodeForge offers extensive customization options for every aspect of the editor.\n\n### Theme \u0026 Styling\n\n```dart\nCodeForge(\n  controller: controller,\n  language: langDart,\n  \n  // Editor theme (syntax colors)\n  editorTheme: vs2015Theme,\n  \n  // Text styling\n  textStyle: GoogleFonts.jetBrainsMono(fontSize: 14),\n\n  // AI Completion styling\n  aiCompletionTextStyle: TextStyle(\n    color: Colors.grey, // Change the color of the AI completion text\n    fontStyle: FontStyle.italic, // Make the AI completion text italic\n  ),\n  \n  // Selection \u0026 cursor\n  selectionStyle: CodeSelectionStyle(\n    cursorColor: Colors.white,\n    selectionColor: Colors.blue.withOpacity(0.3),\n    cursorBubbleColor: Colors.blue,\n  ),\n  \n  // Gutter (line numbers \u0026 fold icons)\n  gutterStyle: GutterStyle(\n    lineNumberStyle: TextStyle(color: Colors.grey),\n    backgroundColor: Color(0xFF1E1E1E),\n    activeLineNumberColor: Colors.white,\n    foldedIconColor: Colors.grey,\n    unfoldedIconColor: Colors.grey,\n    errorLineNumberColor: Colors.red,\n    warningLineNumberColor: Colors.orange,\n  ),\n  \n  // Suggestion popup\n  suggestionStyle: SuggestionStyle(\n    backgroundColor: Color(0xFF252526),\n    textStyle: TextStyle(color: Colors.white),\n    elevation: 8,\n  ),\n  \n  // Hover documentation\n  hoverDetailsStyle: HoverDetailsStyle(\n    backgroundColor: Color(0xFF252526),\n    textStyle: TextStyle(color: Colors.white),\n  ),\n\n  // Highlight matching text using [controller.findWord()] and [controller.findRegex()]\n  matchHighlightStyle: const MatchHighlightStyle(\n    currentMatchStyle: TextStyle(\n      backgroundColor: Color(0xFFFFA726),\n    ),\n    otherMatchStyle: TextStyle(\n      backgroundColor: Color(0x55FFFF00),\n    ),\n  ),\n)\n```\n\n### Feature Toggles\n\n```dart\nCodeForge(\n  // Enable/disable features\n  enableFolding: true,        // Code folding\n  enableGutter: true,         // Line numbers\n  enableGuideLines: true,     // Indentation guides\n  enableGutterDivider: false, // Gutter separator line\n  enableSuggestions: true,    // Autocomplete\n  enableKeyboardSuggestions: true // Suggestions from the OS keyboard\n  \n  // Behavior\n  readOnly: false,            // Read-only mode\n  autoFocus: true,            // Auto-focus on mount\n  lineWrap: false,            // Line wrapping\n)\n```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch2\u003e📚 API Reference\u003c/h2\u003e\u003c/summary\u003e\n\n### CodeForge Widget\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `controller` | `CodeForgeController?` | Text and selection controller |\n| `findController` | `FindController?` | Finder controller for managing search functionality |\n| `undoController` | `UndoRedoController?` | Undo/redo history controller |\n| `editorTheme` | `Map\u003cString, TextStyle\u003e?` | Syntax color theme |\n| `language` | `Mode?` | Syntax highlighting language |\n| `focusNode` | `FocusNode?` | Focus node for managing keyboard focus |\n| `textStyle` | `TextStyle?` | Base text style |\n| `ghostTextStyle` | `TextStyle?` | Text style for ghost text (inline suggestions) |\n| `innerPadding` | `EdgeInsets?` | Padding inside the editor content area |\n| `verticalScrollController` | `ScrollController?` | Custom scroll controller for vertical scrolling |\n| `horizontalScrollController` | `ScrollController?` | Custom scroll controller for horizontal scrolling |\n| `selectionStyle` | `CodeSelectionStyle?` | Selection styling |\n| `gutterStyle` | `GutterStyle?` | Gutter styling |\n| `suggestionStyle` | `SuggestionStyle?` | Suggestion popup styling |\n| `hoverDetailsStyle` | `HoverDetailsStyle?` | Hover popup styling |\n| `matchHighlightStyle` | `MatchHighlightStyle?` | Highlight the matching words in the controller.findWord() API |\n| `filePath` | `String?` | File path for LSP |\n| `initialText` | `String?` | Initial editor content |\n| `readOnly` | `bool` | Read-only mode |\n| `lineWrap` | `bool` | Line wrapping |\n| `autoFocus` | `bool` | Auto-focus on mount |\n| `enableFolding` | `bool` | Enable code folding |\n| `enableGuideLines` | `bool` | Show indentation guides |\n| `enableGutter` | `bool` | Show line numbers |\n| `enableGutterDivider` | `bool` | Show gutter divider |\n| `enableSuggestions` | `bool` | Enable autocomplete suggestions |\n| `enableKeyboardSuggestions` | `bool` | Show auto completions in OS virtual keyboard |\n| `keyboardType` | `TextInputType` | Type of virtual keyboard |\n| `deleteFoldRangeOnDeletingFirstLine` | `bool` | When true, deleting the first line of a folded block removes the entire block |\n| `finderBuilder` | `PreferredSizeWidget Function(FindController findController)?` | Builder for custom Finder widget |\n\n### CodeForgeController\n\n```dart\nfinal controller = CodeForgeController();\n\n// Text operations\ncontroller.text = 'Hello, World!';\nString content = controller.text;\ncontroller.getLineText(int lineIndex);\ncontroller.insertText(String text, int line, int character);\ncontroller.insertAtCurrentCursor(String text);\n\n// Selection \u0026 modification\ncontroller.selection = TextSelection(baseOffset: 0, extentOffset: 5);\ncontroller.selectAll();\ncontroller.copy();\ncontroller.cut();\ncontroller.paste();\n\n// Line operations\nint lineCount = controller.lineCount;\nString line = controller.getLineText(0);\nint lineStart = controller.getLineStartOffset(0);\ncontroller.duplicateLine();\ncontroller.moveLineDown();\ncontroller.moveLineUp();\ncontroller.backspace();\ncontroller.delete();\n\n// Folding\ncontroller.foldAll();\ncontroller.unfoldAll();\ncontroller.toggleFold(lineNumber);\n\n// Search \u0026 find\ncontroller.findWord(String word, matchCase: false, matchWholeWord: false);\ncontroller.findRegex(String pattern);\ncontroller.searchHighlights = [\n  SearchHighlight(start: 0, end: 5, color: Colors.yellow),\n];\n\n// Scroll navigation\ncontroller.scrollToLine(int line);\n\n// Inlay hints\nawait controller.fetchInlayHints(int startLine, int startCharacter, int endLine, int endCharacter);\ncontroller.showInlayHints();\ncontroller.hideInlayHints();\ncontroller.setInlayHints(List\u003cInlayHint\u003e hints);\ncontroller.clearInlayHints();\n\n// Document colors\nawait controller.fetchDocumentColors();\n\n// Document highlights\nawait controller.fetchDocumentHighlights(int line, int character);\ncontroller.clearDocumentHighlights();\n\n// LSP features\nawait controller.callSignatureHelp();\ncontroller.getCodeAction();\n\n// Editor decorations\ncontroller.setGitDiffDecorations(\n  addedRanges: [(int startLine, int endLine), ...],\n  removedRanges: [...],\n  modifiedRanges: [...],\n  addedColor: const Color(0xFF4CAF50),\n  removedColor: const Color(0xFFE53935),\n  modifiedColor: const Color(0xFF2196F3),\n);\ncontroller.clearGitDiffDecorations();\n\ncontroller.addLineDecoration(LineDecoration decoration);\ncontroller.addLineDecorations(List\u003cLineDecoration\u003e decorations);\ncontroller.removeLineDecoration(String id);\ncontroller.addGutterDecoration(GutterDecoration decoration);\ncontroller.addGutterDecorations(List\u003cGutterDecoration\u003e decorations);\ncontroller.removeGutterDecoration(String id);\ncontroller.clearGutterDecorations();\n\n// Ghost text (inline suggestions)\ncontroller.setGhostText(GhostText ghostText);\ncontroller.clearGhostText();\n\n// File operations\ncontroller.saveFile();\n\n// Navigation\ncontroller.pressLeftArrowKey(isShiftPressed: false);\ncontroller.pressRightArrowKey(isShiftPressed: false);\ncontroller.pressUpArrowKey(isShiftPressed: false);\ncontroller.pressDownArrowKey(isShiftPressed: false);\ncontroller.pressHomeKey(isShiftPressed: false);\ncontroller.pressEndKey(isShiftPressed: false);\ncontroller.pressDocumentHomeKey(isShiftPressed: false);\ncontroller.pressDocumentEndKey(isShiftPressed: false);\ncontroller.pressWordLeftArrowKey(isShiftPressed: false);\ncontroller.pressWordRightArrowKey(isShiftPressed: false);\n\n```\nThere are more methods available in the CodeForgeController API. You can see the complete list [here](https://pub.dev/documentation/code_forge/latest/code_forge_controller/CodeForgeController-class.html#instance-methods)\n\n### GutterStyle\n\n```dart\nGutterStyle({\n  TextStyle? lineNumberStyle,\n  Color? backgroundColor,\n  double? gutterWidth,\n  IconData foldedIcon,\n  IconData unfoldedIcon,\n  double? foldingIconSize,\n  Color? foldedIconColor,\n  Color? unfoldedIconColor,\n  Color? activeLineNumberColor,\n  Color? inactiveLineNumberColor,\n  Color errorLineNumberColor,\n  Color warningLineNumberColor,\n  Color? foldedLineHighlightColor,\n})\n```\n\n### CodeSelectionStyle\n\n```dart\nCodeSelectionStyle({\n  Color? cursorColor,\n  Color selectionColor,\n  Color cursorBubbleColor,\n})\n```\n\n### SuggestionStyle\n```dart\nSuggestionStyle(\n  shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),\n  backgroundColor: Colors.grey[900]!,\n  focusColor: Colors.blue.withOpacity(0.3),\n  hoverColor: Colors.blue.withOpacity(0.1),\n  splashColor: Colors.blue.withOpacity(0.2),\n  textStyle: TextStyle(color: Colors.white),\n)\n```\n\n### HoverDetailsStyle\n```dart\nHoverDetailsStyle(\n  shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),\n  backgroundColor: Colors.grey[850]!,\n  focusColor: Colors.blue.withOpacity(0.3),\n  hoverColor: Colors.blue.withOpacity(0.1),\n  splashColor: Colors.blue.withOpacity(0.2),\n  textStyle: TextStyle(color: Colors.white),\n)\n```\n\n### MatchHighlightStyle\n```dart\nmatchHighlightStyle: const MatchHighlightStyle(\n  currentMatchStyle: TextStyle(\n    backgroundColor: Color(0xFFFFA726),\n  ),\n  otherMatchStyle: TextStyle(\n    backgroundColor: Color(0x55FFFF00),\n  ),\n),\n```\n\n### LspClientCapabilities\n\nControls which LSP features are enabled during language server initialization.\n\n```dart\n// Pass to LspSocketConfig or LspStdioConfig\nfinal lspConfig = LspSocketConfig(\n  workspacePath: \"/path/to/workspace\",\n  languageId: \"dart\",\n  serverUrl: \"ws://localhost:5656\",\n  capabilities: LspClientCapabilities(\n    semanticHighlighting: true,  // Semantic token highlighting\n    codeCompletion: true,        // Code completion suggestions\n    hoverInfo: true,             // Hover documentation\n    codeAction: true,            // Code actions and quick fixes\n    signatureHelp: true,         // Signature help\n    documentColor: true,         // Document color detection\n    documentHighlight: true,     // Symbol occurrence highlighting\n    codeFolding: true,           // Code folding ranges\n    inlayHint: true,             // Inlay hints\n    goToDefinition: true,        // Go to definition\n    rename: true,                // Symbol renaming\n  ),\n);\n```\n\n\u003c/details\u003e\n\n---\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch2\u003e⌨️ Keyboard Shortcuts\u003c/h2\u003e\u003c/summary\u003e\nCodeForge supports a variety of keyboard shortcuts for efficient editing:\n\n### Editing\n- **Ctrl+C** — Copy selected text.\n- **Ctrl+X** — Cut selected text.\n- **Ctrl+V** — Paste text.\n- **Ctrl+A** — Select all text.\n- **Ctrl+D** — Duplicate current line.\n- **Ctrl+Z** — Undo last action.\n- **Ctrl+Y** — Redo last action.\n- **Ctrl+Backspace** — Delete word backward.\n- **Ctrl+Delete** — Delete word forward.\n\n### Navigation\n- **Ctrl+Arrow Left** — Move cursor to previous word.\n- **Ctrl+Arrow Right** — Move cursor to next word.\n- **Ctrl+Shift+Arrow Left** — Select to previous word.\n- **Ctrl+Shift+Arrow Right** — Select to next word.\n- **Ctrl+Shift+Arrow Up** — Move current line up.\n- **Ctrl+Shift+Arrow Down** — Move current line down.\n\n### Indentation\n- **Tab** — Indent current line or accept AI completion/suggestion.\n- **Shift+Tab** — Unindent current line.\n\n### Suggestions \u0026 AI Completion\n- **Ctrl+.** — Show available LSP code actions.\n- **Ctrl + Shift + Space** — Show available LSP signature help.\n- **Ctrl + Alt** — Show LSP inlay hints.\n- **Arrow Up/Down** — Navigate through suggestions.\n- **Enter/Tab** — Accept current suggestion.\n- **Escape** — Close suggestions or hover details.\n\n### Selection\n- **Shift+Arrow Keys** — Extend selection.\n- **Shift+Home** — Select to line start.\n- **Shift+End** — Select to line end.\n\n## Search\n- **Ctrl + F** — Show search bar.\n- **Ctrl + H** — Show replace bar.\n\n\u003c/details\u003e\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Whether it's bug fixes, new features, or documentation improvements.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/heckmon/code_forge/blob/main/LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\n- [re_highlight](https://pub.dev/packages/re_highlight) — Syntax highlighting\n- [markdown_widget](https://pub.dev/packages/markdown_widget) — Markdown rendering\n- [web_socket_channel](https://pub.dev/packages/web_socket_channel) — WebSocket support\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eBuilt with ❤️ for the Flutter community\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/heckmon/code_forge\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/⭐_Star_on_GitHub-333333?style=for-the-badge\u0026logo=github\" alt=\"Star on GitHub\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheckmon%2Fcode_forge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheckmon%2Fcode_forge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheckmon%2Fcode_forge/lists"}