doomemacs/modules/term/vterm
Henrik Lissner 2bc67d8387 bump: :app :checkers :config :emacs :term :tools :ui
Alexander-Miller/treemacs@a6f9e9f1ce -> Alexander-Miller/treemacs@63e2bc207a
Silex/docker.el@9bcefbe54d -> Silex/docker.el@4fc69969b1
akermu/emacs-libvterm@2b1392cb2b -> akermu/emacs-libvterm@2681120b77
bdarcus/bibtex-actions@6e3a194c3a -> bdarcus/bibtex-actions@08c6ca0e5b
dash-docs-el/dash-docs@dafc8fc9f1 -> dash-docs-el/dash-docs@29848b6b34
dgutov/diff-hl@992559f98a -> dgutov/diff-hl@40c89a7b0d
dimitri/switch-window@2801d9b3a9 -> dimitri/switch-window@8d9fe251d8
editorconfig/editorconfig-emacs@e10fa22b13 -> editorconfig/editorconfig-emacs@2ab86dc9a8
ema2159/centaur-tabs@9c7c936e4e -> ema2159/centaur-tabs@8b4249c405
emacs-circe/circe@d6f1fa1864 -> emacs-circe/circe@77e16de3b9
emacs-lsp/lsp-treemacs@905cc74726 -> emacs-lsp/lsp-treemacs@d82df44d63
emacsorphanage/osx-trash@0f1dc052d0 -> emacsorphanage/osx-trash@af74a2055a
emacsorphanage/quickrun@35e91f4b6c -> emacsorphanage/quickrun@78317951cd
flycheck/flycheck@21d52264aa -> flycheck/flycheck@784f184cdd
hlissner/emacs-doom-themes@9e2680b918 -> hlissner/emacs-doom-themes@65fb964f36
https://git.savannah.gnu.org/git/emms.git@6e0aaaf4c559 -> https://git.savannah.gnu.org/git/emms.git@c42fab572846
ideasman42/emacs-spell-fu@1abcb5594e -> ideasman42/emacs-spell-fu@10823ae58f
ideasman42/emacs-undo-fu@e0ad06b5ef -> ideasman42/emacs-undo-fu@34b27c01da
joostkremers/writeroom-mode@b648b34017 -> joostkremers/writeroom-mode@7f4ec92404
kidd/org-gcal.el@4c2616a4f8 -> kidd/org-gcal.el@80e6f9501f
magnars/expand-region.el@4b8322774d -> magnars/expand-region.el@95a773bd8f
millejoh/emacs-ipython-notebook@09af85821e -> millejoh/emacs-ipython-notebook@0600c286bd
mohkale/consult-eglot@a6aeb6fa07 -> mohkale/consult-eglot@28a09cc839
noctuid/link-hint.el@09ba5727d8 -> noctuid/link-hint.el@d3c5bacc9c
rolandwalker/nav-flash@55786c9582 -> rolandwalker/nav-flash@2e31f32085
skeeto/elfeed@243add9e74 -> skeeto/elfeed@162d7d545e
szermatt/emacs-bash-completion@65e54c6f9c -> szermatt/emacs-bash-completion@c5eaeed156
tarsius/hl-todo@5ac0076cfe -> tarsius/hl-todo@42f744ffb5
tecosaur/emacs-everywhere@64ba2e3f30 -> tecosaur/emacs-everywhere@da88fa2d04
tkf/emacs-request@f3a5b4352e -> tkf/emacs-request@2b68b3ca54
tmalsburg/helm-bibtex@a0d32ab167 -> tmalsburg/helm-bibtex@b85662081d
yoshiki/yaml-mode@3a57058468 -> yoshiki/yaml-mode@63b637f846
yqrashawn/fd-dired@c223aee30a -> yqrashawn/fd-dired@458464771b
2021-09-15 17:47:17 +02:00
..
autoload.el Return buffer on +vterm/{here,toggle} commands 2021-05-24 13:53:51 -04:00
config.el Don't build vterm-module in noninteractive sessions 2021-05-24 13:54:13 -04:00
doctor.el remove warning message of optional vterm dependency 2020-07-12 14:24:44 -05:00
packages.el bump: :app :checkers :config :emacs :term :tools :ui 2021-09-15 17:47:17 +02:00
README.org README.org: Add info about vterm in NixOS 2021-05-01 15:57:24 +02:00

term/vterm

Description

This module provides a terminal emulator powered by libvterm. It is still in alpha and requires a component be compiled (vterm-module.so).

The following commands are available to open it:

  • +vterm/toggle (SPC o t): Toggle vterm pop up window in the current project
  • +vterm/here (SPC o T): Opens vterm in the current window

Module Flags

This module provides no flags.

Plugins

Prerequisites

  • Emacs must be built with dynamic module support, i.e. compiled with the --with-modules option.
  • You need libvterm installed on your system.
  • You need make, cmake and a C compiler such as gcc so that vterm can build vterm-module.so.

Dynamic Module support

To check if your build of Emacs was built with dynamic module support, check bin/doom info for MODULES next to "System features". If it's there, you're good to go.

You can also check for --with-modules in the system-configuration-options variable (SPC h v system-configuration-options).

  • Archlinux or Manjaro users who installed Emacs through pacman will have support baked in.
  • MacOS users:

    • If you use Emacs For Mac OS X, this option is enabled.
    • If you use emacs-plus, this option is enabled by default.
    • If you use emacs-mac, this options is not enabled by default. You may have to reinstall emacs with the option: brew install emacs-mac --with-modules

libvterm

  • Ubuntu or Debian users: apt-get install libvterm-dev
  • ArchLinux or Manjaro: pacman -S libvterm
  • MacOS: libvterm
  • NixOS:

    systemPackages = with pkgs; [
      # emacs    # no need for this, the next line includes emacs
      ((emacsPackagesNgGen emacs).emacsWithPackages (epkgs: [
        epkgs.vterm
      ]))
    ];

    Or for home-manager users:

    programs.emacs = {
      enable = true;
      extraPackages = epkgs: [ epkgs.vterm ];
    };

    This already contains a version of vterm-module.so, so NixOS users need not compile the module themselves as described below.

    Note: The nixpkgs-version that is used needs to be compatible with the rest of the plugins installed in doom. Therefore it might be necessary to pull in emacs and/or emacsPackagesNgGen from unstable or another channel. Otherwise arbitrary functionality of vterm might not work.

Compilation tools for vterm-module.so

When you first load vterm, it will compile vterm-module.so for you. For this to succeed, you need the following:

  • make
  • cmake
  • A C compiler like gcc
  • An internet connection (cmake will download needed libraries)

There are several ways to manually install the module:

  1. You can use M-x vterm-module-compile to let emacs automatically compile and install the module.

    Modify vterm-module-cmake-args to pass arguments to the cmake build script. e.g. To use a local build of libvterm instead of the included one.

    (setq vterm-module-cmake-args "-DUSE_SYSTEM_LIBVTERM=yes")

    WARNING: Emacs will hang during the compilation. It may take a while.

  2. You can compile and install the module yourself. Go to the vterm installation directory (usually ~/.emacs.d/.local/packages/elpa/vterm-<version>) and run the following:

    mkdir -p build
    cd build
    cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
    make
  3. You can also compile vterm-module.so elsewhere, but the module must be moved/symlinked to ~/.emacs.d/.local/packages/elpa/vterm-<version>/vterm-module.so vterm-module.so. Keep in mind that this folder will be deleted whenever the vterm package is updated.