Lot of changes, ignoring previous commits format

This commit is contained in:
Mateusz Słodkowicz 2024-11-15 18:01:13 +01:00
parent 3d1cc80150
commit 9e97dc6f65
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
20 changed files with 1288 additions and 746 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
\#*\#
.vscode

View File

@ -1,6 +0,0 @@
{
"nixEnvSelector.suggestion": false,
"files.associations": {
"iostream": "cpp"
}
}

View File

@ -2,8 +2,8 @@
let
mainMirror = "https://ftp.icm.edu.pl/pub/Linux/dist/archlinux";
extraMirrors = [ ];
getty = [ 5 6 ];
ttys = [ 5 6 7 8 ] ++ getty;
getty = [ 6 7 ];
ttys = [ 6 7 8 ] ++ getty;
startPkgs = lib.strings.concatStringsSep " " [ "base" "base-devel" "dbus" "less" "nano" "bash-completion" ];
scripts = {
@ -28,6 +28,7 @@ let
systemd-machine-id-setup --root="/var/lib/machines/archlinux"
systemd-nspawn -q --settings=false --system-call-filter=@sandbox -D "/var/lib/machines/archlinux" /bin/sh -c "
export PATH=/bin
touch /etc/systemd/do-not-udevadm-trigger-on-update
pacman-key --init && pacman-key --populate
pacman -Rs --noconfirm arch-install-scripts
pacman -Sy --noconfirm --needed ${startPkgs}

View File

@ -53,6 +53,8 @@
lua
gtk4.dev
gtk4
glib
glib.dev
miniaudio
SDL2.dev
SDL2

View File

@ -111,7 +111,7 @@
binutils
qbittorrent
materusArg.unstable.qbittorrent
mkvtoolnix
nicotine-plus
picard

View File

@ -7,8 +7,8 @@
};
environment.variables = {
JAVA_8_HOME = pkgs.jdk8;
JAVA_17_HOME = pkgs.jdk17;
JAVA_21_HOME = pkgs.jdk21;
JAVA_8_HOME = "${pkgs.jdk8}/lib/openjdk/";
JAVA_17_HOME = "${pkgs.jdk17}/lib/openjdk/";
JAVA_21_HOME = "${pkgs.jdk21}/lib/openjdk/";
};
}

View File

@ -22,6 +22,6 @@ users.users.materus = {
shell = pkgs.zsh;
description = "Mateusz Słodkowicz";
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
hashedPasswordFile = config.sops.secrets."users/materus".path;
#hashedPasswordFile = config.sops.secrets."users/materus".path;
};
}

View File

