
Ahmed EhabWhile working with Cursor, I discovered a serious limitation to what Cursor can do. Cursor allows...
While working with Cursor, I discovered a serious limitation to what Cursor can do.
Cursor allows the installation of VS Code extensions, but not every extension in VS Code is available directly within Cursor's marketplace.
This is mainly because Cursor was separated from VS Code some time ago, which created compatibility issues with certain extensions.
Since it was not easily accessible or compatible through standard installation methods, I looked into building the extension from source and installing it manually.
I faced this problem while trying to install the pgFormatter extension. Which I will use as an example.
Cursor is built on the VS Code source code, and subsequently, its extension ecosystem. So, that means it supports the same extension packaging format.
However, the reality is some extensions:
VS Code extensions usually are compiled and built as .vsix files. A VSIX file is a packaged bundle that includes:
The first step is obtaining the extension source code. In this example, the goal was to build the pgFormatter extension locally.
After downloading the extension source (mostly it will be on GitHub), the directory structure looked like this:
package.json
src/
tsconfig.json
vsc-extension-quickstart.md
Go to the extension directory and install the required dependencies by running this command:
npm install
Once the installation finishes, package the extension into a VSIX file using the VS Code Extension CLI tool.
Run the following command to do this:
npx vsce package
If the process completes successfully, it produces a .vsix file similar to: pgformatter-1.33.0.vsix
After generating the VSIX file, the extension can be installed easily into Cursor as follows.
Command Palette Installation:
Cmd + Shift + P
Ctrl + Shift + P
Extensions: Install from VSIX...
.vsix fileDeveloper: Reload Window
While this method works fine, there are a few things to keep in mind:
Installing extensions from source means you are responsible for verifying the code being installed. Reviewing the repository and dependencies is really recommended.
I can't stress this enough, extensions with bad intentions and malicious code can seriously harm or compromise your code base or your system or your users.
Manually installed extensions do not automatically update. Doing this process again will be necessary when new versions are released.
Cursor uses the same extension packaging model as VS Code, which means developers can manually compile and install extensions when they can't access the marketplace directly.
By generating a VSIX file from the extension, and then installing it manually, we can keep using important extensions like pgFormatter without getting stuck due to differences in the ecosystem.