Skip to content
AddHunt
VS Code extensions

LocalLeaf

VS Code extension to edit Overleaf projects locally

Works with Overleaf, LaTeX WorkshopOpen source

  • Open source
  • Licence: MIT

In short

LocalLeaf is an open-source VS Code extension that keeps a local folder in two-way sync with an Overleaf project, so LaTeX can be edited locally while collaborators keep working online. It is for LaTeX users who prefer VS Code and LaTeX Workshop over the browser editor.

What you get

  • Two-way real-time sync with Overleaf
  • Collaborator cursors with jump-to-position
  • Automatic sync while typing
  • Visual diff for resolving conflicts
  • Works with LaTeX Workshop
  • .leafignore file for exclusions

The details

LocalLeaf connects a folder on the local machine to an Overleaf project and keeps both sides in sync. Edits made in VS Code are sent as they are typed, changes from Overleaf arrive automatically, and collaborators' cursors appear in real time with an option to jump to their position.

Working with LaTeX Workshop

The extension handles syncing rather than compiling. It is designed to pair with LaTeX Workshop, which builds and previews documents locally, so the whole editing loop stays in VS Code.

Conflicts and exclusions

When local and remote versions clash, a visual diff view shows both and lets the user keep one side with a click. A .leafignore file, written like a .gitignore, excludes files that should not be synced.

Setup

  1. Install LocalLeaf from the VS Code Marketplace.
  2. Run the LocalLeaf: Login command and paste the Overleaf cookies.
  3. Open a folder and link it to the Overleaf project with LocalLeaf: Link Folder.
  4. Edit locally and let auto-sync carry the changes.

The project credits Overleaf-Workshop as its inspiration, offers documentation on its site and is released under the MIT license.

Alternatives to LocalLeaf

Questions

Does LocalLeaf compile LaTeX?

No. It syncs files with Overleaf, and compilation and preview are handled locally by LaTeX Workshop.

How does it connect to Overleaf?

Run the LocalLeaf: Login command and paste the Overleaf cookies, then link a local folder to a project with LocalLeaf: Link Folder.

More like this