Giter VIP home page Giter VIP logo

dotemacs's Introduction

Table of Contents

  1. Features
    1. Blazing fast.
    2. Robust
    3. Compatability
    4. Feature rich
    5. Be wild
  2. Showcase
    1. Welcome screen
    2. Code Navigation
    3. Data Science
    4. Orgmode
  3. TODOs
    1. Report org-capture bugs when inserting entries into table to upstream.
    2. Utilize the contextual information from previous code block when editing source block within markdown/org.
    3. Lazily load third-party plugins for evil.
    4. Configure evil-args to use spaces as argument delimiter for emacs-lisp-mode.
  4. Prerequisites
  5. Discussion
  6. Notes
    1. Startup speed
    2. Naming conventions (WIP)
    3. Corfu or Company?

If you’re currently reading this README file in Markdown format, it has been generated through org-export, from its original org format. For the best experience, please consider reading the org format file instead.

Features

Blazing fast.

With TTY starting in 0.32 seconds on a MacBook Air (M1, 2020), 0.73 seconds on a VPS with a 1-core CPU and 1 GB RAM, and 0.22 seconds on WSL with an Intel i7-1185G7 and 32 GB RAM, TTY is exceptionally fast. The GUI is just as quick, starting in 0.44 seconds on Mac M1 and 0.31 seconds on WSLg. For more information on startup speed, see 6.1.

Robust

Package versions are locked and under version control, so no breaking changes are expected.

Compatability

This configuration works well on both TTY and GUI. Compatibility on TTY is not compromised, while GUI features, including xwidget, are also well-configured.

Feature rich

A blazing fast startup speed doesn’t mean it is a lite and minimal configuration. Instead, it is “heavy” and feature rich, including:

  • A modern minibuffer completion experience powered by vertico+consult+orderless+embark+marginalia family bucket.

  • Modal editing ecosystem everywhere, powered by evil and many other extensions.

  • A keybinding scheme centered around leader and localleader keys, powered by general and which-key.

  • In-buffer autocompletion frontend based on company (see 6.3).

  • Code completion and navigation based on eglot (LSP) and citre (Ctags).

  • Integration with eglot and org-babel or markdown-mode that takes literate programming to the next level.

Be wild

Randomly select a theme from a curated list each time you start up and automatically switches between day and night themes at scheduled time. Additionally, the displayed verses on the welcome screen is also randomized with each launch. Have a fresh experience at every time. Be casual and wild!

Showcase

Welcome screen

img

The welcome screen displays two randomly chosen verses from my carefully chosen collection. This serves as a scratch buffer where you can perform Lisp evaluations. Frequently used commands are also listed, allowing for convenient execution by simply typing the hint key.

Code Navigation

img

Making use of LSP and Ctags, navigating code is a breeze. The file tree is displayed on the leftmost window through dired-sidebar, and the bottom right window showcases the references of a selected symbol via LSP find references (the Emacs command is xref-find-references). In the central floating window, a preview of the definition of the chosen symbol is displayed with the aid of ctags (the Emacs command is citre-peek).

Data Science

img

A typical workflow in data science involves multiple components. The top right window showcases an embedded xwidget widget that displays the HTML visualization created via plotly. In the bottom left window rests the R REPL console where you can send your code for execution. Meanwhile, the bottom right window features a chatgpt REPL console (via aichat). I specify the aichat mode as exp-code-e to prompt chatgpt to provide an explanation of the code you sent.

Orgmode

img

Write prose in orgmode, and export it into reveal.js presentation. The right window displays the HTML slides using xwidget webkit. Preview slides in emacs without the need to open GUI browser anymore.

TODOs

Report org-capture bugs when inserting entries into table to upstream.

Utilize the contextual information from previous code block when editing source block within markdown/org.

Lazily load third-party plugins for evil.

Configure evil-args to use spaces as argument delimiter for emacs-lisp-mode.

Prerequisites

  • This configuration is designed for Emacs 29 or newer versions.
  • Your Emacs must be built with Treesitter support for this configuration to work effectively. If you are using a widely used package manager, and said manager has updated Emacs to version 29 or later, it’s highly probable that Treesitter is already built into the Emacs version provided via the package manager. We advise verifying the package specifications for exact details if you choose to leverage a package manager-built Emacs.
  • A separate installation is required for Treesitter grammar. You can execute the command M-x my~treesit-install-all-language-grammar to install all the language grammars that are currently in use.

Discussion

  • It is recommended to use the mailing list ~northyear/[email protected].
  • Alternatively, you are also welcome to open a Github issue.

Notes

Startup speed

Startup speed is measured using (emacs-init-time).

However, note that this metric may fool you. If you load some packages in emacs-startup-hook or after-init-hook, then (emacs-init-time) cannot properly measure your real startup time. Packages loaded at emacs-start-hook and after-init-hook are actually not lazy loaded; they are loaded during your startup anyway. Using these hooks only skews (emacs-init-time) and does not accurately reflect startup time. This configuration is honest and truly lazy loads packages.

Naming conventions (WIP)

  • A symbol prefixed with my: indicates it is a function.

  • A symbol prefixed with my$ indicates it is a variable.

  • A symbol prefixed with my% indicates it is a macro.

  • A symbol prefixed with my~ indicates it is a mode or an interactive command.

    (This also means that the derivative variables defined by a mode are also prefixed with my~, e.g. my~foo-mode-hook).

  • A symbol prefixed with my* indicates it is generated via closure or macro.

  • A symbol prefixed with my& indicates it is a special symbol like faces.

Corfu or Company?

Corfu is a sleek and minimalistic auto-completion UI that uses only completion-at-point-functions as its backend. The GUI experience with corfu is delightful, providing a refreshing and intuitive interface. However, to maintain full compatibility with TTY, I continue to use company as the auto-completion frontend until corfu’s TTY integration is complete.

dotemacs's People

Contributors

milanglacier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hughjfchen qiangf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.