Commit b23c1c10 authored by Pierre Balaye's avatar Pierre Balaye

Simplify everything: rely on private layers now!

parent 6f6ccb19
(defun dotspacemacs/init-specific ()
)
(defun dotspacemacs/layers-specific ()
(setq-default
dotspacemacs-configuration-layers
(append dotspacemacs-configuration-layers
'(
;; -------- Languages
;; ess
;; html
;; latex
;; markdown
;; python
;; julia
;; javascript
;; sql
;; go
;; -------- Others
;; systemd
;; csv
;; -------- Applications
;; org
;; gnus
;; fasd
;; lsp
;; -------- Project management
;; (treemacs :variables
;; treemacs-use-follow-mode t
;; treemacs-use-filewatch-mode t)
;; -------- Tools
;; pdf
;; (shell :variables
;; shell-default-term-shell "/bin/zsh"
;; shell-default-height 30
;; shell-default-position 'bottom)
;; (spell-checking :variables spell-checking-enable-by-default nil)
;; (auto-completion :variables
;; auto-completion-enable-snippets-in-popup t
;; auto-completion-enable-help-tooltip t
;; auto-completion-enable-sort-by-usage t
;; )
;; syntax-checking
;; spacemacs-purpose
;; -------
;; theming
))
)
)
(defun dotspacemacs/user-config-specific ())
(defun dotspacemacs/user-env-specific ())
(defun dotspacemacs/user-init-specific ())
(defun dotspacemacs/user-load-specific ()
)
(defun dotspacemacs/init-specific ()
)
(defun dotspacemacs/layers-specific ()
(setq-default
dotspacemacs-configuration-layers
(append dotspacemacs-configuration-layers
'(
;; -------- Languages
;; ess
;; html
;; latex
;; markdown
;; python
;; julia
;; javascript
;; sql
;; go
;; -------- Others
;; systemd
;; csv
;; -------- Applications
;; org
;; gnus
;; fasd
;; -------- Project management
;; git
;; (treemacs :variables
;; treemacs-use-follow-mode t
;; treemacs-use-filewatch-mode t)
;; -------- Tools
;; pdf
;; (shell :variables
;; shell-default-term-shell "/bin/zsh"
;; shell-default-height 30
;; shell-default-position 'bottom)
;; (spell-checking :variables spell-checking-enable-by-default nil)
;; (auto-completion :variables
;; auto-completion-enable-snippets-in-popup t
;; auto-completion-enable-help-tooltip t
;; auto-completion-enable-sort-by-usage t
;; )
;; syntax-checking
;; spacemacs-purpose
;; -------
;; theming
))
)
)
(defun dotspacemacs/user-config-specific ()
)
(defun dotspacemacs/user-env-specific ())
(defun dotspacemacs/user-init-specific ())
(defun dotspacemacs/user-load-specific ()
)
;; -*- mode: emacs-lisp; lexical-binding: t -*- ;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
;; Determine specific config directory
(setq config-emacs-directory (replace-regexp-in-string "flavors" "configs" user-emacs-directory))
(defun load-config-file (filename)
(load (concat config-emacs-directory filename)))
(defun dotspacemacs/layers () (defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; Settings
(setq-default (setq-default
dotspacemacs-distribution 'spacemacs dotspacemacs-distribution 'spacemacs
dotspacemacs-enable-lazy-installation nil dotspacemacs-enable-lazy-installation nil
dotspacemacs-ask-for-lazy-installation t dotspacemacs-ask-for-lazy-installation t
dotspacemacs-configuration-layer-path (list dotspacemacs-configuration-layer-path (list
(concat user-emacs-directory (concat user-emacs-directory
"../../layers/")) "../../layers/")))
dotspacemacs-additional-packages '()
dotspacemacs-frozen-packages '()
dotspacemacs-excluded-packages '()
dotspacemacs-install-packages 'used-but-keep-unused)
;; Layers
(setq-default (setq-default
;; List of configuration layers to load. ;; List of configuration layers to load.
dotspacemacs-configuration-layers dotspacemacs-configuration-layers
...@@ -41,25 +19,14 @@ This function should only modify configuration layer settings." ...@@ -41,25 +19,14 @@ This function should only modify configuration layer settings."
(stats :location local) (stats :location local)
) )
) )
(setq-default
;; -------------------------------------------------- dotspacemacs-additional-packages '()
;; ----- Configuration specific to this version ----- dotspacemacs-frozen-packages '()
;; -------------------------------------------------- dotspacemacs-excluded-packages '()
dotspacemacs-install-packages 'used-but-keep-unused)
(load-config-file "dot-layers.el")
(dotspacemacs/layers-specific)
) )
(defun dotspacemacs/init () (defun dotspacemacs/init ()
"Instantiate Spacemacs core settings.
All `dotspacemacs-' variables with values set different than their defaults.
They are all defined in `~/.emacs.d/core/core-dotspacemacs.el'.
Check `dotspacemacs/get-variable-string-list' for all vars you can configure."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
(setq-default (setq-default
dotspacemacs-editing-style 'hybrid dotspacemacs-editing-style 'hybrid
dotspacemacs-startup-banner 100 dotspacemacs-startup-banner 100
...@@ -92,89 +59,11 @@ Check `dotspacemacs/get-variable-string-list' for all vars you can configure." ...@@ -92,89 +59,11 @@ Check `dotspacemacs/get-variable-string-list' for all vars you can configure."
dotspacemacs-search-tools '("ag" "rg" "pt" "ack" "grep") dotspacemacs-search-tools '("ag" "rg" "pt" "ack" "grep")
dotspacemacs-whitespace-cleanup 'all dotspacemacs-whitespace-cleanup 'all
dotspacemacs-pretty-docs t) dotspacemacs-pretty-docs t)
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-init.el")
(dotspacemacs/init-specific)
)
(defun dotspacemacs/user-env ()
"Environment variables setup.
This function defines the environment variables for your Emacs session. By
default it calls `spacemacs/load-spacemacs-env' which loads the environment
variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
See the header of this file for more information."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-env.el")
(dotspacemacs/user-env-specific)
)
(defun dotspacemacs/user-init ()
"Initialization for user code:
This function is called immediately after `dotspacemacs/init', before layer
configuration.
It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-init.el")
(dotspacemacs/user-init-specific)
)
(defun dotspacemacs/user-load ()
"Library to load while dumping.
This function is called only while dumping Spacemacs configuration. You can
`require' or `load' the libraries of your choice that will be included in the
dump."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-load.el")
(dotspacemacs/user-load-specific)
) )
(defun dotspacemacs/user-config () (defun dotspacemacs/user-config ()
"Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
(spacemacs/toggle-centered-point-globally-on) (spacemacs/toggle-centered-point-globally-on)
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-config.el")
(dotspacemacs/user-config-specific)
) )
;; Do not write anything past this comment. This is where Emacs will ;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions. ;; auto-generate custom variable definitions.
(defun dotspacemacs/init-specific ()
)
(defun dotspacemacs/layers-specific ()
(setq-default
dotspacemacs-configuration-layers
(append dotspacemacs-configuration-layers
'(
;; -------- Languages
;; ess
;; html
;; latex
;; markdown
;; python
;; julia
;; javascript
;; sql
;; go
;; -------- Others
;; systemd
;; csv
;; -------- Applications
;; org
;; gnus
;; fasd
;; lsp
;; -------- Project management
;; git
;; (treemacs :variables
;; treemacs-use-follow-mode t
;; treemacs-use-filewatch-mode t)
;; -------- Tools
;; pdf
;; (shell :variables
;; shell-default-term-shell "/bin/zsh"
;; shell-default-height 30
;; shell-default-position 'bottom)
;; (spell-checking :variables spell-checking-enable-by-default nil)
;; (auto-completion :variables
;; auto-completion-enable-snippets-in-popup t
;; auto-completion-enable-help-tooltip t
;; auto-completion-enable-sort-by-usage t
;; )
;; syntax-checking
;; spacemacs-purpose
;; -------
;; theming
))
dotspacemacs-additional-packages
(append dotspacemacs-additional-packages
'(
)
)
)
)
(defun dotspacemacs/user-config-specific ()
(defun ulys/config/org/babel ()
;; FIXME julia bug - hack I have opened issue #13597
(setq inferior-julia-program-name "julia")
(custom-set-variables
'(org-babel-load-languages (quote ((emacs-lisp . t)
(R . t)
(latex . t)
(shell . t)
(ditaa . t)
(julia . t)
(python . t)
(sql . t)
)))
'(org-confirm-babel-evaluate nil)))
(ulys/config/org/babel)
(require 'org-tempo)
)
(defun dotspacemacs/user-env-specific ())
(defun dotspacemacs/user-init-specific ())
(defun dotspacemacs/user-load-specific ()
)
;; -*- mode: emacs-lisp; lexical-binding: t -*- ;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
;; Determine specific config directory
(setq config-emacs-directory (replace-regexp-in-string "flavors" "configs" user-emacs-directory))
(defun load-config-file (filename)
(load (concat config-emacs-directory filename)))
(defun dotspacemacs/layers () (defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; Settings
(setq-default (setq-default
dotspacemacs-distribution 'spacemacs dotspacemacs-distribution 'spacemacs
dotspacemacs-enable-lazy-installation nil dotspacemacs-enable-lazy-installation nil
dotspacemacs-ask-for-lazy-installation t dotspacemacs-ask-for-lazy-installation t
dotspacemacs-configuration-layer-path (list dotspacemacs-configuration-layer-path (list
(concat user-emacs-directory (concat user-emacs-directory
"../../layers/")) "../../layers/")))
dotspacemacs-additional-packages '()
dotspacemacs-frozen-packages '()
dotspacemacs-excluded-packages '()
dotspacemacs-install-packages 'used-but-keep-unused)
;; Layers
(setq-default (setq-default
;; List of configuration layers to load. ;; List of configuration layers to load.
dotspacemacs-configuration-layers dotspacemacs-configuration-layers
...@@ -38,27 +16,17 @@ This function should only modify configuration layer settings." ...@@ -38,27 +16,17 @@ This function should only modify configuration layer settings."
(smartparens :location local) (smartparens :location local)
(dired :location local) (dired :location local)
(pdfs :location local) (pdfs :location local)
(stats :location local)
) )
) )
(setq-default
;; -------------------------------------------------- dotspacemacs-additional-packages '()
;; ----- Configuration specific to this version ----- dotspacemacs-frozen-packages '()
;; -------------------------------------------------- dotspacemacs-excluded-packages '()
dotspacemacs-install-packages 'used-but-keep-unused)
(load-config-file "dot-layers.el")
(dotspacemacs/layers-specific)
) )
(defun dotspacemacs/init () (defun dotspacemacs/init ()
"Instantiate Spacemacs core settings.
All `dotspacemacs-' variables with values set different than their defaults.
They are all defined in `~/.emacs.d/core/core-dotspacemacs.el'.
Check `dotspacemacs/get-variable-string-list' for all vars you can configure."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
(setq-default (setq-default
dotspacemacs-editing-style 'hybrid dotspacemacs-editing-style 'hybrid
dotspacemacs-startup-banner 100 dotspacemacs-startup-banner 100
...@@ -91,107 +59,11 @@ Check `dotspacemacs/get-variable-string-list' for all vars you can configure." ...@@ -91,107 +59,11 @@ Check `dotspacemacs/get-variable-string-list' for all vars you can configure."
dotspacemacs-search-tools '("ag" "rg" "pt" "ack" "grep") dotspacemacs-search-tools '("ag" "rg" "pt" "ack" "grep")
dotspacemacs-whitespace-cleanup 'all dotspacemacs-whitespace-cleanup 'all
dotspacemacs-pretty-docs t) dotspacemacs-pretty-docs t)
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-init.el")
(dotspacemacs/init-specific)
)
(defun dotspacemacs/user-env ()
"Environment variables setup.
This function defines the environment variables for your Emacs session. By
default it calls `spacemacs/load-spacemacs-env' which loads the environment
variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
See the header of this file for more information."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-env.el")
(dotspacemacs/user-env-specific)
)
(defun dotspacemacs/user-init ()
"Initialization for user code:
This function is called immediately after `dotspacemacs/init', before layer
configuration.
It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-init.el")
(dotspacemacs/user-init-specific)
)
(defun dotspacemacs/user-load ()
"Library to load while dumping.
This function is called only while dumping Spacemacs configuration. You can
`require' or `load' the libraries of your choice that will be included in the
dump."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-load.el")
(dotspacemacs/user-load-specific)
) )
(defun dotspacemacs/user-config () (defun dotspacemacs/user-config ()
"Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
;; --------------------------------------------------
;; ------ Configuration common to all versions ------
;; --------------------------------------------------
(spacemacs/toggle-centered-point-globally-on) (spacemacs/toggle-centered-point-globally-on)
(ulys/conf/dired)
(ulys/conf/kbd)
;; --------------------------------------------------
;; ----- Configuration specific to this version -----
;; --------------------------------------------------
(load-config-file "dot-user-config.el")
(dotspacemacs/user-config-specific)
)
; dired config
(defun ulys/conf/dired ()
)
; kbd config
(defun ulys/conf/kbd ()
;; --- others
;; C-h to delete buffer and C-S-h for help
(global-set-key (kbd "C-h") 'spacemacs/kill-this-buffer)
;; Simulates vim increment and decrement number
(define-key evil-normal-state-map (kbd "C-a C-a") 'evil-numbers/inc-at-pt)
(define-key evil-normal-state-map (kbd "C-x C-x") 'evil-numbers/dec-at-pt)
) )
;; Do not write anything past this comment. This is where Emacs will ;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions. ;; auto-generate custom variable definitions.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment