Skip to content

semenInRussia/emacs.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

./doc/s2.png

semenInRussia Emacs config (maybe called SEMACS?)

A good (I think) configuration for Emacs which have a BIG AMOUNT of unique features. This config 100% not for everyone Emacs user. I think you must have any Emacs background to use it (but maybe not)

This config is required in Emacs29 version (or emacs30, but you can rebuild all emacs with emacs --modules --install), even better if Emacs is with native-compilation feature

In this config you can find a big amount of new concepts for editor configs (I think). One of the most interesting features is that you can install this config (not count installing fonts, enchant2 (spell checker) and ripgrep) very quickly, because all packages are built in zip archive (see releases or #Installation section). I hope you can be inspired by this configuration.

Some men asked me “So, you copied Doom. Why?”. My answer is that my config is even better than Doom (for me) + it isn’t a copy of Doom. I even wasn’t user of Doom never

./doc/s1.png ./doc/s8.png

You can see some other screenshots in doc/

Features

My configuration have a big amount of interesting concepts which are unique ones. And the biggest part of my config is opposite to Doom. Things where my config is better on 100% I will tell #nodoom

  • a beautiful design.

    It includes

    • A big amount of themes
    • The default ones are light and dark. You can change it for session using M-x my-light-theme or M-x my-dark-theme. If you need to change it forever, replace a line in my-load-theme.el file
    • Diagnostics and other things from echo display in the area at the top left corner, you can see it in pictures above (or in doc/) (#nodoom)
    • Amazing modeline (it is doom-modeline lol)
    • Icons everywhere (#nodoom)
    • Small, but amazing padding around screen (#nodoom) (spacious-padding by @protesilaos)
    • No to prettify-mode
  • Very (really very) fast start up. (#nodoom #nodoom)

    On my old computer doomemacs starts in 4+ seconds (it prints it after startup), but in fact it also wait for when themes, modeline and other things will be loaded. My config on other side take only 2secs(sometimes even 0.9s) and almost don’t take time after.

  • A big amount of packages (~200)
  • Reload the configuration Emacs lisp file after it saved. Inspired by VSCode and NVChad
  • More fast way to install
  • meow over evil
  • Own package manager, built over straight.el. (#nodoom)

    The benefit is a speed, it only one time add the path to load-path. And other times Emacs will find a package only in this directory, instead of 220+ other directories when use straight.el (it’s important for Windows)

    It’s even better than Doom package manager, my package manager also join all autoloads file into one and byte compile it like Doom (now I think I overingenered it)

  • Use good-practice solutions, like replace heavy things with the more light (corfu over company). (#nodoom)
  • Use perspectives (virtual desktops/workspaces for Emacs) with intuitive way
  • Some optimizations for Windows
  • Big usage of embark (just fun)
  • Some things for sport programming
    • special recipes to compile and run C++ files
    • Edit input.txt (add input samples), now you can press <kbd>f5</kbd> in C++ buffer, choose run with input.txt
    • in GDB debugger you can just insert whole input.txt content in one line (it’s useful)
    • a big amount of helpful snippets
    • insert template with snippet ! and multitester with !!

Extension (my config as framework)

Interesting way to extension, which you can call chaos.

If you use this “framework”: You don’t need in my pam package manager! You don’t need any strict file system! You don’t need macros!

Every config file can be in any sub-folder of /lisp/, have any name, contains any things. Only one separation is that files which not always needed at startup you can place at the /lisp/local-projects/.

You build config (M-x my-build-config) and all files from lisp/ will be joined into dist/my-modules.el you can see source of my-modules-build inside local-projects/my-build-config.el (in this file you can also change order of including lisp files into my-modules if it’s needed) also you can generate autoloads files for local-projects (use --local-projects flag), after that you everywhere can use autoloaded functions from local-projects.

Also you can build config with call emacs --modules in any shell

So main files (files of framework part) are only:

  • early-init.el some speed-hacks beginnings for init.el
  • init.el but only a part, where handling of CLI arguments
  • local-projects/my-build-config.el, I think you understand it

Packager Manager

this config uses a small package manager which is wrapper over straight.el. I called it pam

Idea is simple:

when install
after package is cloned and built in straight directory, `pam` copy all important package files into directory `pam` and append autoloads into one certain `pam` file
when use
just add pam directory to load-path and load ONCE AT EMACS START. it’s better than load every autoload and add to load path ever new package after startup. on windows this optimization is matter

so there are two types of handling (pam-use-package 'package):

  1. install with `straight`
  2. do nothing

if your packages are installed choose second which is default. If you need to install new packages choose 1, you can either use emacs --install or M-x pam-install-everything-mode

Command Line Arguments

Also how you can see above, this configuration provide some additional options you can use when run emacs in terminal, here the list:

  • --modules. Build my-modules.el - file that contains all configuration and will be built from them. (see my-build-config)
  • --install. Install every package I use via straight. (it can take long time)
  • --local-projects. Byte-compile local-projects and generate autoloads. “Local projects” are Elisp files, that Emacs don’t load instantly after run. You can consider it like your own extensions to Emacs
  • --bcompile. Byte-compile init.el, early-init.el
  • --kill. Instantly after init.el was loaded, kill emacs session. It’s useful, if you need only to use other CLI flags actions, but don’t need in editor

Installation

Before installation you must install JetBrainsMono Nerd Font (use this zip file) or other Nerd Font, if your font isn’t JetBrainsMono, change the variable inside .config/emacs/lisp/ui/my-fonts.el

Also suggest to install ripgrep tool.

Also (if you are Mac OS or Linux user) suggest install enchant: a spell checker, see jinx

To install my config on your config as main use the following shell command, if you need to only try this config (without delete your thing), change .config/emacs on anything like ~/semacs (on windows replace .config with anything like AppData/Roaming)

# cd home directory!
wget https://github.com/semenInRussia/emacs.el/releases/download/latest/semacs.zip && mkdir .config/emacs -p && unzip -o -d .config/emacs semacs.zip

# on windows
# cd home directory %USER%
cd AppData/Roaming/
wget https://github.com/semenInRussia/emacs.el/releases/download/latest/semacs.zip && unzip -o -d .emacs.d semacs.zip

In this commands 3 steps:

  1. Install the archive which is updated automatically after every commit. This archive contains a configuration with installed 3rd party packages
  2. Make a directory where config will be located (defaults to .config/emacs but in windows it can be anything else)
  3. Unzip the archive to this folder

after this command on Linux or MacOS you MUST run nerd-fonts-install-fonts, maybe not

Also if you need in jinx, run M-x pam-use-package jinx

You can extract an archive into any directory, and run emacs using --init-directory flag, like:

emacs --init-directory=~/semacs    # semacs is cloned repo source
# or
emacs -l init.el     # init.el is the file from repo

So you can test it without chemacs and other stupid things, you even not need in emacs29 –init-directory, but you still needed in emacs29

Dependencies

  • Emacs 29.1+ (check here)
  • Ripgrep (check here)
  • Enchant :not for Windows: (check here, also install needed dictionaries, maybe use the following shell)
    cd .config/enchant/
    wget https://raw.githubusercontent.com/LibreOffice/dictionaries/master/en/en_US.dic
    wget https://raw.githubusercontent.com/LibreOffice/dictionaries/master/en/en_US.aff
    wget https://raw.githubusercontent.com/LibreOffice/dictionaries/master/ru_RU/ru_RU.dic
    wget https://raw.githubusercontent.com/LibreOffice/dictionaries/master/ru_RU/ru_RU.aff
    mkdir hunspell
    mv en_US.aff en.aff
    mv en_US.dic en.dic
    mv *dic hunspell
    mv *aff hunspell
        
  • Fonts (better JetBrains Mono and Symbols Nerd Font Mono : link to zip archive)

About

My cool config for Emacs with big amount of features and fast init time

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published