My Emacs setting for Linux and MacOS.
I have prepared example for each OS.
Please copy it to ~/.emacs
and, read .emacs.d
:
(load (expand-file-name (concat (getenv "HOME") "/.emacs.d/init")))
And I have prepared emacs client command for each OS.
Please create an alias:
alias e='~/.emacs.d/emacs-client.linux'
Please create emacs client binary in /usr/local/bin/emacs-cli
,
#!/bin/bash
if [ $# -eq 1 ]; then
open -n -a /Applications/Emacs.app $1
else
open -n -a /Applications/Emacs.app
fi
and create an alias this command:
alias e='~/.emacs.d/emacs-client.darwin'
Please call emacs with e
command like this:
$ e
or provide file path.
$ e init.el
This Emacs config use straight.el as package management. If straight.el is not yet installed, Emacs will automatically install straight.el at first. So, you don't need to setup straight.el.
But, you have already installed some packages using package.el, it will be warning. Please uninstall all packages which are installed by package.el.
I adopt Ricty Diminished as Japanese font. So please install this font in your OS.
$ yay -S ttf-ricty
And Emacs require all-the-icons to display icons in neotree.
Please install all-the-icons-install-fonts
on Emacs
M-x all-the-icons-install-fonts
Some minor mode uses language server protocol. So please install following packages for each language.
$ yay -S gopls
Install ts-ls
on Emacs.
M-x lsp-install-server
Install vls
on Emacs.
M-x lsp-install-server
Install volar-api
, volar-html
, volar-doc
.
M-x lsp-install-server
$ npm install -g svelte-language-server
$ pip install python-lsp-server
Install rust-analyzer
on Emacs.
M-x lsp-install-server
Download elixir-ls release package and expand it in ~/.emacs.d/.elixir-ls
according to https://github.com/elixir-lsp/elixir-ls#detailed-installation-instructions
dlv is required to debug golang in dap-mode, so please install:
$ go get github.com/go-delve/delve/cmd/dlv
# If in darwin
$ sudo /usr/sbin/DevToolsSecurity -enable
- emacs-mozc
- silver-searcher-ag
- eslint, babel-eslint, json-lint
- flake8
- go-fill-struct
- goimports
- golangci-lint
- aspell
$ yay -Ss the_silver_searcher
$ yay -Ss prettier
$ npm install -g json-lint
I use falke8
as lint tool for python. Please install it.
$ pip install flake8
$ go install github.com/davidrjenni/reftools/cmd/fillstruct@latest
$ go install golang.org/x/tools/cmd/goimports@latest
Please refer official page.
$ yay -S aspell
$ npm install -g elm-format