emacs.d/README.org

5.8 KiB

A Personal Emacs Configuration

This is my personal Emacs configuration, continually used and tweaked since 2020, and I am always trying to make it same behaviour on my Windows and macOS.

Usage

TODO

Setup

Basically, following the The Dependencies section is enough to set up.

If you're a big fan of Portable Software on Windows Platform like me, please refer to Windows Platform: Portable Software Integration.

Key Bindings

Key Bindings are managed by general.el, and the bindings configuration can be found from here.

The Dependencies

Flycheck

Python

I use python-flake8 as Python checker, refer to requirements.txt.

Shell

I use sh-shellcheck as Shell checker, refer to this link for installation.

YAML

I use yaml-yamllint as YAML checker, refer to requirements.txt.

PlantUML

The PlantUML is run as a local JAR file, which is configured in the init-plantuml.el. And the plantuml.jar can be downloaded from official download page.

For Windows Platform Specifics

Use MSYS2 to Manage Aspell

I use MSYS2 for aspell implementation.

  1. Search aspell on MingW64 terminal,

    $ pacman -Ss aspell
  2. Installing aspell and dictionary you need,

    $ pacman -S mingw64/mingw-w64-x86_64-aspell
    $ pacman -S mingw64/mingw-w64-x86_64-aspell-en
  3. Find aspell.exe location with which aspell, e.g. C:\msys64\mingw64\bin
  4. Be sure the aspell.exe executable binary file can be found from Emacs,

    (executable-find "aspell")

    Otherwise, it can be done by updating the Emacs configuration,

    (add-to-list 'exec-path "C:/msys64/mingw64/bin/")

Use Scoop to Manage Other Apps

I started using Scoop to manage some of my apps, including,

  • Prettier

    scoop install nodejs
    npm install -g prettier
  • ShellCheck

    scoop install shellcheck
  • shfmt

    scoop install shfmt

For macOS Platform Specifics

On macOS, I use Homebrew to manage apps, including,

  • Aspell

    brew install aspell
  • GraphViz

    brew install graphviz

    You might prefer using the verified GraphViz as mentioned in Which version of GraphViz should I use, here is a log example of my GraphViz 2.44.0 installation.

  • ShellCheck

    brew install shellcheck
  • shfmt

    brew install shfmt

Windows Platform: Portable Software Integration

Flycheck

Portable Python - WinPython

For the packages are installed in a portable Python like WinPython, executable paths should be configured manually.

python-flake8

I.e.,

(setq flycheck-python-flake8-executable "V:/WPy32-3810/python-3.8.1/Scripts/flake8.exe")
yaml-yamllint

I.e.,

(setq flycheck-yaml-yamllint-executable "V:/WPy32-3810/python-3.8.1/Scripts/yamllint.exe")

GraphViz

Refer to the GraphViz post from PlantUML website.

WinPython

WinPython is a portable distribution of the Python programming language for Windows.

Known Issue

I use use-package to manage packages in init-packages.el.

However, it seems the hl-todo and org-bullets settings don't work if they are configured in the init-packages.el, i.e., link 1 and link 2, but both of them are effective if I move them to init-display.el and my local-config.el.