This blog post documents the manual installation process for various coding plugins and formatters within Emacs. It covers Markdown, Python, Javascript, Emacs Lisp, Shell scripting, HTML, CSS, and JSON support. The author details both MELPA-based installation (where possible) and manual installation steps involving Git cloning and adding paths to the Emacs configuration file (init.el). It also includes key bindings for some formatters. The post primarily focuses on getting these tools working when they aren’t readily available via Emacs’ built-in package manager.
Language Support
markdown
directly install form MELPA use “M-x package-install markdown-mode”
or git clone repository from github, and put markdown-mode.el to location like ~/.emacs.d/third-party/markdown-mode/markdown-mode.el. and add below code to init.el
| |
and then M-x eval-buffer to load the plugin.
python
javascript
Formatter
emacs lisp formatter
I can’t install from MELPA, so insatll it manually. Download “elfmt.el” from github, place it under “~/.emacs.d/third-party/elfmt” directory.
add code below to load it:
| |
then eval it, and just use M-x elfmt.
- Type M-x elfmt to format the current buffer
- Type M-x elfmt-sexp to format the current sexp
- Type M-x elfmt-mode to automatically format the buffer on save
- Type M-x elfmt-global-mode to enable elfmt-mode everywhere
shell-like language formatter
Download binary file, add to user PATH variable,I put under “C:/usr/Runtime/bin”
could directly install from MELPA, use “M-x package-install shfmt”.
html,css,javascript formatter
directly install form MELPA use “M-x package-install markdown-mode”
Typing to use it:
- M-x web-beautify-css
- M-x web-beautify-html
- M-x web-beautify-js
optional, can add code below binding shortcut key:
| |