Skip to content

jsntn/emacs.d

Repository files navigation

A Personal Emacs Configuration

https://github.com/jsntn/emacs.d/actions/workflows/myelpa.yml/badge.svg

Behold, dear visitor, my cherished Emacs configuration, meticulously crafted and refined since the year of 2020. With unwavering dedication, I tirelessly endeavor to harmonize its functioning across the Windows, Arch Linux and macOS operating systems. 🙂

Table of Content

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

Aspell

GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell. It can either be used as a library or as an independent spell checker. Its main feature is that it does a superior job of suggesting possible replacements for a misspelled word than just about any other spell checker out there for the English language. (via)

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 js-yaml as YAML checker on my PC, this can be installed with Scoop easily.

yaml-yamllint is another option 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.

The Dependencies Installation

The following command will install the Python packages according to the configuration file requirements.txt,

$ pip install -r requirements.txt

Apart from the Python packages, refer to the sections below to proceed with other dependencies installation.

For Windows Platform Specifics

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

  • Aspell
    scoop install aspell
        
  • Prettier
    scoop install nodejs
    npm install -g prettier
        
  • ShellCheck
    scoop install shellcheck
        
  • shfmt
    scoop install shfmt
        
  • js-yaml
    scoop install nodejs
    npm install -g js-yaml
        

EmacSQL SQLite Binary

In case of getting the error message: “No EmacSQL SQLite binary available, aborting”, follow this to fix.

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.

In case of using portable GraphViz, specify the environment variable GRAPHVIZ_DOT to set the exact location of your GraphViz executable.

I.e.,

(setenv "GRAPHVIZ_DOT" "V:/bin/GraphvizPortable/App/graphviz/bin/dot.exe")

PlantUML

For portable plantuml.jar integration, i.e.,

(setq plantuml-jar-path "V:/bin/plantuml.jar")
(setq org-plantuml-jar-path
      (expand-file-name "V:/bin/plantuml.jar"))

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.

Read more