Skip to content
suacayipkisiPublic

About

Lightweight C/C++ IDE for Linux: GTK4 + VTE window with a file manager, gtksourceview5 editor tabs with clangd, a shell and a git panel. About 100-150 MB RAM (at start).

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

2 watching

Forks

Repository files navigation

T-Code

A light C/C++ IDE for Linux in one GTK4 window, with a dark look (Dark Classic) and other color themes.

t-code 0.5.2 in the Ayu Dark color theme with the squared look

t-code 0.5.2: Ayu Dark, squared.

New in 0.5.2: lower clangd memory on C++ projects, faster big repositories, structured logging, multi-group editor and dock splits, appearance settings and plugin API 1.1.

  • Memory and clangd: tuned malloc defaults for clangd, automatic restart of bloated idle language servers, and clangd memory and idle settings in Settings
  • Faster big repositories: virtualized Source Control and Search lists (GtkListView), shared git status between the editor and Files panel, off-thread document symbol trees, and smoother big-file editing and diff comparisons
  • Structured logging: per-module log domains, logged LSP/DAP and file errors, and unclean-end detection with coredumpctl hints
  • Editor and dock splits: split the editor area into any number of groups and sides into multiple docks, toggle a vertical left tab bar, search from the title bar, or hide panels and window parts
  • Look and editing: Insane Dark and four more themes, density/divider/outline settings, menu bar icon/label modes, relative line numbers (Ctrl+Alt+L), block comments (Alt+C), Ctrl+click links, and selectable Markdown preview tables
  • Plugins and security: plugin API minor versions (tapi_1_1), Trusted Folders for running project commands, and a Rust Claude Code chat panel plugin
  • Fixes: separate history comparison tabs, cleared stale panel state on project switch, Wayland context menus, and stability and edge-case fixes

0.4.2 added a much fuller Markdown preview (TeX math, GitHub alerts, emoji, footnotes, mermaid), images in tabs, a Hierarchy that follows the cursor and an autosave delay setting.

0.4.0 added multiple cursors, replace across the project, snippets, inlay hints, Outline and call / type hierarchy, and in git: branches, pull / fetch, stash, line blame and merge conflict buttons; more language servers (JavaScript / TypeScript, JSON, YAML, Markdown, CMake).

0.3.1 added language servers for Python, Go and Rust, plugins, the Problems panel, project tasks, crash recovery and Flatpak / Snap / AUR / AppImage packages;

0.3 the debugger, quick fixes, folding, sticky scroll and color themes.

Next (0.6): more of Mercurial and Subversion, and project templates.

What it has

One window, one process (besides its language servers, your shell and plugins): the Files panel, Source Control, Search and Run and Debug on the left, editor tabs in the middle, your shells as tabs and the Problems panel at the bottom, Outline, Hierarchy and Testing on the right. Every panel can be dragged to another dock or into a new one, and every side and the editor area split into as many docks and tab groups as you like.

  • Editing without modes, plus multiple cursors, snippets, completion, parameter hints, inlay hints, go to definition, references, rename, format, quick fixes (also as buttons on a problem), folding, sticky scroll, breadcrumbs, colors by meaning, find and replace, a minimap and the git diff gutter; the Outline panel and call / type hierarchy.
  • Debugging (F5) with gdb or lldb-dap (C, C++, Rust), debugpy (Python) and Delve (Go): breakpoints (with conditions), logpoints, stepping, variables, watch, call stack, values under the pointer, disassembly, a memory view; attaching to a running process, opening a core dump.
  • Build, Run and Test in the shell: CMake, Meson, Make or a single C/C++ file; Cargo, Go, Node, Maven, Gradle, Python and scripts; or your own project tasks.
  • Testing panel: CTest and GoogleTest, pytest, go test, cargo test and JUnit; run or debug a single test from the panel or the ▶ in the editor gutter.
  • Git: Source Control panel (commit, push, pull, stage hunks), branches, stash, line blame, merge conflict buttons, compare with HEAD or a commit from the file's history, git colors in the Files panel, the repositories nested in a project. Mercurial and Subversion repositories work too (changes, commits, gutter, blame, history).
  • Search and replace across files (ripgrep), a split editor, a second window, a native Markdown preview, crash recovery, autosave, plugins from a registry, a Process Monitor, color themes and Settings.

Everything in detail, with the full key table: docs/features.md. Changing the look (every color and part you can override in theme.css, with examples): docs/theming.md.

