Ned:使用GL着色器的ImGui文本编辑器
Ned: ImGui Text Editor with GL Shaders

原始链接: https://github.com/nealmick/ned

## Ned:一款复古风格、功能丰富的文本编辑器 Ned 是一款现代文本编辑器,采用独特的复古美学设计,使用 Dear ImGui 和 C++20 构建。它拥有强大的功能集,包括针对 15 多种语言的 Tree-Sitter 语法高亮显示、LSP 集成(clangd、gopls 等)以及基于 suckless `st.c` 的终端模拟器。 主要功能包括可定制的 GL shader 效果(静态噪声、光晕、曲率)、具有高级搜索/选择功能的多光标编辑,以及通过 OpenRouter 实现的 AI 驱动的代码补全,利用 Morph 等模型进行快速、准确的编辑。Ned 还支持自定义词法分析器、文本书签和带有 emoji 支持的主题系统。 Ned 旨在既可以独立使用,也可以嵌入到其他 ImGui 应用程序中。目前在 macOS (Intel/ARM)、Windows 和 Debian 上进行了测试。Windows 具有简化的构建脚本,macOS 和 Debian 具有软件包创建脚本。 项目和演示地址:[https://github.com/nealmick/ned](https://github.com/nealmick/ned)。

相关文章

原文
ned-3

Build Status macOS Debian Windows

A retro-style text editor with GL shader effects. NED offers Tree Sitter syntax highlighting, LSP integration, and a terminal emulator.

ned.demo.github.mp4

Shader Effects: Static Noise, Burn In, Screen Curvature, Bloom, Vignetting.

Amber Solarized
amber.github.mp4
solarized.github.mp4
Ned Custom
ned.github.mp4
custom.github.mp4
  • OpenGL Shaders with retro style for the best coding vibes
  • Text Bookmarks make editing multiple files with saved cursors a breeze
  • Rainbow mode cursor so you never lose your cursor and stand out
  • LSP Adapters for easy navigation and advanced language support
  • Terminal Emulator based on suckless st.c ported to C++ with multiplexer support
  • Optional Custom lexers and tokenizers for custom languages and obscure syntax patterns
  • Copilot-like auto complete using OpenRouter, choose the latest and best LLM models
  • Multi-cursor support, easily find and replace strings with multi selection

CMake (version 3.10 or higher) C++20 compatible compiler OpenGL GLFW3 Glew Curl

Clone the repository with its submodules:

#Make sure you clone with recursive flag
git clone --recursive https://github.com/nealmick/ned
cd ned
git submodule init
git submodule update

# macOS Intel/ARM)
brew install clang-format cmake llvm glfw glew pkg-config curl

# Ubuntu/Debian
sudo apt install cmake libglfw3-dev libglew-dev libgtk-3-dev pkg-config clang libcurl4-openssl-dev clang-format mesa-utils

# For Windows, the dependencies are installed using the build script

MacOS and Linux (ubuntu/debian)

./build-win.bat
# On Windows, the build script will attempt to install Visual Studio with Build Tools. 10-20 minutes.
# After VS has been installed, you must close and re-open PowerShell and run ./build-win.bat again.
# Subsequent rebuilds are much faster after the initial dependencies have been installed.

Create app package

./pack-mac.sh
./pack-deb.sh

# Bypass quarantine/translocation or you can sign it with your own apple dev acc
xattr -dr com.apple.quarantine Ned.app
embed.demo.github.mp4

Ned can be embedded in other ImGui applications, taking advantage of its text editor, file explorer, and terminal emulator. The embedded version also includes emoji support, themes, and much more. We have a demo repository that shows how to get started embedding the neditor into your projects.

Ned is a feature-rich text editor built with Dear ImGui that combines the power of modern development tools with a lightweight, embeddable architecture. At its core, Ned provides a sophisticated text editing experience with Tree Sitter syntax highlighting supporting over 15 programming languages including C++, Python, JavaScript, Rust, Go, and more. The editor features custom lexer modes for specialized file types and includes advanced features like multi-cursor editing, line jumping, and a built-in file tree explorer.

The editor includes LSP integration with support for clangd, gopls, pyright, and TypeScript language servers, providing goto definition, find references, and symbol information. Ned also includes a terminal emulator and AI integration with OpenRouter support. The editor features emoji support with proper font rendering, custom shader effects, and a theming system. The project is designed to be embeddable in other ImGui applications through the ned_embed library, making it easy to integrate into your own projects.

Currently Ned is tested on macOS ARM and Intel, Windows x64, and has a Debian build available. Windows support includes automated dependency management through the build script.

If you have questions or issues, feel free to reach out.

Ned has an AI agent that uses OpenRouter to connect to the latest models. The agent can use MCP to call tools such as read file, run command, or edit file. The edit file tool uses a specialized model called Morph to apply code edits on large files at high speed with high accuracy, similar to Cursor. Check it out at morph.so. The whole system is tied into the settings where the key for the agent and completion model is stored. Below is a demo of the agent:

agent_compressed.mov

Ned has the ability to track multiple cursors at once, which can make editing in certain scenarios much easier. The multi cursor system is used for file content searches to spawn cursors at each instance of a text search string. The app also supports multi selection for selecting text with multiple cursors. The cursor also supports keybinds such as jump to line end or jump one word forward. Below is a demo:

multi-cursor_compressed.mov

Windows support is still being tested, but there is a windows build available in releases as well as a build script for both the standalone and embedded versions.

windows.github.mp4
联系我们 contact @ memedata.com