GithubHelp home page GithubHelp logo

doomemacsconfig's Introduction

DOOMEMACS 29.1 on Debian WSL with config

Installing EMACS-29.1 on DEBIAN WSL

  1. Install the build dependencies for Emacs:

    $ sudo apt build-dep emacs $ sudo apt install libtree-sitter-dev

  2. Download and unpack the Emacs archive:

    $ wget http://mirrors.nav.ro/gnu/emacs/emacs-29.1.tar.xz $ tar xvf emacs-29.1.tar.xz

    Alternatively you can download from the nearby GNU mirror https://www.gnu.org/software/emacs/download.html

  3. Install Emacs / Build Package

    $ ./autogen.sh $ ./configure –with-native-compilation –with-mailutils –with-json –with-tree-sitter –with-pgtk CC=gcc-12

    $ make -j$(nproc) $ sudo make install

  4. Check if Emacs is installed

    $ which emacs

I had to create symlinks to /usr/local/bin/emacs. Additionally i had to install some libs manually. libwebkit2gtk-4.0-dev

Resources

https://gist.github.com/zoliky/0445b20676bfa85450d7df006066ceb7 https://github.com/hubisan/emacs-wsl?tab=readme-ov-file

Installing Doom Emacs

https://github.com/doomemacs/doomemacs?tab=readme-ov-file#install

WIP Configuring Doom EMACS (config.el)

Information regarding the config

General

Place your private configuration here! Remember, you do not need to run ‘doom sync’ after modifying this file!

Some functionality uses this to identify you, e.g. GPG configuration, email clients, file templates and snippets. It is optional. (setq user-full-name “John Doe” user-mail-address “[email protected]”)

Whenever you reconfigure a package, make sure to wrap your config in an `after!’ block, otherwise Doom’s defaults may override your settings. E.g.

(after! PACKAGE (setq x y))

The exceptions to this rule:

  • Setting file/directory variables (like `org-directory’)
  • Setting variables which explicitly tell you to set them before their package is loaded (see ‘C-h v VARIABLE’ to look up their documentation).
  • Setting doom variables (which start with ‘doom-’ or ‘+’).

Additional functions/macros

Here are some additional functions/macros that will help you configure Doom.

  • `load!’ for loading external *.el files relative to this one
  • `use-package!’ for configuring packages
  • `after!’ for running code after a package has loaded
  • `add-load-path!’ for adding directories to the `load-path’, relative to this file. Emacs searches the `load-path’ when you load packages with `require’ or `use-package’.
  • `map!’ for binding new keys

To get information about any of these functions/macros, move the cursor over the highlighted symbol at press ‘K’ (non-evil users must press ‘C-c c k’). This will open documentation for it, including demos of how they are used. Alternatively, use `C-h o’ to look up a symbol (functions, variables, faces, etc).

You can also try ‘gd’ (or ‘C-c c d’) to jump to their definition and see how they are implemented.

Config

Fonts

Doom exposes five (optional) variables for controlling fonts in Doom:

  • `doom-font’ – the primary font to use
  • `doom-variable-pitch-font’ – a non-monospace font (where applicable)
  • `doom-big-font’ – used for `doom-big-font-mode’; use this for presentations or streaming.
  • `doom-symbol-font’ – for symbols
  • `doom-serif-font’ – for the `fixed-pitch-serif’ face

See ‘C-h v doom-font’ for documentation and more examples of what they accept. For example:

If you or Emacs can’t find your font, use ‘M-x describe-font’ to look them up, `M-x eval-region’ to execute elisp code, and ‘M-x doom/reload-font’ to refresh your font settings. If Emacs still can’t find your font, it likely wasn’t installed correctly. Font issues are rarely Doom issues!

(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 18 :weight `Regular)
      doom-variable-pitch-font (font-spec :family "FiraCode Nerd Font Med" :size 14))

UI

  (setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
  (setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling
  (setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse
  (setq scroll-step 1) ;; keyboard scroll one line at a time
;;  (setq use-dialog-box nil)) ;; Disable dialog boxes since they weren't working in Mac OSX
;; # Window frame startup size
(setq initial-frame-alist '((top . 1) (right . 1) (width . 114) (height . 46)))
;; # Frame Transparency
;; (set-frame-parameter nil 'alpha-background 70)
(add-to-list 'default-frame-alist '(alpha-background . 85))

Keymaps

(map! :ne "M-/" #'comment-or-uncomment-region)

(setq which-key-idle-delay 0.1)

Appearance

There are two ways to load a theme. Both assume the theme is installed and available. You can either set `doom-theme’ or manually load a theme with the `load-theme’ function. This is the default:

display-line-numbers-type determines the style of line numbers in effect. If set to `nil’, line numbers are disabled. For relative line numbers, set this to `relative’.

(setq doom-theme 'doom-old-hope)
(setq display-line-numbers-type 'relative)

(defun my-weebery-is-always-greater ()
  (let* ((banner '("░▒█▀▀▄░█▀▀▄░▒█▀▀▀█░▒█░▒█░▒█▀▀▄░▒█▀▀▀█░█▀▀▄░▒█▀▀▄░▒█▀▀▄"
                   "░▒█░▒█▒█▄▄█░░▀▀▀▄▄░▒█▀▀█░▒█▀▀▄░▒█░░▒█▒█▄▄█░▒█▄▄▀░▒█░▒█"
                   "░▒█▄▄█▒█░▒█░▒█▄▄▄█░▒█░▒█░▒█▄▄█░▒█▄▄▄█▒█░▒█░▒█░▒█░▒█▄▄█"))
         (longest-line (apply #'max (mapcar #'length banner))))
    (put-text-property
     (point)
     (dolist (line banner (point))
       (insert (+doom-dashboard--center
                +doom-dashboard--width
                (concat line (make-string (max 0 (- longest-line (length line))) 32)))
               "\n"))
     'face 'doom-dashboard-banner)))

(setq +doom-dashboard-ascii-banner-fn #'my-weebery-is-always-greater)

org-mode

If you use `org’ and don’t want your org files in the default location below, change `org-directory’. It must be set before org loads!

(setq default-directory "/mnt/d/notebooks/DemacsNotes/")

(setq org-directory "/mnt/d/notebooks/DemacsNotes/org")

Org Roam

(setq org-roam-directory "/mnt/d/notebooks/DemacsNotes/roam/")
;; (setq emacsql-sqlite-executable "/usr/bin/sqlite3")

Org Super Agenda

(use-package! org-super-agenda
  :after org-agenda
  :init
  (setq org-super-agenda-groups '((:name "Today"
                                        :time-grid t
                                        :scheduled today)
                                  (:name "Due today"
                                        :deadline today)
                                  (:name "Important"
                                        :priority "A")
                                  (:name "Overdue"
                                        :deadline past)
                                  (:name "Due soon"
                                        :deadline future)
                                  (:name "Big Outcomes"
                                        :tag "bo")))
  :config
  (org-super-agenda-mode))

Browser

this runs msedge on windows to open web links. adjust the path in “” to your preferred Browser

(setq browse-url-browser-function 'browse-url-generic       browse-url-generic-program "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe")

doomemacsconfig's People

Contributors

whiwobe avatar

Watchers

 avatar

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.