# The editor

> Monaco editing, IntelliSense, diagnostics, the Diff toggle, merge conflicts, large files and inline AI completions.

Last updated: October 17, 2026
Source: https://codevre.com/docs/ide/editor

Codevre's editor is [Monaco](https://microsoft.github.io/monaco-editor/), the editor at the heart of VS Code. Multi-cursor editing, find and replace, folding, the minimap, bracket pair colorization and the usual keyboard shortcuts all work as you'd expect. See [Keyboard shortcuts](keyboard-shortcuts.md).

## Languages

Syntax highlighting covers well over 100 languages. A few mappings worth knowing:

- `.svg` opens as XML. `.vue`, `.svelte`, `.astro`, `.ejs`, `.hbs`, `.njk` and `.liquid` open as HTML.
- `.mdx` opens as Markdown. `.toml`, `.ini`, `.cfg` and `.conf` open as INI.
- `.glsl`, `.frag` and `.vert` open as GLSL. Python and GLSL also support **Format Document**.

Markdown, images and SVG files also have viewers. The Markdown preview supports KaTeX math, footnotes, definition lists, `==mark==`, sub- and superscript, and highlighted code.

## IntelliSense

JavaScript and TypeScript get completions, hover info, go to definition and errors from the TypeScript language service.

- With no `tsconfig.json`, Codevre uses modern defaults: ES2022, ESNext modules, bundler resolution and `jsx: react-jsx`.
- A `tsconfig.json` is honored, including `extends`, `references`, `paths` and `baseUrl`. `allowJs` is always on.
- Types for **bare imports** like `import confetti from 'canvas-confetti'` are fetched from esm.sh at the installed version (or the version range in `package.json`).
- Sub-projects with their own `package.json` or `tsconfig.json` (up to two folders deep) are picked up too.
- CSS side-effect imports (`import './style.css'`) don't raise errors.

## Problems and diagnostics

Errors and warnings from the language services appear as squiggles and in two places:

- **The file's status bar** shows `⊗ errors ⚠ warnings`. Click it to open that file's **Code Diagnostics** panel; click a problem to jump to it.
- **The main status bar** totals problems across all open files. Click to list the files with problems.

Language servers only check files that are open, so "all files" means all open files. Files in `.git` and `node_modules` are never listed.

## The Diff toggle

Click **Diff** in a file's status bar to lay an inline diff over the editor. The right-hand side is your real file, so you can keep editing and the diff updates live. Click **Diffing** to close it.

Compare against:

| Source | Baseline | When it's available |
|---|---|---|
| **Git** | The file at the last commit (`HEAD`) | The project has a Git repository. This is the default when it applies |
| **Session** | The file as of your last save to Codevre | Always, unless the file was already changed before you opened it |

When both apply, a switcher appears in the diff toolbar, and your choice sticks. The toolbar also has previous/next change, a side-by-side toggle and close.

Related settings:

| Setting | Default | Effect |
|---|---|---|
| `diff.renderSideBySide` | `false` | Open diffs side by side instead of inline |
| `diff.gitOnly` | `false` | Only offer Git diffs; hide the Session baseline |

Diffs aren't available for files in `.git` or `node_modules`, or for very large files.

## Merge conflicts

When a pull leaves conflict markers in a file, CodeLens actions appear above each conflict: **Accept Current Change**, **Accept Incoming Change** and **Accept Both Changes**. See [Git and Source Control](source-control.md#merges-and-conflicts).

## Large files

Very large files (multi-megabyte JSON, minified bundles) open in a lean mode: word wrap, folding, the minimap and other heavy features are turned off so typing and scrolling stay smooth. The file's status bar shows **Large file**. Diffing is disabled for them.

## Editor settings

Any Monaco option can be set as `editor.<option>`, for example `editor.fontSize`, `editor.tabSize`, `editor.wordWrap` or `editor.minimap.enabled`. Removing a key resets it to the default.

| Setting | Default |
|---|---|
| `editor.theme` | `dark-plus` |
| `editor.fontSize` | `14` |
| `editor.tabSize` | `2` |
| `editor.wordWrap` | `on` (toggle with Alt+Z) |
| `editor.minimap.enabled` | `true` |

See [Settings](settings.md).

## Inline AI completions

Codevre can suggest code as ghost text while you type, using [Monacopilot](https://github.com/arshad-yaseen/monacopilot). It's **off by default**.

| Setting | Default | Meaning |
|---|---|---|
| `ai.monacopilot.enabled` | `false` | Turn inline completions on |
| `ai.monacopilot.delay` | `800` | How long to wait after you stop typing, in ms (100–5000) |
| `ai.monacopilot.provider` | `chat` | `chat` (same as the Agent), `openrouter`, `anthropic`, `openai`, `gemini` or `xai` |
| `ai.monacopilot.model` | `""` (the provider's chat model) | A completion-only model override |

How it works:

- After you pause, Codevre sends the text around the cursor (up to about 80 lines of context), the file name, language and detected technologies to a Codevre completion endpoint.
- That endpoint adds **your saved API key server-side** and asks the model for only the code that belongs at the cursor. Your key never reaches the editor's code.
- Press **Tab** to accept a suggestion.

You need to be signed in with a key saved for that provider, and a model must be chosen. Completions use the same keys as the Agent; see [Providers and API keys](providers-and-keys.md). Fast, cheap models work best. Many chat models aren't designed for fill-in-the-middle, so results vary. Failed completions never interrupt your typing.