@ -10,7 +10,7 @@
sops.gnupg.sshKeyPaths = [ ];
sops.age.sshKeyPaths = [ "/materus/root/ssh_host_ed25519_key" ];
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
sops.secrets."users/materus" = { neededForUsers = true; };
#sops.secrets."users/materus" = { neededForUsers = true; };
sops.secrets.wireguard = { };
services.openssh.hostKeys = [

View File

@ -111,6 +111,11 @@ let
"[cpp]" = {
"editor.defaultFormatter" = lib.mkDefault "xaver.clang-format";
};
"cmake.showOptionsMovedNotification" = false;
"cmake.pinnedCommands" = [
"workbench.action.tasks.configureTaskRunner"
"workbench.action.tasks.runTask"
];
};
in {

View File

@ -17,24 +17,120 @@ let
};
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/";
inits = import ./init.nix {
path = configPath;
inherit pkgs;
};
packages = epkgs:
with epkgs; [
(materus-config epkgs)
treesit-grammars.with-all-grammars
];
default-config = ''
${setNixInit}
${inits.initText}
'';
use-package
elcord
persp-mode
dashboard
magit
git-timemachine
avy
vterm
direnv
projectile
clipetty
which-key
iedit
hideshowvis
evil
treemacs-evil
treemacs
treemacs-nerd-icons
treemacs-perspective
treemacs-icons-dired
treemacs-magit
treemacs-projectile
tree-edit
nerd-icons
nerd-icons-completion
perspective
minions
rainbow-delimiters
rainbow-mode
cmake-mode
lsp-mode
lsp-java
lsp-jedi
lsp-haskell
lsp-ui
lsp-treemacs
dap-mode
flycheck
gradle-mode
groovy-mode
kotlin-mode
d-mode
lua-mode
multiple-cursors
org
org-contrib
org-ql
org-rainbow-tags
org-roam
org-roam-ui
org-review
org-present
org-superstar
org-auto-tangle
visual-fill-column
csharp-mode
markdown-mode
json-mode
nix-mode
no-littering
right-click-context
dracula-theme
doom-themes
doom-modeline
popper
undo-tree
bash-completion
eldoc-box
yasnippet
async
request
nix-ts-mode
markdown-ts-mode
llvm-ts-mode
treesit-fold
treesit-auto
tree-sitter-langs
eat
vlf
edit-indirect
zones
sudo-edit
toc-org
empv
volatile-highlights
highlight
elfeed
elfeed-goodies
drag-stuff
dirvish
rg
# Completions & Minibuffer
corfu
company
company-quickhelp
cape
embark
embark-consult
orderless
vertico
marginalia
];
emacsEnv = pkgs.buildEnv {
name = "emacs-env";
paths = with pkgs; [
ripgrep
cmake
gnumake
nixfmt-classic
python3
lua
@ -48,6 +144,8 @@ let
gdb
nixd
jdt-language-server
jdk
gradle
omnisharp-roslyn
];
};
@ -56,6 +154,7 @@ let
setNixInit = ''
(setenv "PATH" (concat (getenv "PATH") ":${emacsEnv}/bin"))
(setenv "LD_LIBRARY_PATH" (concat (getenv "LD_LIBRARY_PATH") ":${emacsEnv}/lib"))
(setq exec-path (append exec-path '("${emacsEnv}/bin")))
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 148 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
@ -65,26 +164,28 @@ in {
materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
config = lib.mkIf cfg.enable {
home.activation.emacsCompile = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
home.activation.emacsSetup = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
mkdir -p ${config.xdg.configHome}/emacs/var/recovery
mkdir -p ${config.xdg.configHome}/emacs/etc
mkdir -p ${config.xdg.configHome}/emacs/etc/materus
mkdir -p ${config.xdg.configHome}/emacs/var/backups
run ${config.programs.emacs.finalPackage}/bin/emacs --batch \
${pkgs.rsync}/bin/rsync -zr --no-times --chmod=744 "${configPath}" "${config.xdg.configHome}/emacs"
run ${config.programs.emacs.finalPackage}/bin/emacs -Q --batch \
--eval '(setq warning-minimum-log-level :error)' \
--eval '(setq package-user-dir (concat user-emacs-directory "var/elpa/" emacs-version "/" ))' \
--eval '(setq package-gnupghome-dir (concat user-emacs-directory "var/elpa/gnupg/" ))' \
--eval '(package-initialize)' \
--eval '(byte-recompile-directory (concat user-emacs-directory "etc/materus/extra") 0 t)' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/etc/materus/emacs-config.el")' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")'
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/nix-init.el")' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/etc/materus/emacs-config.el")'
'';
xdg.configFile = {
"emacs/early-init.el".text = inits.earlyInitText;
"emacs/init.el".text = default-config;
"emacs/etc/materus" = {
source = configPath + "etc/materus";
recursive = true;
};
};
xdg.configFile = { "emacs/nix-init.el".text = setNixInit; };
#Emacsclient with COLORTERM env variable, without it display in "-nw" client is broken
xdg.desktopEntries.emacs = {
name = "Emacs";
genericName = "Edytor tekstu";
@ -128,18 +229,31 @@ in {
withSQLite3 = true;
withWebP = true;
withX = true;
#withXwidgets = true;
withGTK3 = true;
withAlsaLib = true;
withGconf = true;
withImageMagick = true;
}).overrideAttrs (f: p: {
#Remove .desktop files, will use my own. Add file with buildtime in case of using elpaca
postInstall = p.postInstall + ''
rm -fr $out/share/applications/*
mkdir -p $out/opt/emacs
date +%s | tr -d '\n' > $out/opt/emacs/buildtime
'';
}));
extraPackages = epkgs: (packages epkgs);
extraPackages = epkgs:
(packages (epkgs.overrideScope (ff: pp: {
#Build lsp-mode with plist support, need to set this in emacs too
lsp-mode = (pp.lsp-mode.overrideAttrs (f: p: { buildPhase = "export LSP_USE_PLISTS=true\n" + p.buildPhase;}));
lsp-java = (pp.lsp-java.overrideAttrs (f: p: { buildPhase = "export LSP_USE_PLISTS=true\n" + p.buildPhase;}));
lsp-jedi= (pp.lsp-jedi.overrideAttrs (f: p: { buildPhase = "export LSP_USE_PLISTS=true\n" + p.buildPhase;}));
lsp-haskell = (pp.lsp-haskell.overrideAttrs (f: p: { buildPhase = "export LSP_USE_PLISTS=true\n" + p.buildPhase;}));
lsp-ui = (pp.lsp-ui.overrideAttrs (f: p: { buildPhase = "export LSP_USE_PLISTS=true\n" + p.buildPhase;}));
lsp-treemacs = (pp.lsp-treemacs.overrideAttrs (f: p: { buildPhase = "export LSP_USE_PLISTS=true\n" + p.buildPhase;}));
dap-mode = (pp.dap-mode.overrideAttrs (f: p: { buildPhase = "export LSP_USE_PLISTS=true\n" + p.buildPhase;}));
})));
};
};

View File

@ -1,13 +0,0 @@
{ path, pkgs }:
{
earlyInitText = ''
${builtins.readFile (path + "early-init.el")}
'';
initText = ''
${builtins.readFile (path + "init.el")}
'';
}

View File

@ -9,11 +9,17 @@ in
config = lib.mkIf cfg.enable {
programs.bash = {
enable = true;
enableCompletion = lib.mkDefault true;
enableVteIntegration = lib.mkDefault true;
historyControl = lib.mkDefault [ "erasedups" "ignorespace" ];
shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ];
initExtra = ''
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
source "$EAT_SHELL_INTEGRATION_DIR/bash";
fi
'';
};
};

View File

@ -85,6 +85,11 @@ in
${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"}
'';
initExtraFirst = ''
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
source "$EAT_SHELL_INTEGRATION_DIR/zsh";
fi
${makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
@ -167,6 +172,8 @@ in
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "ee"="emacsclient -n -r --alternate-editor= "''}
'' +
makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then

View File

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
imports = [
./nix.nix
./fonts.nix
@ -18,12 +17,17 @@
font = lib.mkDefault "LatArCyrHeb-16";
keyMap = lib.mkDefault "pl";
};
environment.sessionVariables = {
MATERUS_CONFIG_DIR = lib.mkDefault "/etc/nixos/";
};
programs.tmux = {
enable = lib.mkDefault true;
clock24 = lib.mkDefault true;
};
environment.systemPackages = lib.mkIf config.programs.tmux.enable [ pkgs.tmux.terminfo ];
environment.systemPackages =
lib.mkIf config.programs.tmux.enable [ pkgs.tmux.terminfo ];
}

View File

@ -1,15 +1,22 @@
;;; -*- lexical-binding: t; -*-
(defvar materus/init-early t) ; Var to ensure early-init loaded
(setq materus/init-early t) ; Probably useless
(setenv "LSP_USE_PLISTS" "true")
(setq initial-major-mode 'fundamental-mode)
(setq native-comp-async-report-warnings-errors nil)
(setq package-enable-at-startup nil)
(unless (daemonp)
(add-to-list 'initial-frame-alist '(fullscreen . maximized)))
(setq default-frame-alist
'((width . 130)
(height . 40)))
(setq native-comp-speed 3)
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
(setq gc-cons-threshold 100000000 ; ~100mb
gc-cons-percentage 0.1)
))
))
(unless (daemonp)
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6)
@ -20,7 +27,7 @@
(tty-run-terminal-initialization (selected-frame) nil t)
)
)
)
)
(when (boundp 'native-comp-eln-load-path) ; Change dir for eln-cache
(startup-redirect-eln-cache (expand-file-name "/var/eln-cache/" user-emacs-directory)))

View File

@ -9,7 +9,7 @@ My emacs config, tangled file is [[file:etc/materus/emacs-config.el][there]]
- [[#init-files][Init Files]]
- [[#early-init][Early Init]]
- [[#init][Init]]
- [[#byte-compile][Byte compile]]
- [[#compile-time][Compile Time]]
- [[#packages][Packages]]
- [[#init-1][Init]]
- [[#packages-1][Packages]]
@ -23,13 +23,15 @@ My emacs config, tangled file is [[file:etc/materus/emacs-config.el][there]]
- [[#org-mode][Org-mode]]
- [[#completions][Completions]]
- [[#minibuffer][Minibuffer]]
- [[#company][Company]]
- [[#code-completion][Code completion]]
- [[#miscellaneous][Miscellaneous]]
- [[#defaults][Defaults]]
- [[#elcord][Elcord]]
- [[#undo-tree][Undo-Tree]]
- [[#projectile][Projectile]]
- [[#treemacs][Treemacs]]
- [[#magit][Magit]]
- [[#dirvish][Dirvish]]
- [[#programming][Programming]]
- [[#lsp][LSP]]
- [[#nix][Nix]]
@ -37,6 +39,11 @@ My emacs config, tangled file is [[file:etc/materus/emacs-config.el][there]]
- [[#cc][C/C++]]
- [[#java][Java]]
- [[#keybindings][Keybindings]]
- [[#snippets][Snippets]]
- [[#yasnippet-init][Yasnippet init]]
- [[#other][Other]]
- [[#update-config-script][Update config script]]
- [[#byte-compile][Byte compile]]
- [[#test][Test]]
* Init Files
@ -46,12 +53,19 @@ My emacs config, tangled file is [[file:etc/materus/emacs-config.el][there]]
:END:
Early init file, setting for GC and some paths.
#+begin_src emacs-lisp
;;; -*- lexical-binding: t; -*-
(defvar materus/init-early t) ; Var to ensure early-init loaded
(setq materus/init-early t) ; Probably useless
(setenv "LSP_USE_PLISTS" "true")
(setq initial-major-mode 'fundamental-mode)
(setq native-comp-async-report-warnings-errors nil)
(setq package-enable-at-startup nil)
(unless (daemonp)
(add-to-list 'initial-frame-alist '(fullscreen . maximized)))
(setq default-frame-alist
'((width . 130)
(height . 40)))
(setq native-comp-speed 3)
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
@ -96,27 +110,29 @@ Early init file, setting for GC and some paths.
Init File
Checking if using emacs from my nix config (not used anymore, might use in future), loads config and custom.el
#+begin_src emacs-lisp
;;; -*- lexical-binding: t; -*-
(setq-default materus/use-nix-packages (require 'materus-config nil 'noerror))
(cua-mode 0) ; To load cua variables/functions but not set it up yet
(unless (file-directory-p (concat user-emacs-directory "var/quickstart"))
(make-directory (concat user-emacs-directory "var/quickstart") t))
(load (concat user-emacs-directory "nix-init") t)
(load (concat user-emacs-directory "etc/materus/emacs-config"))
(when (file-exists-p custom-file)
(load custom-file))
(load custom-file t)
#+end_src
** Byte compile
Byte compile files if not already.
** Compile Time
#+begin_src emacs-lisp
(unless (file-exists-p (concat user-emacs-directory "etc/materus/emacs-config.elc"))
(byte-compile-file (concat user-emacs-directory "etc/materus/emacs-config.el")))
(unless (file-exists-p (concat user-emacs-directory "init.elc"))
(byte-compile-file (concat user-emacs-directory "init.el")))
(unless (file-exists-p (concat user-emacs-directory "early-init.elc"))
(byte-compile-file (concat user-emacs-directory "early-init.el")))
;;; -*- lexical-binding: t; -*-
(eval-when-compile
(defvar doom-modeline-support-imenu nil)
(defvar display-time-24hr-format nil)
(defvar lsp-nix-nixd-formatting-command nil)
(defvar cua--cua-keys-keymap nil)
(declare-function lsp-stdio-connection "lsp-mode" (COMMAND &optional TEST-COMMAND))
(declare-function make-lsp-client "lsp-mode")
(declare-function lsp-register-client "lsp-mode" ( CLIENT ))
)
#+end_src
* Packages
Package manager config. Nix not used for portability and easier control.
Package manager config if not using nix.
After some testing default package manager works best for me.
** Init
#+begin_src emacs-lisp
@ -124,9 +140,14 @@ After some testing default package manager works best for me.
(require 'package)
(setq package-user-dir (concat user-emacs-directory "var/elpa/" emacs-version "/" ))
(setq package-gnupghome-dir (concat user-emacs-directory "var/elpa/gnupg/" ))
(setq package-quickstart t)
(setq package-quickstart-file
(concat user-emacs-directory "var/quickstart/package-quickstart-" emacs-version ".el" ))
(add-to-list 'load-path (concat user-emacs-directory "etc/materus/extra"))
(add-to-list 'package-archives '("nongnu-devel" . "https://elpa.nongnu.org/nongnu-devel/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
#+end_src
** Packages
@ -141,10 +162,9 @@ Packages to install
magit
git-timemachine
avy
corfu
vterm
direnv
projectile
company
clipetty
which-key
iedit
@ -158,13 +178,10 @@ Packages to install
treemacs-magit
treemacs-projectile
tree-edit
vertico
marginalia
nerd-icons
nerd-icons-completion
perspective
minions
doom-modeline
rainbow-delimiters
rainbow-mode
cmake-mode
@ -174,6 +191,7 @@ Packages to install
lsp-haskell
lsp-ui
lsp-treemacs
flycheck
gradle-mode
groovy-mode
kotlin-mode
@ -188,6 +206,7 @@ Packages to install
org-roam
org-roam-ui
org-review
org-present
org-superstar
org-auto-tangle
visual-fill-column
@ -200,11 +219,9 @@ Packages to install
dracula-theme
doom-themes
doom-modeline
orderless
popper
undo-tree
bash-completion
consult
eldoc-box
yasnippet
async
@ -221,13 +238,24 @@ Packages to install
zones
sudo-edit
toc-org
eshell-vterm
empv
volatile-highlights
highlight
elfeed
elfeed-goodies
drag-stuff
dirvish
rg
;; Completions & Minibuffer
corfu
company
company-quickhelp
cape
embark
embark-consult
orderless
vertico
marginalia
)
"A list of packages to ensure are installed at launch.")
@ -241,8 +269,12 @@ Packages to install
(package-refresh-contents)
(dolist (p materus/packages)
(when (not (package-installed-p p))
(package-install p)))))
(package-install p)))
(package-quickstart-refresh)))
(unless materus/use-nix-packages
(package-initialize)
(materus/install-packages)
(unless (file-exists-p package-quickstart-file) (package-quickstart-refresh) ))
#+end_src
* Configuration
@ -253,6 +285,8 @@ Set up no littering
(require 'recentf)
(use-package no-littering
:config
(setq package-quickstart-file
(concat user-emacs-directory "var/quickstart/package-quickstart-" emacs-version ".el" ))
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-var-directory))
(add-to-list 'recentf-exclude
@ -272,6 +306,12 @@ Graphical related settings.
#+end_src
*** Misc
#+begin_src emacs-lisp
(when (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame) (when (= (length (frame-list)) 2)
(set-frame-parameter frame 'fullscreen 'maximized)))))
(setq frame-inhibit-implied-resize t)
(setq frame-resize-pixelwise t)
(setq window-resize-pixelwise t)
@ -279,7 +319,7 @@ Graphical related settings.
(set-frame-font "Hack Nerd Font" nil t)
)
(setq-default display-line-numbers-width 4)
(setq-default display-line-numbers-width 3)
(global-tab-line-mode 1)
@ -307,6 +347,11 @@ Graphical related settings.
)
;; Nerd Icons
(use-package nerd-icons)
(use-package nerd-icons-completion
:after (marginalia)
:config
(nerd-icons-completion-mode 1)
(add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup))
;; Theme
(use-package dracula-theme :config
@ -324,11 +369,17 @@ Graphical related settings.
*** Dashboard
#+begin_src emacs-lisp
(use-package dashboard
:after (nerd-icons)
:after (nerd-icons projectile)
:config
(setq dashboard-center-content t)
(setq dashboard-display-icons-p t)
(setq dashboard-icon-type 'nerd-icons)
(setq dashboard-projects-backend 'projectile)
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
(agenda . 5)
(registers . 5)))
(dashboard-setup-startup-hook)
(when (daemonp)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
@ -342,8 +393,14 @@ Graphical related settings.
:hook (after-init . doom-modeline-mode)
:config
(setq doom-modeline-icon t)
(setq display-time-24hr-format t)'
(display-time-mode 1))
(setq doom-modeline-project-detection 'auto)
(setq doom-modeline-height 20)
(setq doom-modeline-enable-word-count t)
(setq doom-modeline-minor-modes t)
(setq display-time-24hr-format t)
(display-time-mode 1)
(column-number-mode 1)
(line-number-mode 1))
(use-package minions
:hook (after-init . minions-mode))
@ -355,13 +412,18 @@ Org mode settings
:mode (("\\.org$" . org-mode))
:hook
((org-mode . org-indent-mode)
(org-mode . (lambda ()
(setq-local electric-pair-inhibit-predicate
`(lambda (c)
(if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))))
(org-mode . display-line-numbers-mode)
)
:config
(require 'org-mouse)
(require 'org-tempo))
(require 'org-tempo)
(add-hook 'org-mode-hook (lambda ()
(setq-local
electric-pair-inhibit-predicate
`(lambda (c)
(if
(char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))))
(use-package org-superstar
:after (org)
:hook
@ -400,15 +462,21 @@ Org mode settings
args)))
(vertico-mode 1)
(marginalia-mode 1))
(use-package vertico-mouse
:config
(vertico-mouse-mode 1))
#+end_src
*** Company
*** Code completion
#+begin_src emacs-lisp
(use-package company
:init (global-company-mode 1))
:config
(setq global-corfu-minibuffer nil)
(global-company-mode 1))
#+end_src
#+end_src
** Miscellaneous
Other configs
*** Defaults
@ -416,7 +484,7 @@ Other configs
(electric-pair-mode 1)
(electric-indent-mode -1)
(setq-default indent-tabs-mode nil)
(setq-default buffer-file-coding-system 'utf-8-dos)
(setq-default buffer-file-coding-system 'utf-8-unix)
#+end_src
*** Elcord
#+begin_src emacs-lisp
@ -427,8 +495,8 @@ Other configs
(elcord-mode -1))
)
(use-package elcord
:init (unless (daemonp) (elcord-mode 1))
:config
(unless (daemonp) (elcord-mode 1))
(add-hook 'after-delete-frame-functions 'materus/elcord-toggle)
(add-hook 'server-after-make-frame-hook 'materus/elcord-toggle))
#+end_src
@ -436,8 +504,8 @@ Other configs
#+begin_src emacs-lisp
(use-package undo-tree
:init (global-undo-tree-mode 1)
:config
(global-undo-tree-mode 1)
(defvar materus/undo-tree-dir (concat user-emacs-directory "var/undo-tree/"))
(unless (file-exists-p materus/undo-tree-dir)
(make-directory materus/undo-tree-dir t))
@ -448,16 +516,33 @@ Other configs
#+end_src
*** Projectile
#+begin_src emacs-lisp
(use-package projectile)
(use-package projectile
:config (projectile-mode 1))
#+end_src
*** Treemacs
#+begin_src emacs-lisp
(use-package treemacs)
(use-package treemacs-projectile
:after (projectile treemacs))
(use-package treemacs-nerd-icons
:after (nerd-icons treemacs))
(use-package treemacs)
(use-package treemacs-projectile
:after (projectile treemacs))
(use-package treemacs-nerd-icons
:after (nerd-icons treemacs))
#+end_src
*** Magit
#+begin_src emacs-lisp
(use-package magit)
#+end_src
*** Dirvish
#+begin_src emacs-lisp
(use-package dirvish
:config (dirvish-override-dired-mode 1)
(setq dirvish-attributes
'(vc-state
subtree-state
nerd-icons
collapse
git-msg
file-time
file-size)))
#+end_src
* Programming
@ -465,6 +550,8 @@ Other configs
#+begin_src emacs-lisp
(use-package lsp-mode)
(use-package lsp-ui)
(use-package dap-mode)
(use-package dap-lldb)
@ -495,7 +582,7 @@ Other configs
(not (functionp 'json-rpc-connection)) ;; native json-rpc
(executable-find "emacs-lsp-booster"))
(progn
(when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH)
(when-let* ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH)
(setcar orig-result command-from-exec-path))
(message "Using emacs-lsp-booster for %s!" orig-result)
(cons "emacs-lsp-booster" orig-result))
@ -503,7 +590,7 @@ Other configs
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
#+end_src
@ -523,7 +610,6 @@ Other configs
** Emacs Lisp
#+begin_src emacs-lisp
(add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode)
(add-hook 'emacs-lisp-mode-hook 'company-mode)
#+end_src
** C/C++
#+begin_src emacs-lisp
@ -535,11 +621,17 @@ Other configs
#+end_src
** Java
#+begin_src emacs-lisp
(use-package lsp-java
:config
(add-hook 'java-mode-hook (lambda () (when (getenv "JDTLS_PATH") (setq lsp-java-server-install-dir (getenv "JDTLS_PATH")))))
(add-hook 'java-mode-hook 'lsp-deferred)
(add-hook 'java-mode-hook 'display-line-numbers-mode))
#+end_src
* Keybindings
#+begin_src emacs-lisp
(use-package cua-base)
;; Keybinds
(keymap-set cua--cua-keys-keymap "C-z" 'undo-tree-undo)
@ -556,6 +648,48 @@ Other configs
(cua-mode 1)
#+end_src
* Snippets
** Yasnippet init
#+begin_src emacs-lisp
(use-package yasnippet
:config (yas-global-mode 1))
#+end_src
* Other
** Update config script
#+begin_src emacs-lisp
(defun materus/sync-config ()
"Function to sync config from MATERUS_CONFIG_DIR to emacs folder"
(if (getenv "MATERUS_CONFIG_DIR")
(progn (copy-directory (concat (getenv "MATERUS_CONFIG_DIR") "extraFiles/config/emacs/")
user-emacs-directory t t t) t)
(progn (message "Can't use if MATERUS_CONFIG_DIR is not set!") nil)))
(defun materus/compare-file-time (file1 file2)
"Returns t when file1 is newer than file2"
(time-less-p
(nth 5 (file-attributes file2))
(nth 5 (file-attributes file1))
))
(defun materus/compile-if-needed (file)
(unless (and (file-exists-p (concat user-emacs-directory file "c"))
(materus/compare-file-time (concat user-emacs-directory file "c")
(concat user-emacs-directory file)))
(byte-compile-file (concat user-emacs-directory file)))
)
(defun materus/compile-config-if-needed ()
(materus/compile-if-needed "early-init.el")
(materus/compile-if-needed "init.el")
(materus/compile-if-needed "etc/materus/emacs-config.el"))
(defun materus/update-config ()
"Will sync and compile config"
(interactive)
(when (materus/sync-config) (materus/compile-config-if-needed) (byte-recompile-directory (concat user-emacs-directory "etc/materus/extra") 0 t)))
#+end_src
** Byte compile
Byte compile files.
#+begin_src emacs-lisp
(materus/compile-config-if-needed)
#+end_src
* Test
Just for testing some code
#+begin_src emacs-lisp

View File

@ -1,19 +1,25 @@
(unless (file-exists-p (concat user-emacs-directory "etc/materus/emacs-config.elc"))
(byte-compile-file (concat user-emacs-directory "etc/materus/emacs-config.el")))
(unless (file-exists-p (concat user-emacs-directory "init.elc"))
(byte-compile-file (concat user-emacs-directory "init.el")))
(unless (file-exists-p (concat user-emacs-directory "early-init.elc"))
(byte-compile-file (concat user-emacs-directory "early-init.el")))
;;; -*- lexical-binding: t; -*-
(eval-when-compile
(defvar doom-modeline-support-imenu nil)
(defvar display-time-24hr-format nil)
(defvar lsp-nix-nixd-formatting-command nil)
(defvar cua--cua-keys-keymap nil)
(declare-function lsp-stdio-connection "lsp-mode" (COMMAND &optional TEST-COMMAND))
(declare-function make-lsp-client "lsp-mode")
(declare-function lsp-register-client "lsp-mode" ( CLIENT ))
)
(require 'cl-lib)
(require 'package)
(setq package-user-dir (concat user-emacs-directory "var/elpa/" emacs-version "/" ))
(setq package-gnupghome-dir (concat user-emacs-directory "var/elpa/gnupg/" ))
(setq package-quickstart t)
(setq package-quickstart-file
(concat user-emacs-directory "var/quickstart/package-quickstart-" emacs-version ".el" ))
(add-to-list 'load-path (concat user-emacs-directory "etc/materus/extra"))
(add-to-list 'package-archives '("nongnu-devel" . "https://elpa.nongnu.org/nongnu-devel/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(defvar materus/packages
'(
@ -24,10 +30,9 @@
magit
git-timemachine
avy
corfu
vterm
direnv
projectile
company
clipetty
which-key
iedit
@ -41,13 +46,10 @@
treemacs-magit
treemacs-projectile
tree-edit
vertico
marginalia
nerd-icons
nerd-icons-completion
perspective
minions
doom-modeline
rainbow-delimiters
rainbow-mode
cmake-mode
@ -57,6 +59,7 @@
lsp-haskell
lsp-ui
lsp-treemacs
flycheck
gradle-mode
groovy-mode
kotlin-mode
@ -71,6 +74,7 @@
org-roam
org-roam-ui
org-review
org-present
org-superstar
org-auto-tangle
visual-fill-column
@ -83,11 +87,9 @@
dracula-theme
doom-themes
doom-modeline
orderless
popper
undo-tree
bash-completion
consult
eldoc-box
yasnippet
async
@ -104,13 +106,24 @@
zones
sudo-edit
toc-org
eshell-vterm
empv
volatile-highlights
highlight
elfeed
elfeed-goodies
drag-stuff
dirvish
rg
;; Completions & Minibuffer
corfu
company
company-quickhelp
cape
embark
embark-consult
orderless
vertico
marginalia
)
"A list of packages to ensure are installed at launch.")
@ -124,12 +137,18 @@
(package-refresh-contents)
(dolist (p materus/packages)
(when (not (package-installed-p p))
(package-install p)))))
(materus/install-packages)
(package-install p)))
(package-quickstart-refresh)))
(unless materus/use-nix-packages
(package-initialize)
(materus/install-packages)
(unless (file-exists-p package-quickstart-file) (package-quickstart-refresh) ))
(require 'recentf)
(use-package no-littering
:config
(setq package-quickstart-file
(concat user-emacs-directory "var/quickstart/package-quickstart-" emacs-version ".el" ))
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-var-directory))
(add-to-list 'recentf-exclude
@ -143,6 +162,11 @@
(pixel-scroll-precision-mode 1)
(setq-default pixel-scroll-precision-large-scroll-height 10.0)
(when (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame) (when (= (length (frame-list)) 2)
(set-frame-parameter frame 'fullscreen 'maximized)))))
(setq frame-inhibit-implied-resize t)
(setq frame-resize-pixelwise t)
(setq window-resize-pixelwise t)
@ -150,7 +174,7 @@
(set-frame-font "Hack Nerd Font" nil t)
)
(setq-default display-line-numbers-width 4)
(setq-default display-line-numbers-width 3)
(global-tab-line-mode 1)
@ -178,6 +202,11 @@
)
;; Nerd Icons
(use-package nerd-icons)
(use-package nerd-icons-completion
:after (marginalia)
:config
(nerd-icons-completion-mode 1)
(add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup))
;; Theme
(use-package dracula-theme :config
@ -193,11 +222,17 @@
(advice-add 'display-startup-screen :around #'startup-screen-advice) ; Hide startup screen if started with file
(use-package dashboard
:after (nerd-icons)
:config
:after (nerd-icons projectile)
:config
(setq dashboard-center-content t)
(setq dashboard-display-icons-p t)
(setq dashboard-icon-type 'nerd-icons)
(setq dashboard-projects-backend 'projectile)
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
(agenda . 5)
(registers . 5)))
(dashboard-setup-startup-hook)
(when (daemonp)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
@ -209,8 +244,14 @@
:hook (after-init . doom-modeline-mode)
:config
(setq doom-modeline-icon t)
(setq display-time-24hr-format t)'
(display-time-mode 1))
(setq doom-modeline-project-detection 'auto)
(setq doom-modeline-height 20)
(setq doom-modeline-enable-word-count t)
(setq doom-modeline-minor-modes t)
(setq display-time-24hr-format t)
(display-time-mode 1)
(column-number-mode 1)
(line-number-mode 1))
(use-package minions
:hook (after-init . minions-mode))
@ -219,19 +260,24 @@
:mode (("\\.org$" . org-mode))
:hook
((org-mode . org-indent-mode)
(org-mode . (lambda ()
(setq-local electric-pair-inhibit-predicate
`(lambda (c)
(if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))))
(org-mode . display-line-numbers-mode)
)
:config
(require 'org-mouse)
(require 'org-tempo))
(require 'org-tempo)
(add-hook 'org-mode-hook (lambda ()
(setq-local
electric-pair-inhibit-predicate
`(lambda (c)
(if
(char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))))
(use-package org-superstar
:after (org)
:hook
(org-mode . org-superstar-mode))
:config
(setq org-superstar-leading-bullet " ")
:config
(setq org-superstar-leading-bullet " ")
(use-package org-auto-tangle
:after (org)
:hook (org-mode . org-auto-tangle-mode))
@ -260,14 +306,19 @@
args)))
(vertico-mode 1)
(marginalia-mode 1))
(use-package vertico-mouse
:config
(vertico-mouse-mode 1))
(use-package company
:init (global-company-mode 1))
:config
(setq global-corfu-minibuffer nil)
(global-company-mode 1))
(electric-pair-mode 1)
(electric-indent-mode -1)
(setq-default indent-tabs-mode nil)
(setq-default buffer-file-coding-system 'utf-8-dos)
(setq-default buffer-file-coding-system 'utf-8-unix)
(defun materus/elcord-toggle (&optional _frame)
"Toggle elcord based on visible frames"
@ -276,14 +327,14 @@
(elcord-mode -1))
)
(use-package elcord
:init (unless (daemonp) (elcord-mode 1))
:config
(unless (daemonp) (elcord-mode 1))
(add-hook 'after-delete-frame-functions 'materus/elcord-toggle)
(add-hook 'server-after-make-frame-hook 'materus/elcord-toggle))
(use-package undo-tree
:init (global-undo-tree-mode 1)
:config
(global-undo-tree-mode 1)
(defvar materus/undo-tree-dir (concat user-emacs-directory "var/undo-tree/"))
(unless (file-exists-p materus/undo-tree-dir)
(make-directory materus/undo-tree-dir t))
@ -292,7 +343,8 @@
(setq undo-tree-visualizer-timestamps t)
)
(use-package projectile)
(use-package projectile
:config (projectile-mode 1))
(use-package treemacs)
(use-package treemacs-projectile
@ -300,7 +352,22 @@
(use-package treemacs-nerd-icons
:after (nerd-icons treemacs))
(use-package magit)
(use-package dirvish
:config (dirvish-override-dired-mode 1)
(setq dirvish-attributes
'(vc-state
subtree-state
nerd-icons
collapse
git-msg
file-time
file-size)))
(use-package lsp-mode)
(use-package lsp-ui)
(use-package dap-mode)
(use-package dap-lldb)
@ -331,13 +398,16 @@
(not (functionp 'json-rpc-connection)) ;; native json-rpc
(executable-find "emacs-lsp-booster"))
(progn
(when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH)
(when-let* ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH)
(setcar orig-result command-from-exec-path))
(message "Using emacs-lsp-booster for %s!" orig-result)
(cons "emacs-lsp-booster" orig-result))
orig-result)))
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(with-eval-after-load 'lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "nixd")
@ -349,7 +419,6 @@
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
(add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode)
(add-hook 'emacs-lisp-mode-hook 'company-mode)
(add-hook 'c-mode-hook 'lsp-deferred)
(add-hook 'c-mode-hook 'display-line-numbers-mode)
@ -357,7 +426,13 @@
(add-hook 'c++-mode-hook 'lsp-deferred)
(add-hook 'c++-mode-hook 'display-line-numbers-mode)
(add-hook 'java-mode-hook 'lsp-deferred)
(use-package lsp-java
:config
(add-hook 'java-mode-hook (lambda () (when (getenv "JDTLS_PATH") (setq lsp-java-server-install-dir (getenv "JDTLS_PATH")))))
(add-hook 'java-mode-hook 'lsp-deferred)
(add-hook 'java-mode-hook 'display-line-numbers-mode))
(use-package cua-base)
;; Keybinds
(keymap-set cua--cua-keys-keymap "C-z" 'undo-tree-undo)
@ -373,6 +448,38 @@
(global-set-key (kbd "C-H-t") 'treemacs)
(cua-mode 1)
(use-package yasnippet
:config (yas-global-mode 1))
(defun materus/sync-config ()
"Function to sync config from MATERUS_CONFIG_DIR to emacs folder"
(if (getenv "MATERUS_CONFIG_DIR")
(progn (copy-directory (concat (getenv "MATERUS_CONFIG_DIR") "extraFiles/config/emacs/")
user-emacs-directory t t t) t)
(progn (message "Can't use if MATERUS_CONFIG_DIR is not set!") nil)))
(defun materus/compare-file-time (file1 file2)
"Returns t when file1 is newer than file2"
(time-less-p
(nth 5 (file-attributes file2))
(nth 5 (file-attributes file1))
))
(defun materus/compile-if-needed (file)
(unless (and (file-exists-p (concat user-emacs-directory file "c"))
(materus/compare-file-time (concat user-emacs-directory file "c")
(concat user-emacs-directory file)))
(byte-compile-file (concat user-emacs-directory file)))
)
(defun materus/compile-config-if-needed ()
(materus/compile-if-needed "early-init.el")
(materus/compile-if-needed "init.el")
(materus/compile-if-needed "etc/materus/emacs-config.el"))
(defun materus/update-config ()
"Will sync and compile config"
(interactive)
(when (materus/sync-config) (materus/compile-config-if-needed) (byte-recompile-directory (concat user-emacs-directory "etc/materus/extra") 0 t)))
(materus/compile-config-if-needed)
;;; (global-set-key (kbd "C-∇") (kbd "C-H"))
;;; (global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))

View File

@ -0,0 +1,171 @@
;;; corfu-mouse.el --- Mouse support for Corfu -*- lexical-binding: t; -*-
;; Copyright (C) 2021, 2022 Free Software Foundation, Inc.
;; Copyright (C) 2022 Akib Azmain Turja.
;; Author: Akib Azmain Turja <akib@disroot.org>
;; Maintainer: Akib Azmain Turja <akib@disroot.org>
;; Created: 2022
;; Version: 0.1
;; Package-Requires: ((emacs "24.4") (corfu "0.25"))
;; Homepage: https://codeberg.org/akib/emacs-corfu-mouse
;; This file is not part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; Disclaimer: This file is based on vertico-mouse.el of Vertico
;; package, which is a part of GNU Emacs.
;;; Commentary:
;; This package is a Corfu extension, which adds mouse support.
;; To enable, M-x corfu-mouse-mode.
;; Modified to support pixel-scroll-precision-mode
;;; Code:
(require 'corfu)
(defgroup corfu-mouse nil
"Mouse support for Corfu."
:group 'corfu
:link '(url-link "https://codeberg.org/akib/emacs-corfu-mouse")
:prefix "corfu-mouse-")
(defface corfu-mouse
'((t :inherit highlight))
"Face used for mouse highlighting."
:group 'corfu-mouse)
(defvar corfu-mouse--completion-buffer nil
"The buffer for which the popup is being shown.")
(defun corfu-mouse--candidate-map (index)
"Return keymap for candidate with INDEX."
(let ((map (make-sparse-keymap))
(mouse-1 (make-symbol "corfu-mouse--on-mouse-1"))
(mouse-3 (make-symbol "corfu-mouse--on-mouse-3")))
(fset mouse-1 (lambda ()
(interactive)
(corfu--goto index)
(corfu-insert)))
(fset mouse-3 (lambda ()
(interactive)
(corfu--goto index)
(corfu-complete)))
(define-key map [mouse-1] mouse-1)
(define-key map [mouse-3] mouse-3)
;; Ignore these events to keep completion session alive.
(define-key map [down-mouse-1] #'ignore)
(define-key map [down-mouse-3] #'ignore)
map))
(defun corfu-mouse--format-candidates (fcands)
"Format candidates.
FCANDS is the return value of `corfu--format-candidates'."
(let ((index corfu--scroll)
(cands (caddr fcands)))
(while cands
(let ((line (car cands)))
;; Append necessary amount of spaces to make it as wide as the
;; popup.
(setq line (concat line (make-string (- (cadr fcands)
(string-width line))
? )))
(add-text-properties 0 (length line)
`(mouse-face
corfu-mouse
keymap
,(corfu-mouse--candidate-map index))
line)
(setcar cands line)
(setq cands (cdr cands))
(setq index (1+ index))))
fcands))
(defun corfu-mouse--scroll-up (n)
"Scroll up by N lines."
(with-current-buffer corfu-mouse--completion-buffer
(corfu-next n)))
(defun corfu-mouse--scroll-down (n)
"Scroll down by N lines."
(corfu-mouse--scroll-up (- n)))
(defun corfu-mouse-mwheel-scroll ()
"Call `mwheel-scroll'."
(interactive)
(call-interactively #'mwheel-scroll))
(defun corfu-mouse--setup-scrolling (buffer)
"Setup mouse scrolling on BUFFER."
(let ((current-buffer (current-buffer)))
(with-current-buffer buffer
(when (boundp 'pixel-scroll-precision-mode)
(setq-local pixel-scroll-precision-mode nil))
(setq-local mwheel-scroll-up-function #'corfu-mouse--scroll-up)
(setq-local mwheel-scroll-down-function
#'corfu-mouse--scroll-down)
(setq-local corfu-mouse--completion-buffer current-buffer)))
buffer)
(defun corfu-mouse--post-command-set-buffer ()
"Set `corfu-mouse--completion-buffer' the current buffer."
(when corfu-mouse--completion-buffer
(switch-to-buffer corfu-mouse--completion-buffer)))
;;;###autoload
(define-minor-mode corfu-mouse-mode
"Mouse support for Corfu."
:global t :group 'corfu
(let ((scroll-events '(wheel-up wheel-down mouse-4 mouse-5))
(continue-commands '("corfu-mouse--on-mouse-1"
"corfu-mouse--on-mouse-3"
corfu-mouse-mwheel-scroll)))
(cond
(corfu-mouse-mode
(advice-add #'corfu--format-candidates :filter-return
#'corfu-mouse--format-candidates)
(advice-add #'corfu--make-buffer :filter-return
#'corfu-mouse--setup-scrolling)
(advice-add #'corfu--post-command :before
#'corfu-mouse--post-command-set-buffer)
(setq corfu-continue-commands
(append corfu-continue-commands continue-commands))
(dolist (event scroll-events)
(define-key corfu--mouse-ignore-map (vector event)
#'corfu-mouse-mwheel-scroll)))
(t
(advice-remove #'corfu--format-candidates
#'corfu-mouse--format-candidates)
(advice-remove #'corfu--make-buffer
#'corfu-mouse--setup-scrolling)
(advice-remove #'corfu--post-command
#'corfu-mouse--post-command-set-buffer)
(dolist (command continue-commands)
(setq corfu-continue-commands
(delete command corfu-continue-commands)))
(dolist (event scroll-events)
(define-key corfu--mouse-ignore-map (vector event)
#'ignore))))))
(provide 'corfu-mouse)
;;; corfu-mouse.el ends here

View File

@ -1,5 +1,7 @@
;;; -*- lexical-binding: t; -*-
(setq-default materus/use-nix-packages (require 'materus-config nil 'noerror))
(cua-mode 0) ; To load cua variables/functions but not set it up yet
(unless (file-directory-p (concat user-emacs-directory "var/quickstart"))
(make-directory (concat user-emacs-directory "var/quickstart") t))
(load (concat user-emacs-directory "nix-init") t)
(load (concat user-emacs-directory "etc/materus/emacs-config"))
(when (file-exists-p custom-file)
(load custom-file))
(load custom-file t)

View File

@ -159,11 +159,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1730739613,
"narHash": "sha256-UNwS+2868c7B1CcInYTZfCKj+DlChm6BbEL5m/VtbDY=",
"lastModified": 1731517933,
"narHash": "sha256-j59F8M6LBre2Cc3QzxiYRlNe4wX/Jw1ziqPnbbmE3+Y=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "8d1826ba7648bd2704c6beed35a9e9e3327178d1",
"rev": "e074a4f54d88af0db5284d77e0b80bb1a8d2c80f",
"type": "github"
},
"original": {
@ -182,11 +182,11 @@
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1730711584,
"narHash": "sha256-7XpfL6x0or0qH3NjtiujcyUzFrZu72b/pyLCbwk0+2s=",
"lastModified": 1731517933,
"narHash": "sha256-j59F8M6LBre2Cc3QzxiYRlNe4wX/Jw1ziqPnbbmE3+Y=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "ca2129b1d5afb32e46299dc48e03467522352bd5",
"rev": "e074a4f54d88af0db5284d77e0b80bb1a8d2c80f",
"type": "github"
},
"original": {
@ -233,11 +233,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -252,11 +252,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -379,11 +379,11 @@
]
},
"locked": {
"lastModified": 1730633670,
"narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=",
"lastModified": 1731535640,
"narHash": "sha256-2EckCJn4wxran/TsRiCOFcmVpep2m9EBKl99NBh2GnM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661",
"rev": "35b055009afd0107b69c286fca34d2ad98940d57",
"type": "github"
},
"original": {
@ -422,11 +422,11 @@
]
},
"locked": {
"lastModified": 1730685024,
"narHash": "sha256-w0cQSTjLBaUSziPGwyI0nbWVD64+N3ByoSxC0CEZmeI=",
"lastModified": 1731462465,
"narHash": "sha256-SL/d2lvJO+CDzQno7sOyUuktE7+o6kW1qpWsG8tBte4=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "16ca007ec37c29a8b97e4899f33c013defbdb2f9",
"rev": "ac80fc4a7e7604c5699cbe61839af03bd55bf7bf",
"type": "github"
},
"original": {
@ -449,11 +449,11 @@
]
},
"locked": {
"lastModified": 1730685024,
"narHash": "sha256-w0cQSTjLBaUSziPGwyI0nbWVD64+N3ByoSxC0CEZmeI=",
"lastModified": 1731462465,
"narHash": "sha256-SL/d2lvJO+CDzQno7sOyUuktE7+o6kW1qpWsG8tBte4=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "16ca007ec37c29a8b97e4899f33c013defbdb2f9",
"rev": "ac80fc4a7e7604c5699cbe61839af03bd55bf7bf",
"type": "github"
},
"original": {
@ -519,11 +519,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1730537918,
"narHash": "sha256-GJB1/aaTnAtt9sso/EQ77TAGJ/rt6uvlP0RqZFnWue8=",
"lastModified": 1731403644,
"narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "f6e0cd5c47d150c4718199084e5764f968f1b560",
"rev": "f6581f1c3b137086e42a08a906bdada63045f991",
"type": "github"
},
"original": {
@ -535,11 +535,11 @@
},
"nixos-hardware_2": {
"locked": {
"lastModified": 1730537918,
"narHash": "sha256-GJB1/aaTnAtt9sso/EQ77TAGJ/rt6uvlP0RqZFnWue8=",
"lastModified": 1731403644,
"narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "f6e0cd5c47d150c4718199084e5764f968f1b560",
"rev": "f6581f1c3b137086e42a08a906bdada63045f991",
"type": "github"
},
"original": {
@ -567,11 +567,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730327045,
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"lastModified": 1731239293,
"narHash": "sha256-q2yjIWFFcTzp5REWQUOU9L6kHdCDmFDpqeix86SOvDc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
"rev": "9256f7c71a195ebe7a218043d9f93390d49e6884",
"type": "github"
},
"original": {
@ -599,11 +599,11 @@
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1730327045,
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"lastModified": 1731239293,
"narHash": "sha256-q2yjIWFFcTzp5REWQUOU9L6kHdCDmFDpqeix86SOvDc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
"rev": "9256f7c71a195ebe7a218043d9f93390d49e6884",
"type": "github"
},
"original": {
@ -631,11 +631,11 @@
},
"nixpkgs-stable_5": {
"locked": {
"lastModified": 1730327045,
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"lastModified": 1731239293,
"narHash": "sha256-q2yjIWFFcTzp5REWQUOU9L6kHdCDmFDpqeix86SOvDc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
"rev": "9256f7c71a195ebe7a218043d9f93390d49e6884",
"type": "github"
},
"original": {
@ -647,11 +647,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1730531603,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
"lastModified": 1731139594,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"type": "github"
},
"original": {
@ -676,11 +676,11 @@
},
"nur_2": {
"locked": {
"lastModified": 1730742119,
"narHash": "sha256-npA4wtBgm9s5C0ElDYkyiBXeBGsxDqT6e7sPGwtDLFc=",
"lastModified": 1731530667,
"narHash": "sha256-/EBYF3f2kAPX3IOwxcjP/KTvXeX9b2cZyxgxGvp+XWI=",
"owner": "nix-community",
"repo": "NUR",
"rev": "3c7a45327b6a9f8b02df8d3acf213fd0616d59ef",
"rev": "481bba9ab4c2054b7cac86ee3be24f67e5256820",
"type": "github"
},
"original": {
@ -705,11 +705,11 @@
},
"nur_4": {
"locked": {
"lastModified": 1730720916,
"narHash": "sha256-sLuyisXE2KkcQ3gai2Y10e7vrddDCnR4n+op9n67AD0=",
"lastModified": 1731530667,
"narHash": "sha256-/EBYF3f2kAPX3IOwxcjP/KTvXeX9b2cZyxgxGvp+XWI=",
"owner": "nix-community",
"repo": "NUR",
"rev": "4a9ef04ed3048a17b50a11499e7f08d2ff00080c",
"rev": "481bba9ab4c2054b7cac86ee3be24f67e5256820",
"type": "github"
},
"original": {
@ -721,10 +721,10 @@
},
"nur_5": {
"locked": {
"lastModified": 1729545054,
"narHash": "sha256-Duxerj7QvZuOBD+MQSsGS5HX08P1YoaXgMsXaS9OP8A=",
"path": "/nix/store/c645p1n6k9nyh9b1y5f98lx9ywgwgq8l-source",
"rev": "52e70a5189a360d779f71624e2adaf3b0cd85716",
"lastModified": 1730720916,
"narHash": "sha256-sLuyisXE2KkcQ3gai2Y10e7vrddDCnR4n+op9n67AD0=",
"path": "/nix/store/n52f84spncfhpbgbx1gydvdqmwfkic3p-source",
"rev": "4a9ef04ed3048a17b50a11499e7f08d2ff00080c",
"type": "path"
},
"original": {
@ -744,11 +744,11 @@
]
},
"locked": {
"lastModified": 1730635861,
"narHash": "sha256-Npp3pl9aeAiq+wZPDbw2ZxybNuZWyuN7AY6fik56DCo=",
"lastModified": 1731193165,
"narHash": "sha256-pGF8L5g9QpkQtJP9JmNIRNZfcyhJHf7uT+d8tqI1h6Y=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "293668587937daae1df085ee36d2b2d0792b7a0f",
"rev": "f33173b9d22e554a6f869626bc01808d35995257",
"type": "github"
},
"original": {
@ -770,11 +770,11 @@
]
},
"locked": {
"lastModified": 1730635861,
"narHash": "sha256-Npp3pl9aeAiq+wZPDbw2ZxybNuZWyuN7AY6fik56DCo=",
"lastModified": 1731193165,
"narHash": "sha256-pGF8L5g9QpkQtJP9JmNIRNZfcyhJHf7uT+d8tqI1h6Y=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "293668587937daae1df085ee36d2b2d0792b7a0f",
"rev": "f33173b9d22e554a6f869626bc01808d35995257",
"type": "github"
},
"original": {
@ -821,11 +821,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1730605784,
"narHash": "sha256-1NveNAMLHbxOg0BpBMSVuZ2yW2PpDnZLbZ25wV50PMc=",
"lastModified": 1731364708,
"narHash": "sha256-HC0anOL+KmUQ2hdRl0AtunbAckasxrkn4VLmxbW/WaA=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "e9b5eef9b51cdf966c76143e13a9476725b2f760",
"rev": "4c91d52db103e757fc25b58998b0576ae702d659",
"type": "github"
},
"original": {
@ -844,11 +844,11 @@
"nixpkgs-stable": "nixpkgs-stable_4"
},
"locked": {
"lastModified": 1730605784,
"narHash": "sha256-1NveNAMLHbxOg0BpBMSVuZ2yW2PpDnZLbZ25wV50PMc=",
"lastModified": 1731364708,
"narHash": "sha256-HC0anOL+KmUQ2hdRl0AtunbAckasxrkn4VLmxbW/WaA=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "e9b5eef9b51cdf966c76143e13a9476725b2f760",
"rev": "4c91d52db103e757fc25b58998b0576ae702d659",
"type": "github"
},
"original": {