项目作者: Aleman778

项目描述 :
My Emacs configurations, easy to use
高级语言: Emacs Lisp
项目地址: git://github.com/Aleman778/Emacs-Config.git
创建时间: 2019-08-26T13:31:51Z
项目社区:https://github.com/Aleman778/Emacs-Config

开源协议:

下载


My Emacs Configurations

These are my emacs lisp configuration files, please feel free to use them.
At the moment I have only configured my emacs for C++ programming.
More major-modes will be added later when I require them my self.

Installation

Clone the repository into either your ~/.emacs.d/ directory or anywhere else that fits.
Note: cloning outside of the default emacs directory requires that the config.el and packages.el
are moved into the ~/.emacs.d/ folder.

Now in your ~/.emacs file put the following code:

  1. (add-to-list 'load-path "path/to/clone") ; only needed if clone is outside ~/.emacs.d/
  2. (require 'am-core)
  3. (am-initialize)

Before restarting emacs please take a look inside the packages.el file and turn on and off
packages that you wish to use. Note that the first time you start Emacs it will take a few minutes
but the next time it will go very fast!
And that’s it just start emacs and happy hacking!

Custom Configurations

Inside the ~/.emacs.d/config.el file you can tinker and further customize. This file is loaded
at the end of am-initialize function. Here is what my config looks like:

  1. ;;; config.el --- your own custom tinkering can be done here -*- lexical-binding: t; -*-
  2. ;; Add dracula as custom theme
  3. (add-to-list 'am-theme-alist 'dracula)
  4. ;; Use Source Code Pro font
  5. (set-frame-font "Source Code Pro 9")
  6. ;; Add .h files to c++ mode instead of c mode
  7. (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
  8. ;; Add .sq files to c++-mode (temporary)
  9. (add-to-list 'auto-mode-alist '("\\.sq\\'" . c++-mode))
  10. ;; Setup default layout
  11. (am-layout-two-columns "c:/dev/sqrrl/src/parser.cpp" "c:/dev/sqrrl/src/main.cpp")

Initialization of modules

In ~/.emacs.d/init.el you can specify this code which will load the modules you want to use.
Below you find an example of how this can be performed, just comment out anything you don’t want.

  1. ;;; init.el --- define modules to use -*- lexical-binding: t; -*-
  2. (am-modules!
  3. :keybinds
  4. ;; evil ; the extensible vi layer for emacs (not configured)
  5. xah-fly-keys ; the most efficient (vim like) keybinding
  6. :search
  7. ido ; search engine included now in emacs
  8. ;; ivy ; another search engine
  9. :complete
  10. company ; modular in-buffer completion framework (not working atm.)
  11. :utils
  12. hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
  13. rg ; searches directories for a regex pattern
  14. which-key ; lists all keybinds available
  15. minions ; hide minor-modes in the modeline
  16. doom-modeline ; modeline from doom emacs, very pretty
  17. ;; smartparens ; smart minor mode that deals with parens pairs (not configured)
  18. ;; pdf-tools ; adds support for viewing pdfs inside of emacs
  19. :lang
  20. c++-mode ; major-mode for C++ programming language
  21. rust-mode ; major-mode for Rust programming language
  22. go-mode ; major-mode for Go programming language
  23. python-mode ; major-mode for python programming language
  24. glsl-mode ; major-mode for opengl shading language
  25. latex-mode ; major-mode for writing latex documents
  26. :themes
  27. doom-themes ; doom emacs themes
  28. )
  1. ;;; config.el --- your own custom tinkering can be done here -*- lexical-binding: t; -*-
  2. ;; Add dracula as custom theme
  3. (setq am-theme-alist (list 'doom-one 'doom-one-light))
  4. (setq am-background-alist (list nil 'floralwhite))
  5. (am-change-theme)
  6. ;; Use Source Code Pro font
  7. (set-frame-font "Source Code Pro 9")
  8. ;; Add .h files to c++ mode instead of c mode
  9. (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
  10. ;; Add .sq files to c++-mode (temporary)
  11. (add-to-list 'auto-mode-alist '("\\.sq\\'" . c++-mode))
  12. ;; Setup default layout
  13. (am-layout-three-columns "c:/dev/sqrrl/code/sqrrl_interp.cpp" "c:/dev/sqrrl/code/sqrrl_parser.h" "c:/dev/sqrrl/code/sqrrl_ast.h")