Caret
A code editor that talks to language servers.
Caret has its own text engine and no settings to fill in before it’s useful. It finds the language servers already on your Mac and asks them for completions, definitions and problems.
- Runs on
- macOS 15
- Includes
- The
caretcommand - Version
- 0.1
- Status
- In development
Editing
Its own text engine
Text is laid out with Core Text and drawn by Caret, with a line-number gutter and its own undo history.
Syntax highlighting
Parsed with tree-sitter, so colour follows the structure of the code. Swift, Rust, Python and JSON so far.
Indentation that follows the file
Caret works out whether a file uses tabs or spaces, and how wide, then keeps to it. A new line after an opening bracket goes one level in.
Brackets and quotes
The closing bracket or quote is typed for you, and the bracket that matches the one beside the caret is highlighted.
Line commands on Xcode’s keys
Shift a selection left or right, move a line up or down, comment it out, duplicate it or delete it.
Files left as they were
Line endings, text encoding and byte order marks are kept the way the file had them.
Language servers
Found, not configured
Caret looks on your shell’s path for sourcekit-lsp, rust-analyzer and basedpyright or pyright. Each project gets its own server.
Completion
Suggestions appear as you type or when you ask. With no server running, Caret offers the words already in the file.
Jump to definition
Go to where a symbol is defined, in this file or another one.
Quick help
The server’s documentation for the symbol under the caret, in a popover.
Problems marked where they are
Errors and warnings are underlined in the text. Jump to the next or previous one and read its message in place.
What the server is doing
A spinner and a line of status in the title bar while a server indexes or builds.
Finding your way
Folders as workspaces
Open a folder and its files appear in a sidebar that follows changes on disk.
Open Quickly
Press ⌘ P and type part of a file’s name. In a git repository, Caret lists the files git knows about.
Preview tabs
Each file is a window tab. Click a file once to look at it in a preview tab, which the next file you click replaces.
The system find bar
Find and replace work as they do in the rest of macOS, with the same keys.
Xcode’s themes
Seventeen of Xcode’s colour themes are built in. Pick one for light appearance and one for dark.
The caret command
caret . # open this folder as a workspace
caret Package.swift Sources # open a file and a folder
In the app
The command ships inside the app, at Caret.app/Contents/Helpers/caret. Link it into a folder on your path to use it from a terminal.
Files and folders
A file opens in its own window and a folder opens as a workspace. With no path, the command just opens Caret.
Keys
- Open Quickly
- ⌘ P
- Complete
- ⌃ Space
- Jump to definition
- ⌃ ⌘ J
- Quick help
- ⌃ ⌘ ?
- Next issue
- ⌘ ’
- Previous issue
- ⇧ ⌘ ’
- Comment selection
- ⌘ /
- Shift right, left
- ⌘ ] [
- Move line up, down
- ⌥ ⌘ [ ]
- Duplicate
- ⌘ D
- Delete line
- ⌃ ⇧ K
- Show or hide sidebar
- ⌃ ⌘ S
Not yet
- Searching across a whole project.
- More than one cursor.
- Rename, formatting and symbol lists from the language server.
- Highlighting for languages beyond Swift, Rust, Python and JSON.
- Choosing the font, or loading a theme of your own.
Try it
Caret is still being built. Want an early build, or found a bug? hello@octet.dev