Skip to content

Commit

Permalink
Move topsp to lsp-bridge Wiki, avoid write too many docs in README
Browse files Browse the repository at this point in the history
  • Loading branch information
manateelazycat committed Jun 12, 2024
1 parent 877f3fe commit 4e27cde
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,30 +215,6 @@ If you use `apheleia` as formatter, `lsp-bridge` now support auto formatting fil
(add-hook 'apheleia-post-format-hook #'lsp-bridge-update-tramp-docker-file-mod-time)))
```

### goodness
Use [topsy](https://github.com/alphapapa/topsy.el) to remind you that you're editing a remote file.

#### doom-emacs configuration example
`packages.el`
```elisp
(package! topsy)
```

`config.el`
```
(use-package! topsy
:config
(after! lsp-bridge
(setcdr (assoc nil topsy-mode-functions)
(lambda ()
(when (lsp-bridge-is-remote-file) "[LBR] REMOTE FILE")))
;; do not activate when the current major mode is org-mode
(add-hook 'lsp-bridge-mode-hook (lambda ()
(unless (derived-mode-p 'org-mode)
(topsy-mode 1))))))
```

## Keymap

| Key | Command | Description |
Expand Down
27 changes: 0 additions & 27 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ lsp-bridge 开箱即用, 安装好语言对应的 [LSP 服务器](https://gith
3. 你需要在远程服务器完整的下载整个 lsp-bridge git 仓库, 并切换到 lsp-bridge 目录来启动 `lsp_bridge.py``lsp_bridge.py` 需要其他文件来保证正常工作, 不能只把 `lsp_bridge.py` 文件拷贝到其他目录来启动
4. 如果 tramp 文件出现 lsp-bridge 连接错误, 可以执行 `lsp-bridge-tramp-show-hostnames` 函数, 然后检查输出的 host 配置选项是否符合预期

Here is the translation of the technical description to Chinese:

### 本地开发容器

`lsp-bridge` 现在支持在 `devcontainer` 上的文件补完,类似于 VSCode。这是通过使用 [devcontainer-feature-emacs-lsp-bridge](https://github.com/nohzafk/devcontainer-feature-emacs-lsp-bridge) 实现的。
Expand Down Expand Up @@ -211,31 +209,6 @@ Here is the translation of the technical description to Chinese:
(add-hook 'apheleia-post-format-hook #'lsp-bridge-update-tramp-docker-file-mod-time)))
```

### 编辑远程文件提示

使用 [topsy](https://github.com/alphapapa/topsy.el) 提醒您正在编辑远程文件。

#### Doom Emacs 配置示例
`packages.el`
```elisp
(package! topsy)
```

`config.el`
```elisp
(use-package! topsy
:config
(after! lsp-bridge
(setcdr (assoc nil topsy-mode-functions)
(lambda ()
(when (lsp-bridge-is-remote-file) "[LBR] 远程文件")))
;; 当前主要模式为 org-mode 时不激活
(add-hook 'lsp-bridge-mode-hook (lambda ()
(unless (derived-mode-p 'org-mode)
(topsy-mode 1))))))
```

## 按键

| 按键 | 命令 | 备注 |
Expand Down

0 comments on commit 4e27cde

Please sign in to comment.