code-server

更新 code-server

Fedora

# 临时设置 VERSION 为要更新的版本号
$ set -x VERSION "4.5.0"

# 下载 .rpm 安装包
$ curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-amd64.rpm

# 停止 code-server 服务
$ sudo systemctl stop code-server@$USER

# 覆盖安装 .rpm
$ sudo rpm -U -i code-server-$VERSION-amd64.rpm

# 启动 code-server 服务
$ sudo systemctl start code-server@$USER

自定义样式

以 Github Light Theme 为例

# 进入内置主题文件夹
$ cd /usr/lib/code-server/lib/vscode/extensions/theme-defaults

# 编辑 package.json,"themes" 节点追加,保存退出
{
  "id": "Github Light Theme - Gray",
  "label": "Github Light Theme - Gray",
  "uiTheme": "vs",
  "path": "./themes/Github-Light-Theme-Gray-color-theme.json"
}

# 打开主题配置文件夹
$ cd ./themes

# 新建配置文件
$ touch Github-Light-Theme-Gray-color-theme.json

# 编辑配置文件
$ vi Github-Light-Theme-Gray-color-theme.json

# 上主题插件的 Github,找到对应的配置文件,将文件内容复制粘贴进来,保存退出
例 https://github.com/yunlingz/vscode-theme-github-light/tree/master/themes/Github-Light-Theme-Gray-color-theme.json

# 重启 code-server 服务
$ sudo systemctl restart code-server@$USER

你可能感兴趣的:(code-server)