|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
* Bloxie's Emacs Configuration
|
|
|
|
|
* Bloxie's Emacs Configuration
|
|
|
|
|
** By Curt Spark / Bloxiebird.
|
|
|
|
|
|
|
|
|
|
* Introduction
|
|
|
|
|
@ -71,52 +71,6 @@ Install the package, enable it and ensure that it always is installed:
|
|
|
|
|
(modern-fringes-invert-arrows))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Theming
|
|
|
|
|
**** Pywal
|
|
|
|
|
+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package ewal
|
|
|
|
|
:init (setq
|
|
|
|
|
;; Always use built-in palettes:
|
|
|
|
|
ewal-use-built-in-always-p nil
|
|
|
|
|
|
|
|
|
|
;; Use built-in palettes if your pywal theme fails to load (otherwise you just get a black-and-white theme and something about color being nil):
|
|
|
|
|
ewal-use-built-in-on-failure-p t
|
|
|
|
|
|
|
|
|
|
;; Pick a built-in palette:
|
|
|
|
|
;; ewal-built-in-palette "sexy-material"
|
|
|
|
|
|
|
|
|
|
;; Use special cursor for insert state when evil insert bindings are disabled:
|
|
|
|
|
ewal-evil-cursors-obey-evil-p t
|
|
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
(use-package ewal-doom-themes
|
|
|
|
|
:ensure t
|
|
|
|
|
:config
|
|
|
|
|
;; Global settings (defaults)
|
|
|
|
|
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
|
|
|
|
doom-themes-enable-italic t)) ; if nil, italics is universally disabled
|
|
|
|
|
|
|
|
|
|
(load-theme 'ewal-doom-vibrant t)
|
|
|
|
|
|
|
|
|
|
;; Enable flashing mode-line on errors
|
|
|
|
|
(doom-themes-visual-bell-config)
|
|
|
|
|
|
|
|
|
|
;; Enable custom neotree theme (all-the-icons must be installed!)
|
|
|
|
|
(doom-themes-neotree-config)
|
|
|
|
|
;; or for treemacs users
|
|
|
|
|
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
|
|
|
|
|
(doom-themes-treemacs-config)
|
|
|
|
|
|
|
|
|
|
;; Corrects (and improves) org-mode's native fontification.
|
|
|
|
|
(doom-themes-org-config)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(use-package ewal-evil-cursors
|
|
|
|
|
:after (ewal-spacemacs-themes)
|
|
|
|
|
:config (ewal-evil-cursors-get-colors
|
|
|
|
|
:apply t :spaceline t))
|
|
|
|
|
+END_SRC
|
|
|
|
|
**** Classic
|
|
|
|
|
The theme for Emacs.
|
|
|
|
|
Install and set the theme, ensuring that it is always installed:
|
|
|
|
|
Old theme for if you'd like to follow Xresources
|
|
|
|
|
@ -127,9 +81,6 @@ Old theme for if you'd like to follow Xresources
|
|
|
|
|
(load-theme 'xresources t))
|
|
|
|
|
+END_SRC
|
|
|
|
|
|
|
|
|
|
*** Doom Themes
|
|
|
|
|
Themes from Doom Emacs
|
|
|
|
|
Install and set the theme, ensuring that it is always installed:
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package doom-themes
|
|
|
|
|
:ensure t
|
|
|
|
|
@ -144,10 +95,10 @@ Install and set the theme, ensuring that it is always installed:
|
|
|
|
|
(doom-themes-visual-bell-config)
|
|
|
|
|
|
|
|
|
|
;; Enable custom neotree theme (all-the-icons must be installed!)
|
|
|
|
|
;; (doom-themes-neotree-config)
|
|
|
|
|
(doom-themes-neotree-config)
|
|
|
|
|
;; or for treemacs users
|
|
|
|
|
;; (setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
|
|
|
|
|
;; (doom-themes-treemacs-config)
|
|
|
|
|
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
|
|
|
|
|
(doom-themes-treemacs-config)
|
|
|
|
|
|
|
|
|
|
;; Corrects (and improves) org-mode's native fontification.
|
|
|
|
|
(doom-themes-org-config)
|
|
|
|
|
@ -166,12 +117,6 @@ Install and set the modeline, ensuring that it is always installed:
|
|
|
|
|
;; Display the current time on the modeline
|
|
|
|
|
(display-time-mode 1)
|
|
|
|
|
|
|
|
|
|
;; Display time in the 24hr format
|
|
|
|
|
(setq display-time-24hr-format t)
|
|
|
|
|
|
|
|
|
|
;; Display also the date on the modeline
|
|
|
|
|
(setq display-time-day-and-date t)
|
|
|
|
|
|
|
|
|
|
;; Display the battery (if has one) on the modeline
|
|
|
|
|
(display-battery-mode 1)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
@ -208,9 +153,9 @@ Install the package, enable it and ensure that it always is installed:
|
|
|
|
|
**** Emacs Dashboard Configuration
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
;; Set the title
|
|
|
|
|
(setq dashboard-banner-logo-title "Welcome to Seaspark's Emacs!")
|
|
|
|
|
(setq dashboard-banner-logo-title "Welcome to Bloxie's Emacs!")
|
|
|
|
|
;; Set the banner
|
|
|
|
|
(setq dashboard-startup-banner '1)
|
|
|
|
|
(setq dashboard-startup-banner 'logo)
|
|
|
|
|
;; Value can be
|
|
|
|
|
;; 'official which displays the official emacs logo
|
|
|
|
|
;; 'logo which displays an alternative emacs logo
|
|
|
|
|
@ -261,42 +206,6 @@ Install the package, enable it and ensure that it always is installed:
|
|
|
|
|
("?" "" "?/h" #'show-help nil "<" ">"))
|
|
|
|
|
))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Performance
|
|
|
|
|
*** Gcmh Mode
|
|
|
|
|
Enforce a sneaky Garbage Collection strategy to minimize GC interference with
|
|
|
|
|
user activity.
|
|
|
|
|
|
|
|
|
|
During normal use a high GC threshold is set.
|
|
|
|
|
|
|
|
|
|
When idling GC is triggered and a low threshold is set.
|
|
|
|
|
|
|
|
|
|
This greatly improves performance/startup time of emacs.
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package gcmh
|
|
|
|
|
:ensure t
|
|
|
|
|
:config
|
|
|
|
|
(gcmh-mode 1))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Doom Modeline
|
|
|
|
|
Tweaks to doom modeline
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
|
|
|
|
|
;; Disable modeline word count as it causes lots of lag
|
|
|
|
|
(setq doom-modeline-enable-word-count nil)
|
|
|
|
|
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Custom
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
|
|
|
|
|
(setq auto-window-vscroll nil)
|
|
|
|
|
|
|
|
|
|
(setq fast-but-imprecise-scrolling t)
|
|
|
|
|
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
** Custom
|
|
|
|
|
*** Auto Popup frame Mode
|
|
|
|
|
A mode that is similiar in functionality to pop-up-frame, however much more granular in control and toggleable as it is mode. Will stop duplicate windows from creating new frames etc.
|
|
|
|
|
@ -425,7 +334,6 @@ it.
|
|
|
|
|
Install the package, enable it and ensure that it always is installed:
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package pdf-tools
|
|
|
|
|
:ensure t
|
|
|
|
|
:hook (pdf-tools-enabled . pdf-view-midnight-minor-mode)
|
|
|
|
|
;;:hook (pdf-tools-enabled . hide-mode-line-mode)
|
|
|
|
|
:init
|
|
|
|
|
@ -610,18 +518,6 @@ Install the package, enable it and ensure that it always is installed, and then
|
|
|
|
|
; Wrap around when suggestions reach bottom.
|
|
|
|
|
(setq company-selection-wrap-around t)
|
|
|
|
|
|
|
|
|
|
(dolist (key '("<return>" "RET"))
|
|
|
|
|
;; Here we are using an advanced feature of define-key that lets
|
|
|
|
|
;; us pass an "extended menu item" instead of an interactive
|
|
|
|
|
;; function. Doing this allows RET to regain its usual
|
|
|
|
|
;; functionality when the user has not explicitly interacted with
|
|
|
|
|
;; Company.
|
|
|
|
|
(define-key company-active-map (kbd key)
|
|
|
|
|
`(menu-item nil company-complete
|
|
|
|
|
:filter ,(lambda (cmd)
|
|
|
|
|
(when (company-explicit-action-p)
|
|
|
|
|
cmd)))))
|
|
|
|
|
|
|
|
|
|
; Use tab key to cycle through suggestions.
|
|
|
|
|
; ('tng' means 'tab and go')
|
|
|
|
|
(company-tng-configure-default)
|
|
|
|
|
@ -685,31 +581,12 @@ Install the package, enable it and ensure that it always is installed, and then
|
|
|
|
|
Rich Presence in Emacs for discord, `https://github.com/Mstrodl/elcord`
|
|
|
|
|
|
|
|
|
|
Install the package, enable it and ensure that it always is installed, and then enable the mode:
|
|
|
|
|
+BEGIN_SRC emacs-lisp
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package elcord
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(elcord-mode 1))
|
|
|
|
|
+END_SRC
|
|
|
|
|
** Nix Mode
|
|
|
|
|
An Emacs major mode for editing Nix expressions. There is also a manual available at nix-mode.org.
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package nix-mode
|
|
|
|
|
:ensure t
|
|
|
|
|
:mode "\\.nix\\'")
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
** LUA Mode
|
|
|
|
|
lua-mode is a major mode for editing Lua sources in Emacs.
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package lua-mode
|
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.iy\\'" . lua-mode))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
** LSP Mode
|
|
|
|
|
LSP mode will give you IDE capabilities in Emacs, using Microsoft's
|
|
|
|
|
Universal Language Server Protocol. The same one that VSCode uses for
|
|
|
|
|
@ -730,23 +607,20 @@ on how to install the Programming Language Servers that you want.
|
|
|
|
|
:commands lsp)
|
|
|
|
|
|
|
|
|
|
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
|
|
|
|
|
(setq lsp-keymap-prefix "C-l")
|
|
|
|
|
(setq lsp-keymap-prefix "s-l")
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
*** Configuration
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
;; optionally
|
|
|
|
|
(use-package lsp-ui
|
|
|
|
|
:commands lsp-ui-mode
|
|
|
|
|
(use-package lsp-ui :commands lsp-ui-mode
|
|
|
|
|
:ensure t)
|
|
|
|
|
(use-package company-lsp :commands company-lsp
|
|
|
|
|
:ensure t)
|
|
|
|
|
;; (use-package company-lsp
|
|
|
|
|
;; :commands company-lsp
|
|
|
|
|
;; :ensure t)
|
|
|
|
|
;; if you are helm user
|
|
|
|
|
;;(use-package helm-lsp :commands helm-lsp-workspace-symbol)
|
|
|
|
|
;; if you are ivy user
|
|
|
|
|
(use-package lsp-ivy
|
|
|
|
|
:commands lsp-ivy-workspace-symbol
|
|
|
|
|
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol
|
|
|
|
|
:ensure t)
|
|
|
|
|
;;(use-package lsp-treemacs :commands lsp-treemacs-errors-list
|
|
|
|
|
;; :ensure t)
|
|
|
|
|
@ -755,42 +629,8 @@ on how to install the Programming Language Servers that you want.
|
|
|
|
|
(use-package dap-mode
|
|
|
|
|
:ensure t)
|
|
|
|
|
;; (use-package dap-LANGUAGE) to load the dap adapter for your language
|
|
|
|
|
|
|
|
|
|
;; New luau lsp for roblox implementation
|
|
|
|
|
(with-eval-after-load 'lsp-mode
|
|
|
|
|
(add-to-list 'lsp-language-id-configuration
|
|
|
|
|
'(lua-mode . "luau"))
|
|
|
|
|
|
|
|
|
|
(lsp-register-client
|
|
|
|
|
(make-lsp-client :new-connection (lsp-stdio-connection "luau-lsp")
|
|
|
|
|
:activation-fn (lsp-activate-on "luau")
|
|
|
|
|
:server-id 'luau-lsp)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
** Edwina Dynamic Tiling
|
|
|
|
|
Edwina is a dynamic window manager for Emacs. It automatically arranges your Emacs panes (called “windows” in Emacs parlance) into predefined layouts, dwm-style.
|
|
|
|
|
|
|
|
|
|
Install the package, enable it and ensure that it always is installed, and then configure:
|
|
|
|
|
+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package edwina
|
|
|
|
|
:ensure t
|
|
|
|
|
:config
|
|
|
|
|
(setq display-buffer-base-action '(display-buffer-below-selected))
|
|
|
|
|
;;(edwina-setup-dwm-keys)
|
|
|
|
|
(edwina-mode 1))
|
|
|
|
|
+END_SRC
|
|
|
|
|
** Ranger
|
|
|
|
|
This is a minor mode that runs within dired, it emulates many of
|
|
|
|
|
ranger's (terminal file manager) features. This minor mode shows a
|
|
|
|
|
stack of parent directories, and updates the parent buffers, while
|
|
|
|
|
you're navigating the file system. The preview window takes some of
|
|
|
|
|
the ideas from Peep-Dired, to display previews for the selected files,
|
|
|
|
|
in the primary dired buffer.
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package ranger
|
|
|
|
|
:ensure t)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** EXWM
|
|
|
|
|
EXWM, The Emacs X Window Manager. As it says, it is an Emacs window
|
|
|
|
|
manager for the X display server. The benefits include using all your
|
|
|
|
|
@ -816,11 +656,6 @@ Install the package, enable it and ensure that it always is installed, and then
|
|
|
|
|
;; Mouse input/bindings
|
|
|
|
|
(require 'exwm-input)
|
|
|
|
|
|
|
|
|
|
;; EXWM Randr, makes sure that the screens automatically update with the proper resolutions
|
|
|
|
|
;; You may want to install a program such as arandr to graphically manage the screens and resolutions, you can export it into Xrandr commands
|
|
|
|
|
(require 'exwm-randr)
|
|
|
|
|
(exwm-randr-enable)
|
|
|
|
|
|
|
|
|
|
(defun exwm-switch-workspace-left ()
|
|
|
|
|
"Switch one workspace to the left"
|
|
|
|
|
(interactive)
|
|
|
|
|
@ -848,9 +683,7 @@ Install the package, enable it and ensure that it always is installed, and then
|
|
|
|
|
|
|
|
|
|
;; Keybindings
|
|
|
|
|
(setq exwm-input-global-keys
|
|
|
|
|
`(;; Standard EXWM Bindings
|
|
|
|
|
|
|
|
|
|
;; Reset EXWM
|
|
|
|
|
`(;; Reset EXWM
|
|
|
|
|
([?\s-r] . exwm-reset)
|
|
|
|
|
|
|
|
|
|
;; EXWM Workspace Switcher
|
|
|
|
|
@ -879,64 +712,12 @@ Install the package, enable it and ensure that it always is installed, and then
|
|
|
|
|
;; Swap current workspace with one workspace to the left
|
|
|
|
|
([?\s-L] . exwm-swap-workspace-right)
|
|
|
|
|
|
|
|
|
|
;; Bindings for Edwina
|
|
|
|
|
|
|
|
|
|
;; Select next window in stack
|
|
|
|
|
;;([?\s-n] . edwina-select-next-window)
|
|
|
|
|
|
|
|
|
|
;; Select previous window in stack
|
|
|
|
|
;;([?\s-p] . edwina-select-previous-window)
|
|
|
|
|
|
|
|
|
|
;; Swap current window with next window in stack
|
|
|
|
|
;; ([?\s-N] . edwina-swap-next-window)
|
|
|
|
|
|
|
|
|
|
;; Swap current window with previous window in stack
|
|
|
|
|
;;([?\s-P] . edwina-swap-previous-window)
|
|
|
|
|
|
|
|
|
|
;; Make a new window in the stack
|
|
|
|
|
;;([?\s-b] . (lambda ()
|
|
|
|
|
;; (interactive)
|
|
|
|
|
;; (edwina-clone-window)
|
|
|
|
|
;; (edwina-select-next-window)))
|
|
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;; Could not integrate these into the exwm global keys variable, for some reason they do not work in NIXOS
|
|
|
|
|
(exwm-input-set-key (kbd "s-SPC") 'counsel-linux-app)
|
|
|
|
|
|
|
|
|
|
;; (exwm-input-set-key (kbd "s-i") 'exwm-input-toggle-keyboard)
|
|
|
|
|
|
|
|
|
|
;; (exwm-input-set-key (kbd "s-h") 'exwm-switch-workspace-left)
|
|
|
|
|
|
|
|
|
|
;; (exwm-input-set-key (kbd "s-l") 'exwm-switch-workspace-right)
|
|
|
|
|
|
|
|
|
|
;; (exwm-input-set-key (kbd "s-H") 'exwm-swap-workspace-left)
|
|
|
|
|
|
|
|
|
|
;; (exwm-input-set-key (kbd "s-L") 'exwm-swap-workspace-right)
|
|
|
|
|
|
|
|
|
|
;; Edwina bindings
|
|
|
|
|
|
|
|
|
|
;; Increase master column size
|
|
|
|
|
;;(exwm-input-set-key (kbd "s-=") 'edwina-inc-mfact)
|
|
|
|
|
|
|
|
|
|
;; Increase master column size
|
|
|
|
|
;;(exwm-input-set-key (kbd "s--") 'edwina-dec-mfact)
|
|
|
|
|
|
|
|
|
|
;; Increase number of windows in master stack
|
|
|
|
|
;;(exwm-input-set-key (kbd "s-+") 'edwina-inc-nmaster)
|
|
|
|
|
|
|
|
|
|
;; Decrease number of windows in master stack
|
|
|
|
|
;;(exwm-input-set-key (kbd "s-_") 'edwina-dec-nmaster)
|
|
|
|
|
;; Application Launcher
|
|
|
|
|
([?\s-b] . counsel-linux-app)))
|
|
|
|
|
|
|
|
|
|
;; Set all X windows to open in char mode by default, allowing to pass through all key combinations
|
|
|
|
|
;;(add-hook 'exwm-manage-finish-hook
|
|
|
|
|
;; (lambda () (call-interactively #'exwm-input-release-keyboard)
|
|
|
|
|
;; ;;(exwm-layout-hide-mode-line)
|
|
|
|
|
;; ))
|
|
|
|
|
|
|
|
|
|
;; Set all X windows to open in line mode by default, allowing emacs to have control over keybinds first
|
|
|
|
|
(add-hook 'exwm-manage-finish-hook
|
|
|
|
|
(lambda () (call-interactively #'exwm-input-grab-keyboard)
|
|
|
|
|
(lambda () (call-interactively #'exwm-input-release-keyboard)
|
|
|
|
|
;;(exwm-layout-hide-mode-line)
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|