Language servers

Each starts when the first file of its language is shown and stops 30 seconds after the last one closes (Settings: Language Servers; -1 keeps it running). All but clangd are optional: t-code uses them when they are on PATH.

Files Server Install
C, C++, Objective-C clangd the package's dependency
Python pylsp (also from the project's venv) pipx install 'python-lsp-server[all]', plus python-lsp-ruff for quick fixes
Go gopls GOTOOLCHAIN=auto go install golang.org/x/tools/gopls@latest
Rust rust-analyzer rustup component add rust-analyzer
JavaScript, TypeScript typescript-language-server npm install -g typescript-language-server typescript@6
JSON the JSON language server npm install -g vscode-langservers-extracted
YAML yaml-language-server npm install -g yaml-language-server
Markdown marksman your distribution or its GitHub releases
CMake neocmakelsp cargo install neocmakelsp
Java jdtls, through the Java plugin install the plugin (Plugins → Browse the Registry… in the menu bar), then Java: Install Language Server (needs a JDK 21+)

Python: Select Interpreter…, Rust: Select Features… and Rust: Select Target… (command palette) set the project's Python, Cargo features and target for the server and for Build, Run and Test. The JSON server only validates (no downloads, no formatting) and skips generated or big files. More in docs/features.md.

Install

t-code --version prints the installed version.

The packages are named t-code-ide; the command stays t-code (in the Snap it is t-code-ide).

Fedora (Copr)

sudo dnf copr enable suacayipkisi/t-code-ide
sudo dnf install t-code-ide

Fedora 43, 44, 45 and rawhide; updates come with dnf upgrade.

Ubuntu (PPA)

sudo add-apt-repository ppa:suacayipkisi/t-code-ide
sudo apt install t-code-ide

Ubuntu 26.04 and 26.10 (24.04's GtkSourceView is too old).

Snap

sudo snap install t-code-ide
sudo snap alias t-code-ide t-code    # optional: run it as t-code

The Snap is strictly confined: it bundles its own compiler, clangd, gdb, CMake and Python, and sees the projects in your home folder.

Packages (latest release, x86_64)

sudo dnf install ./t-code-ide-0.5.2-1.fc44.x86_64.rpm        # Fedora 44
sudo pacman -U t-code-ide-0.5.2-1-x86_64.pkg.tar.zst         # Arch Linux
sudo apt install ./t-code-ide_0.5.2-1_amd64.deb              # Debian 13 (apt, not dpkg -i: it pulls in clangd and the font)
xbps-rindex -a t-code-ide-0.5.2_1.x86_64.xbps && sudo xbps-install --repository="$PWD" t-code-ide   # Void (or x86_64-musl)
flatpak install --user ./t-code-0.5.2-x86_64.flatpak         # Flatpak
sudo snap install --dangerous ./t-code-ide_0.5.2_amd64.snap  # Snap (strict confinement)

The package manager pulls in clangd, git and the Cascadia Code font (Void has no Cascadia Code: the system's monospace font is used). An AUR recipe is in packaging/aur/ (makepkg -si). The sandboxes' limits: Flatpak, Snap. Building the packages yourself: docs/packaging.md.

From the source

Needs gcc 14 (C23), make and the GTK4, GtkSourceView 5 (5.16+), json-glib, VTE and md4c headers (WebKitGTK 6.0's too for HTML previews: without it they are left out); at run time clangd, git, the Cascadia Code font, optionally ripgrep, gdb 14+ (or lldb-dap), debugpy and dlv.

sudo dnf install gtk4-devel gtksourceview5-devel json-glib-devel vte291-gtk4-devel md4c-devel webkitgtk6.0-devel
packaging/install.sh      # builds and installs into ~/.local (packaging/uninstall.sh removes it)

make builds build/t-code, make test runs the tests, make install installs system-wide. More in CONTRIBUTING.md.

Usage

t-code            # current directory
t-code path/dir
t-code a.c b.c    # open files as tabs

The Keybinds button in the status bar lists every key, and Ctrl+Shift+P finds any command. The ones to know first:

Key Action
Ctrl+P / Ctrl+Shift+F / Ctrl+Shift+P open a file / search all files / command palette
Ctrl+Shift+B / Ctrl+F5 / F5 build / build and run / debug
F12 / Shift+F12 / F2 / Ctrl+. go to definition / references / rename / quick fix
Ctrl+Shift+M / Ctrl+Shift+G Problems / Source Control
Ctrl+\ / Ctrl+B / Ctrl+J split the editor / Files panel / shell
click / double click a file open in a temporary tab / keep it open

The full table: docs/features.md.

Plugins

Plugins are separate programs, started only when one of their commands runs, so an idle plugin costs nothing. They live in ~/.config/t-code/plugins/<id>/ with a plugin.json manifest and talk to t-code over $TCODE_SOCKET. A plugin runs with your user's rights: install only ones you trust. Plugins: Manage Plugins (command palette, or the Plugins menu in the menu bar) lists them: turn one off, start or stop it, read what it printed, uninstall it. Help: Process Monitor shows what each plugin, language server and terminal uses (CPU, memory). The manifest, environment and socket protocol: docs/plugins.md; examples are in plugins/builtin/, written in different languages (Python, Rust, C, C++, Go, JavaScript, Perl) on purpose, to test that the plugin API works from any of them.

Creating a Plugin

If you are interested in writing a plugin for t-code, all types of plugins will be gladly accepted. However, you also have to consider the main idea of t-code's existence, which is as low resource usage as possible. Because of that I highly recommend writing the plugin in the C language, which is the language t-code is written in. You can also use AI. Also, the plugin must be safe.

Contributing

If you want to contribute, all contributions will be gladly accepted. Please read CONTRIBUTING.md and open a pull request.
AI usage is strictly forbidden for contributing anymore. However you can open a discussiın and explain the issue and the way to solve which is found with using AI. You can use AI for asking help and template.

AI Usage in Project

Most of the structure and code written with using AI coding agent. Every single line of code is reviewed or currently under review. I did not spend enough time to write just myself because I just want an ide that uses not much ram as immediately as possible, the editor I used was using too much then I got angry and tada... BUT I will review every detail of this project and after than I will continue to add new features as I wish.

Why You Use An IDE Instead Of Using Just AI

Of course I use AI to write some parts of the stuff. The main idea is not doing the job, the idea is having fun. Think like that, your friend is playing a game and you alsa want to play it. Other friend says, "Why would you play the game, just watch your friend". And saying that IDE is not necessary is something like that. If I need to write code fast, I probably just use AI. -and you can see this IDE is written with AI coding agent mostly because I want to reach result fast-. However, I do not write code for just doing job. I'm writing code as a hobby, thinking and writing code is fun to me. Also I want to learn more and more detail about computers and I want to try how deep can I go. For learning, you need to write code by yourself. And you can ask why you are not using other popular IDEs. The main reason is the most important property of this IDE, low resource usage! Especially RAM usage. The second reason is they are not adding the propertiees that I want. I think waiting them to adding new features in their IDE is takes more time than making it myself using AI agent.

Performance

Measured on Fedora 44 (0.5.0 and 0.5.2: Fedora 45, clangd 23) with the same 25 C files of this repository open, each tab shown in turn (tools/measure.sh; PSS, so the numbers in a row add up):

version (all 25 tabs shown) editors t-code window helpers clangd memory in all
0.1.1 (micro) 25 micro processes, 412 MB 57 MB 50, 6 MB 361 MB 839 MB
0.2 (GtkSourceView) in the window 83 MB none 470 MB 557 MB
0.3 in the window 70 MB none 345–367 MB 418–442 MB
0.4.1 in the window 70–72 MB none 372–392 MB 445–467 MB
0.5.0 in the window 70–76 MB none 372–416 MB 445–495 MB
0.5.2 in the window 73–74 MB none 293–294 MB 366–368 MB

RSS, which counts shared libraries in full, for 0.5.2: window 113–114 MB, clangd 321–322 MB.

clangd gets a file only once its tab is shown, keeps at most five open, runs with one malloc arena and a 64 KB mmap threshold, and stops when its last file closes; idle, t-code uses no CPU. What keeps it small and how to measure it yourself: docs/performance.md.

License

MIT, see LICENSE. The color themes' and language servers' sources and licenses are in THIRD-PARTY.md.

Contributors

Thanks for all contributers.

  • @suacayipkisi — Creator & Lead Maintainer (Ufuk Deniz Konuk, government name: Abdurrahman Konuk but call me as Ufuk)
  • @dontworryplz — one PR for helping packaging and some problems

About

Lightweight C/C++ IDE for Linux: GTK4 + VTE window with a file manager, gtksourceview5 editor tabs with clangd, a shell and a git panel. About 100-150 MB RAM (at start).

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages