Skip to content

Remind when editing a remote file

Andy Stewart edited this page Jun 12, 2024 · 1 revision

Use topsy to remind you that you're editing a remote file.

doom-emacs configuration example

packages.el

(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))))))