UP | HOME

Table of Contents

Holymacs ~ IDE

Type to search the document. Use arrow keys to navigate results.

    Table of ContentsClose

    Versioning

    (use-package magit
    :bind
    (("C-x g" . #'magit-status)))
    

    Docker

    (use-package docker)
    (use-package dockerfile-mode)
    (use-package docker-compose-mode)
    

    Workspaces

    (use-package tabspaces
      :hook (after-init . tabspaces-mode)
      :commands (tabspaces-switch-or-create-workspace
                   tabspaces-open-or-create-project-and-workspace)
      :bind
      (("s-{" . tab-previous)
       ("s-}" . tab-next))
      :custom
      (tabspaces-keymap-prefix "M-o w")
      (tabspaces-use-filtered-buffers-as-default t)
      (tabspaces-default-tab "Default")
      (tabspaces-remove-to-default t)
      (tabspaces-initialize-project-with-todo t)
      (tabspaces-todo-file-name "project-todo.org")
      ;; I don't want tabspaces to manage sessions, so I keep those lines commented out.
      ;; (tabspaces-session t)
      ;; (tabspaces-session-auto-restore t))
      )
    

    Programming languages

    Elixir

    (use-package elixir-mode)
    (use-package exunit
      :hook
      (elixir-mode . exunit-mode))
    ;; Alchemist seems to be outdated and not more maintained
    ;; (use-package alchemist
    ;;   :config
    ;;   (add-to-list 'god-exempt-major-modes 'alchemist-test-report-mode))
    

    Elixir Livebooks are Markdown files with .livemd extension. Let's handle them!

    (add-to-list 'auto-mode-alist '("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\|livemd\\)\\'" . markdown-mode))
    

    LSP

    (use-package eglot
      :config
      (add-to-list 'eglot-server-programs '(elixir-mode "~/.emacs.d/elixir-ls/release/language_server.sh")))
    

    Elixir

    Code stolen from this blogpost (thanks Jeff Kreeftmeijer!)

    git clone git@github.com:elixir-lsp/elixir-ls.git ~/.emacs.d/elixir-ls
    cd ~/.emacs.d/elixir-ls
    mix deps.get
    mix elixir_ls.release
    

    Markup languages

    Markdown

    (use-package markdown-mode)
    

    Project management

    Run make on list of projects

    (defcustom minemacs-projects '() "Project list" :type '(repeat :tag "Projects" (string :tag "Path")))
    
    (defun minemacs-projects-make (&optional task)
      (interactive (list (completing-read "Task: " '("dev" "run" "usage"))))
      (mapcar
       (lambda (project)
         (delete-other-windows)
         (let ((split-dir :below)
               (command (format "make %s" task))
               (buffer-name (format "Project: <%s>" project))
               (default-directory project))
           (async-shell-command (format "cd %s && %s" project command) buffer-name)
           (pop-to-buffer buffer-name)
           (if (eq split-dir :below)
               (progn (split-window-below) (setq split-dir :right))
             (progn (split-window-right) (setq split-dir :below)))
           (balance-windows)))
       minemacs-projects))
    

    Focusing

    (use-package golden-ratio
      :bind
      (("M-o W" . #'golden-ratio-mode)))
    

    Terminal emulator

    Vterm

    Here install vterm and some useful functions to ease interaction with Tmux.

    (use-package vterm
      :after god-mode
      :config
      (add-to-list 'god-exempt-major-modes 'vterm-mode)
    
      (defun holymacs-vterm-exec (command)
        (interactive "sCommand: ")
        (let ((buffer-name (format "*vterm <%s>*" command)))
          (with-current-buffer (vterm buffer-name)
            (vterm-send-string (format "%s && exit\n" command)))))
    
      (defun holymacs-tmux/open ()
        (interactive)
        (holymacs-vterm-exec "tmux attach || tmux")))
    

    Date: 2024-04-20 Sat 00:00

    Emacs 30.1 (Org mode 9.7.11)

    Validate