Package Details: code-features 1.103.1-1

Git Clone URL: https://aur.archlinux.org/code-features.git (read-only, click to copy)
Package Base: code-features
Description: Unblock some features in Code OSS
Upstream URL: https://github.com/microsoft/vscode
Keywords: vscode
Licenses: unknown
Conflicts: code-features
Provides: code-features
Submitter: sainnhe
Maintainer: sainnhe
Last Packager: sainnhe
Votes: 67
Popularity: 2.08
First Submitted: 2021-04-06 00:46 (UTC)
Last Updated: 2025-08-16 03:31 (UTC)

Dependencies (5)

Required by (1)

Sources (4)

Pinned Comments

sainnhe commented on 2024-11-01 14:53 (UTC) (edited on 2024-11-02 03:08 (UTC) by sainnhe)

New Command Available in 1.95.0-2

Now there is a new command /usr/bin/code-features-update that can update the patch to keep up with the official vscode release. You can use this command to manually update the patch when this package is out of date or some extensions don't work after an update in extra/code.

sainnhe commented on 2024-05-17 03:39 (UTC) (edited on 2024-10-26 10:10 (UTC) by sainnhe)

About this package

This package installs a hook that will patch product.json every time the code package is updated. The patch basically does the following:

  1. Syncs proposed APIs with the latest vscode release. Some extensions don't work in code oss because some specific APIs are not enabled in product.json.
  2. Enable built-in settings sync feature.
  3. Disable telemetry.
  4. Use ~/.vscode and ~/.Code instead of ~/.vscode-oss and ~/.Code OSS.

You might be confused why this package changes the data directory. There are two reasons:

  1. Some extensions (e.g. Pylance) require to use the data directory to work.
  2. Isolate settings sync data from the OSS version. People may want to install this package because they want to unlock some proprietary extensions, and may have some specific settings that only works with these extensions. Besides, this package will enable built-in sync feature, so isolating the settings may avoid some potential problems such as messing up your synced settings.

If you don't like this behavior, simply create a symlink.

About proprietary extensions

Proprietary extensions are not guaranteed to work, because some extensions will actively detect whether the current running environment is the official vscode release, and it's very hard to bypass their detection at all time.

If some extensions don't work, try:

  1. Run update.py in the project root. This scripts will update the patch to match the latest vscode release. Then execute makepkg -fsi to rebuild and install this package.
  2. Switch over a FOSS alternative, for example Pylance -> Basedpyright, C/C++ -> Clangd

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

sainnhe commented on 2023-08-13 13:31 (UTC)

Upgrading notes for v1.81.1

The code has been refactored in python, upgrading requires manual interventions:

pacman -Rdd code code-features
pacman -S code code-features

Don't reinstall them, uninstall and install these packages instead.

Since the code has been refactored, you can easily modify the code to upgrade to a new version by yourself if I cannot update this package in time. Simply download the latest tarball from code.visualstudio.com and extract them, then run update.py to update patch.json (The usage is documented in update.py), and run makepkg --skipchecksums -i to rebuild and install this package.

Microsoft has introduced new detection method for Pylance extension, now this AUR package cannot bypass the version check of it. Although you can downgrade Pylance to a lower version to continue to use it, but I'd recommend to switch to a FOSS alternative instead (e.g. Pyright) because you'll never know what Microsoft will do in the future. Microsoft sucks :)

The data folder has changed to ~/.vscode because some extensions provided by Microsoft will explicitly use that folder, otherwise they won't work.

<deleted-account> commented on 2023-08-10 18:26 (UTC)

With vscode 1.81 for pylance it no longer works.

More specifically, it is the newer version of Pylance that refuses to work on the OSS version, M$ must have introduced new detection mechanism.

Interestingly, the crippled version was only released 23 hours ago as I was writing this. This means that you can install an older version (v2023.8.10) as a temporary workaround.

It can be installed using the Install Another Version option from the Extensions drop-down menu.

jamazi commented on 2023-06-21 17:03 (UTC)

@sainhe it would be great if you @DroidFreak32 patch too

sainnhe commented on 2022-12-14 15:19 (UTC)

@wooptoo:

  1. Add extension API proposals to product.json, this will fix some issues in certain extensions (e.g. pylance)

  2. Add support for VSCode built-in settings sync.

wooptoo commented on 2022-12-14 15:15 (UTC)

Excuse the ignorance, what does this package actually do? I've only needed to install this now with the upgrade to vscode v1.74 because of the python extension issue.

DroidFreak32 commented on 2022-11-26 23:16 (UTC) (edited on 2022-11-26 23:20 (UTC) by DroidFreak32)

Remote-SSH extension doesn't work, however there is a HACKY workaround in product.json:

1) Replace "serverApplicationName": "code-server-oss" With "serverApplicationName": "code-server" This could be added in the patch if you wish to do so, @sainnhe

2) Edit extension's javascript:

Open the Extension's extension.js file, as of this moment it is at: ~/.vscode-oss/extensions/ms-vscode-remote.remote-ssh-0.92.0/out/extension.js

Find this string:

\n\ttar -xf vscode-server.tar.gz\n\tTAR_EXIT

Replace it with:

\n\ttar -xf vscode-server.tar.gz\n\tsed -i 's/if(this._environmentService.isBuilt)/if(!this._environmentService.isBuilt)/' vscode-server*/out/vs/server/node/server.main.js\n\tTAR_EXIT

This just reverses the condition at remoteExtensionHostAgentServer.ts#L385 so the remote side accepts the OSS Build in "DEV" mode Source

jamazi commented on 2022-11-22 15:37 (UTC) (edited on 2022-11-22 15:44 (UTC) by jamazi)

pylance will try to lookup files in ~/.vscode/extensions directory then it will fail, solution :

ln -s ~/.vscode-oss ~/.vscode

sainnhe commented on 2022-09-30 04:19 (UTC)

@prettyvanilla: This package needs to be updated, but I don't have time recently. Anyone wants to be a maintainer?

prettyvanilla commented on 2022-09-28 18:09 (UTC)

Looking into the Developer Tools Console I noticed that there are currently mismatches between what some extensions want and what API proposals are currently enabled/patched in. The following seem to be missing:

"ms-vscode.js-debug" (and I presume "ms-vscode.js-debug-nightly" consequently as well) misses the "tunnels" API, and "ms-vscode.remote-repositories" misses "contribShareMenu" and "editSessionIdentityProvider". Unless there are reasons not to enable these it would be great if you could add them.

sainnhe commented on 2022-08-24 02:15 (UTC)

@xuiqzy: Thanks! I've added that.