MyGit

seagle0128/.emacs.d

Fork: 263 Star: 1858 (更新于 1970-01-01 00:00:00)

license: GPL-3.0

Language: Emacs Lisp .

Centaur Emacs - A Fancy and Fast Emacs Configuration

最后发布版本: v7.1.0 ( 2023-08-01 00:10:37)

官方网址 GitHub网址

Centaur Emacs

Build Status Release Tag License Windows Linux macOS

Centaur Emacs

Table of Contents

This is an Emacs distribution that aims to enhance the default Emacs experience. It alters a lot of the default settings, bundles a plethora of additional packages and adds its own core library to the mix. The final product offers an easy to use Emacs configuration for Emacs newcomers and lots of additional power for Emacs power users.

It's able to run on Windows, GNU Linux and macOS. It is compatible ONLY with GNU Emacs 27.1 and above. In general you're advised to always run with the latest stable release - currently 29.1.

Features

  • Out of box.
  • Clean and Fast.
  • Quick fuzzy search.
  • Better Org/Markdown support.
  • Support multiple programming languages
    • C/C++/Object-C/C#/Java
    • Python/Ruby/Perl/PHP/Shell/Powershell/Bat
    • JavaScript/Typescript/JSON/YAML
    • HTML/CSS/XML
    • Golang/Swift/Rust/Dart/Elixir
    • ...
  • Auto completion.
  • Fly syntax check.
  • Fly spell check.
  • Git integration.
  • Project/Workspace integration.
  • Pomodor integration.
  • MPD integration.
  • Support docker.
  • Better Chinese support:
    • Chinese calendar
    • Youdao dictionary
    • Google translation
    • Pinyin search

Prerequisite

OS

  • GNU Linux
  • macOS
  • Windows (Cygwin/MSYS)

GNU Emacs

Please refer to Installing Emacs.

Dotfiles (Optional)

Recommend to use Centaur Dotfiles.

Quick Start

Install

mv ~/.emacs.d ~/.emacs.d.bak
git clone --depth 1 https://github.com/seagle0128/.emacs.d.git ~/.emacs.d

or download the zip package directly and extract to ~/.emacs.d.

If you are using Linux, you may prefer an XDG-compatible location, please use

# Please make sure ~/.emacs.d, ~/.emacs and ~/.emacs.el don't exist
git clone --depth 1 https://github.com/seagle0128/.emacs.d.git $XDG_CONFIG_HOME/emacs

or extract the zip package to $XDG_CONFIG_HOME/emacs directory.

Then start Emacs. Wait for a while to install packages at the first startup. Enjoy! :smile:

Attention: It may take long time to download packages at the first startup. It's up to your network speed. If it takes too long time and no response, check the connection or use proxy.

Note: Start Emacs with the minimal configuration for fast startup and troubleshooting.

emacs -Q -l ~/.emacs.d/init-mini.el

Update

# Update Centaur Emacs, including configurations and packages
M-x centaur-update

# Update Emacs configurations only
M-x centaur-update-config

# Update ~/.dotfiles if it exists
M-x centaur-update-dotfiles

# Update packages only
M-x centaur-update-packages

# Update all including configurations, packages and dotfiles
M-x centaur-update-all

Docker

cd ~/.emacs.d/Dockerfile
docker build -t centaur/emacs .
docker run -it centaur/emacs bash

Customization

Customize Group

M-x customize-group and select centaur. Set and save the configurations, then restart Emacs.

Manual

Add or change the configurations in custom.el, then restart Emacs.

For Example:

(setq centaur-logo nil)                        ; Logo file or nil (official logo)
(setq centaur-full-name "user name")           ; User full name
(setq centaur-mail-address "user@email.com")   ; Email address
(setq centaur-proxy "127.0.0.1:1087")          ; HTTP/HTTPS proxy
(setq centaur-socks-proxy "127.0.0.1:1086")    ; SOCKS proxy
(setq centaur-server t)                        ; Enable `server-mode' or not: t or nil
(setq centaur-icon t)                          ; Display icons or not: t or nil
(setq centaur-package-archives 'melpa)         ; Package repo: melpa, emacs-cn, bfsu, netease, sjtu, tencent, tuna or ustc
(setq centaur-theme 'auto)                     ; Color theme: auto, random, system, default, pro, dark, light, warm, cold, day or night
(setq centaur-completion-style 'minibuffer)    ; Completion display style: minibuffer or childframe
(setq centaur-dashboard nil)                   ; Display dashboard at startup or not: t or nil
(setq centaur-lsp 'lsp-mode)                   ; Set LSP client: lsp-mode, eglot or nil
(setq centaur-lsp-format-on-save t)            ; Auto format buffers on save: t or nil
(setq centaur-lsp-format-on-save-ignore-modes '(c-mode c++-mode python-mode markdown-mode)) ; Ignore format on save for some languages
(setq centaur-tree-sitter nil)                 ; Enable tree-sitter or not: t or nil. Only available in 29+.
(setq centaur-chinese-calendar nil)            ; Support Chinese calendar or not: t or nil
(setq centaur-player t)                        ; Enable players or not: t or nil
(setq centaur-prettify-symbols-alist nil)      ; Alist of symbol prettifications. Nil to use font supports ligatures.
(setq centaur-prettify-org-symbols-alist nil)  ; Alist of symbol prettifications for `org-mode'

