The Looker extension for VS Code uses a local-first development model. This model maintains a three-way relationship among your local file system, your Looker instance's Development Mode , and your remote Git repository.
This guide explains how the extension synchronizes files and how local Git operations impact your Looker project.
Sync mechanism
The extension automatically manages the synchronization of file content between your local IDE and the Looker server.
Opening files (read-on-open)
When you open a .lkml
file in your local IDE, the extension automatically fetches the current version of that file from your checked-out branch in your Looker instance's Development Mode. This ensures that you're always working on the most up-to-date version of the code.
Saving files (write-on-save)
When you save a file locally ( Command-Son Mac or Ctrl+Son Windows/Linux), the extension immediately pushes your local changes to the Looker server. These changes are then visible in the browser-based Looker IDE when you're in Development Mode.
Handle sync conflicts
If a file is edited in the browser-based Looker IDE while it is also open in VS Code, a conflict may occur.
By default, the extension will overwrite the version on the Looker server with your local VS Code version.
However, if you have enabled the looker.askBeforeOverwritingRemote
setting, VS Code displays a warning when you attempt to save a file that has been modified on the server. You can choose to take one of the following actions:
- Keep Local: Overwrite the version on the Looker server with your local VS Code version.
- Pull Remote: Overwrite your local file with the version from the Looker server.
The looker.askBeforeOverwritingRemote
setting is disabled by default.
Local Git operations
The extension synchronizes file content, but you should manage your Git repository by using standard Git commands in your local terminal or the local IDE's Source Control tab.
Manage branches
When you switch branches locally by using git checkout
, the extension detects the change and automatically switches your session on the Looker server to the matching branch.
Git state in Looker
When you save file changes, they are synced to your Looker instance and appear as uncommitted in the browser-based Looker IDE. If you commit these changes using Git in your local environment, they will continue to appear as uncommitted in the Looker IDE until you push them to your remote repository.
When you use git push
, your Looker instance pulls the committed changes from your remote repository. After your Looker instance has pulled from remote, changes that you have committed and pushed will no longer appear as uncommitted in the Looker IDE. Only files that are saved locally but not yet committed and pushed will appear as uncommitted.
Validate LookML
The extension automatically runs the Looker LookML Validator every time you save a change. Any syntax and model errors returned by the Validator will appear inline within your files inside your local IDE. If you want, you can also run the LookML Validator manually without saving files using the Looker: Validate LookMLCommand Palette command.