The default package archives is melpa. You can change it in custom.el, or set manually via M-x set-package-archives anytime.

For the personal configurations, you could put to ~/.emacs.d/custom-post.org or~/.emacs.d/custom-post.el.

Hydra

Name Scope Keybinding Description
toggles-hydra global <f6> Global option toggles
window-hydra global C-c w/C-x o w Window management
doom-modeline-hydra doom-modeline-mode C-<f6> Mode-line options and actions
hydra-dired-qick-sort dired S Options for dired-quick-sort
org-hydra org-mode < Org template
dashboard-hydra dashboard-mode h/? Actions for the dashboard
dumb-jump-hydra global C-M-j Jump to definition
youdao-dictionay-hydra youdao-dictionay-mode h/? Actions for youdao-dictionary
ztreediff-hydra zreediff-mode C-<f5> Actions for text mode directory tree
git-messenger-hydra global C-x v p Actions for git-messenger
smerge-mode-hydra smerge-mode C-c m Actions for smerge-mode
rect-hydra text-mode, prog-mode C-<return> Actions for Rectangle
rect-hydra org-mode S-<return> Actions for Rectangle
hideshow-hydra prog-mode C-~ Actions for hideshow
lsp-ui-hydra lsp-ui-mode M-<f6> Actions for lsp-ui
dap-hydra dap-mode M-<f5> Actions for dap-debug
elfeed-hydra elfeed ? Actions for RSS reader elfeed
xwidget-hydra xwidget-webkit-mode ? Actions for embedded webkit browser

Screenshots

Dashboard

color_icons

markdown_magit

org_classic

main_light

FAQ

  1. How to display icons correctly in Centaur Emacs?

    Generally you just use M-x centaur-install-fonts to install all necessary fonts. The manual steps are below.

    nerd-icons are necessary. Run M-x nerd-icons-install-fonts to install the resource fonts. On Windows, the fonts should be installed manually. nerd-icons supports bot GUI and TUI. If you don't like color icons, (setq nerd-icons-color-icons nil) to disable it. Please refer to nerd-icons.el for details.

  2. The packages cannot be installed, what should I do?

    Generally it's due to connection issue. Please refer to #98.

    • M-x package-refresh-contents and try again.
    • (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3").
    • Use other mirror of ELPA.
    • Change another network to retry.
  3. How to search Chinese via pinyin?

    In Emacs, C-s !. If you just want to search !, use C-s \!.

  4. How to use the Centaur Dashboard?

    If centaur-dashboard is non-nil the Centaur Dashboard will be opened at startup automatically. After startup, you could use F2 to reopen it anytime. In the dashboard, please press ? or h to get the help. You can easily jump to the sections or buttons with keybindings, e.g. Homepage(H), Session(R, L), Settings(S), Update(U), Recent Files (r), Bookmarks(m) and Projects(p).

  5. Does Centaur Emacs support Language Server Protocol (LSP)?

    The LSP feature is supported and enabled by default in Centaur Emacs. lsp-mode is the default client, and eglot is another choice. Use (setq centaur-lsp nil) to disable LSP if you don't like it.

    To use LSP you should install the language servers. Refer to lsp-mode: supported-languages or eglot: Connecting to a server for the details.

  6. How to enable plantuml in org-mode?

    Put (setq org-plantuml-jar-path "<path of plantumx.x.x.jar>") in custom.el.

  7. Why the Emacs environment variables and exec-path are different between GUI and terminal?

    Please refer to #33. You should instead set environment variables in startup files like .profile, .bash_profile or .zshenv, then Centaur Emacs is able to recognize and import the environment variables.

  8. How to use zoom-window in Centaur Emacs?

    See #169.

Donate

If you think the it's helpful for you, please consider paying a cup of coffee for me. Thank you! :smile:

Alipay      Wechat Pay

PayPal      Buy Me A Coffee

最近版本更新:(数据更新于 1970-01-01 00:00:00)

2023-08-01 00:10:37 v7.1.0

2020-05-02 14:53:42 v5.8.0

2019-12-26 14:59:49 v5.7.0

2019-08-22 01:10:23 v5.6.0

2019-07-09 17:56:02 v5.5.0

2019-05-11 02:44:28 v5.4.0

2019-03-16 23:09:22 v5.3.0

2019-01-28 18:29:49 v5.2.0

2018-12-30 02:54:50 v5.1.0

2018-12-07 14:38:02 v3.6.1

主题(topics):

centaur, centaur-emacs, configuration, elisp, emacs, emacs-configuration, emacs-lisp

seagle0128/.emacs.d同语言 Emacs Lisp最近更新仓库

2024-08-22 13:46:09 emacs-helm/helm

2023-12-04 16:21:08 bbatsov/solarized-emacs

2023-10-13 23:11:27 bbatsov/projectile

2023-08-08 10:48:13 jaypei/emacs-neotree

2022-09-29 21:26:44 ocaml/tuareg

2021-10-12 17:50:23 cabins/tenon-emacs