Update spacemacs configuration

This commit is contained in:
2023-03-06 09:58:30 +01:00
parent c24e319a32
commit b30edf558f
+141 -23
View File
@@ -3,9 +3,8 @@
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@@ -33,7 +32,7 @@ values."
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
'(javascript
auto-completion
docker
emacs-lisp
@@ -46,7 +45,7 @@ values."
php
(python :variables
python-formatter 'black
python-format-on-save t
python-format-on-save 'f
python-sort-imports-on-save t)
spacemacs-org
swift
@@ -83,9 +82,13 @@ It should only modify the values of Spacemacs settings."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non-nil then enable support for the portable dumper. You'll need
;; to compile Emacs 27 from source following the instructions in file
;; If non-nil then enable support for the portable dumper. You'll need to
;; compile Emacs 27 from source following the instructions in file
;; EXPERIMENTAL.org at to root of the git repository.
;;
;; WARNING: pdumper does not work with Native Compilation, so it's disabled
;; regardless of the following setting when native compilation is in effect.
;;
;; (default nil)
dotspacemacs-enable-emacs-pdumper nil
@@ -166,18 +169,40 @@ It should only modify the values of Spacemacs settings."
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'official
;; Scale factor controls the scaling (size) of the startup banner. Default
;; value is `auto' for scaling the logo automatically to fit all buffer
;; contents, to a maximum of the full image height and a minimum of 3 line
;; heights. If set to a number (int or float) it is used as a constant
;; scaling factor for the default logo size.
dotspacemacs-startup-banner-scale 'auto
;; List of items to show in startup buffer or an association list of
;; the form `(list-type . list-size)`. If nil then it is disabled.
;; Possible values for list-type are:
;; `recents' `bookmarks' `projects' `agenda' `todos'.
;; `recents' `recents-by-project' `bookmarks' `projects' `agenda' `todos'.
;; List sizes may be nil, in which case
;; `spacemacs-buffer-startup-lists-length' takes effect.
;; The exceptional case is `recents-by-project', where list-type must be a
;; pair of numbers, e.g. `(recents-by-project . (7 . 5))', where the first
;; number is the project limit and the second the limit on the recent files
;; within a project.
dotspacemacs-startup-lists '((recents . 5)
(projects . 7))
;; True if the home buffer should respond to resize events. (default t)
dotspacemacs-startup-buffer-responsive t
;; Show numbers before the startup list lines. (default t)
dotspacemacs-show-startup-list-numbers t
;; The minimum delay in seconds between number key presses. (default 0.4)
dotspacemacs-startup-buffer-multi-digit-delay 0.4
;; If non-nil, show file icons for entries and headings on Spacemacs home buffer.
;; This has no effect in terminal or if "all-the-icons" package or the font
;; is not installed. (default nil)
dotspacemacs-startup-buffer-show-icons nil
;; Default major mode for a new empty buffer. Possible values are mode
;; names such as `text-mode'; and `nil' to use Fundamental mode.
;; (default `text-mode')
@@ -221,7 +246,7 @@ It should only modify the values of Spacemacs settings."
;; a non-negative integer (pixel size), or a floating-point (point size).
;; Point size is recommended, because it's device independent. (default 10.0)
dotspacemacs-default-font '("Source Code Pro"
:size 13
:size 10.0
:weight normal
:width normal
:powerline-scale 1.1)
@@ -320,12 +345,12 @@ It should only modify the values of Spacemacs settings."
;; If non-nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (default nil) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; (default t) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup t
;; If non-nil the frame is undecorated when Emacs starts up. Combine this
;; variable with `dotspacemacs-maximized-at-startup' in OSX to obtain
;; borderless fullscreen. (default nil)
;; variable with `dotspacemacs-maximized-at-startup' to obtain fullscreen
;; without external boxes. Also disables the internal border. (default nil)
dotspacemacs-undecorated-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
@@ -354,12 +379,16 @@ It should only modify the values of Spacemacs settings."
;; when it reaches the top or bottom of the screen. (default t)
dotspacemacs-smooth-scrolling t
;; Show the scroll bar while scrolling. The auto hide time can be configured
;; by setting this variable to a number. (default t)
dotspacemacs-scroll-bar-while-scrolling t
;; Control line numbers activation.
;; If set to `t', `relative' or `visual' then line numbers are enabled in all
;; `prog-mode' and `text-mode' derivatives. If set to `relative', line
;; numbers are relative. If set to `visual', line numbers are also relative,
;; but lines are only visual lines are counted. For example, folded lines
;; will not be counted and wrapped lines are counted as multiple lines.
;; but only visual lines are counted. For example, folded lines will not be
;; counted and wrapped lines are counted as multiple lines.
;; This variable can also be set to a property list for finer control:
;; '(:relative nil
;; :visual nil
@@ -372,16 +401,21 @@ It should only modify the values of Spacemacs settings."
;; :size-limit-kb 1000)
;; When used in a plist, `visual' takes precedence over `relative'.
;; (default nil)
dotspacemacs-line-numbers nil
dotspacemacs-line-numbers t
;; Code folding method. Possible values are `evil', `origami' and `vimish'.
;; (default 'evil)
dotspacemacs-folding-method 'evil
;; If non-nil `smartparens-strict-mode' will be enabled in programming modes.
;; If non-nil and `dotspacemacs-activate-smartparens-mode' is also non-nil,
;; `smartparens-strict-mode' will be enabled in programming modes.
;; (default nil)
dotspacemacs-smartparens-strict-mode nil
;; If non-nil smartparens-mode will be enabled in programming modes.
;; (default t)
dotspacemacs-activate-smartparens-mode t
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
;; over any automatically added closing parenthesis, bracket, quote, etc...
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
@@ -428,6 +462,9 @@ It should only modify the values of Spacemacs settings."
;; %n - Narrow if appropriate
;; %z - mnemonics of buffer, terminal, and keyboard coding systems
;; %Z - like %z, but including the end-of-line format
;; If nil then Spacemacs uses default `frame-title-format' to avoid
;; performance issues, instead of calculating the frame title by
;; `spacemacs/title-prepare' all the time.
;; (default "%I@%S")
dotspacemacs-frame-title-format "%I@%S"
@@ -435,6 +472,11 @@ It should only modify the values of Spacemacs settings."
;; (default nil - same as frame-title-format)
dotspacemacs-icon-title-format nil
;; Color highlight trailing whitespace in all prog-mode and text-mode derived
;; modes such as c++-mode, python-mode, emacs-lisp, html-mode, rst-mode etc.
;; (default t)
dotspacemacs-show-trailing-whitespace t
;; Delete whitespace while saving buffer. Possible values are `all'
;; to aggressively delete empty line and long sequences of whitespace,
;; `trailing' to delete only the whitespace at end of lines, `changed' to
@@ -442,13 +484,16 @@ It should only modify the values of Spacemacs settings."
;; (default nil)
dotspacemacs-whitespace-cleanup nil
;; If non nil activate `clean-aindent-mode' which tries to correct
;; virtual indentation of simple modes. This can interfer with mode specific
;; If non-nil activate `clean-aindent-mode' which tries to correct
;; virtual indentation of simple modes. This can interfere with mode specific
;; indent handling like has been reported for `go-mode'.
;; If it does deactivate it here.
;; (default t)
dotspacemacs-use-clean-aindent-mode t
;; Accept SPC as y for prompts if non-nil. (default nil)
dotspacemacs-use-SPC-as-y nil
;; If non-nil shift your number row to match the entered keyboard layout
;; (only in insert state). Currently supported keyboard layouts are:
;; `qwerty-us', `qwertz-de' and `querty-ca-fr'.
@@ -466,8 +511,11 @@ It should only modify the values of Spacemacs settings."
dotspacemacs-pretty-docs nil
;; If nil the home buffer shows the full path of agenda items
;; and todos. If non nil only the file name is shown.
dotspacemacs-home-shorten-agenda-source nil))
;; and todos. If non-nil only the file name is shown.
dotspacemacs-home-shorten-agenda-source nil
;; If non-nil then byte-compile some of Spacemacs files.
dotspacemacs-byte-compile nil))
(defun dotspacemacs/user-env ()
"Environment variables setup.
@@ -475,7 +523,8 @@ 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."
(spacemacs/load-spacemacs-env))
(spacemacs/load-spacemacs-env)
)
(defun dotspacemacs/user-init ()
"Initialization for user code:
@@ -485,6 +534,15 @@ 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."
)
(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."
)
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs
@@ -493,6 +551,8 @@ where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a
package is loaded, you should place your code here."
(setq tramp-ssh-controlmaster-options nil)
(defun my/org-mode-hook ()
"Stop the org-level headers from increasing in height relative to the other text."
(dolist (face '(org-level-1
@@ -504,7 +564,6 @@ package is loaded, you should place your code here."
(add-hook 'org-mode-hook 'my/org-mode-hook)
(setq tramp-ssh-controlmaster-options nil)
(with-eval-after-load 'org
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
@@ -544,3 +603,62 @@ package is loaded, you should place your code here."
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(defun dotspacemacs/emacs-custom-settings ()
"Emacs custom settings.
This is an auto-generated function, do not modify its content directly, use
Emacs customize menu instead.
This function is called at the very end of Spacemacs initialization."
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(evil-want-Y-yank-to-eol nil) '(package-selected-packages
'(web-beautify tern prettier-js npm-mode nodejs-repl livid-mode
skewer-mode js2-refactor multiple-cursors js2-mode js-doc
import-js grizzl impatient-mode simple-httpd helm-gtags ggtags
dap-mode lsp-docker lsp-treemacs bui lsp-mode eldoc
counsel-gtags counsel swiper ivy add-node-modules-path json-mode
yasnippet-snippets yapfify yaml-mode ws-butler writeroom-mode
winum which-key volatile-highlights vi-tilde-fringe uuidgen
use-package undo-tree treemacs-projectile treemacs-persp
treemacs-magit treemacs-icons-dired treemacs-evil toc-org
systemd symon symbol-overlay swift-mode string-inflection
sphinx-doc spaceline-all-the-icons smeargle restart-emacs
rainbow-delimiters quickrun pytest pyenv-mode py-isort popwin
poetry pippel pipenv pip-requirements phpunit phpcbf php-extras
php-auto-yasnippets pcre2el password-generator paradox overseer
orgit-forge org-superstar org-rich-yank org-projectile
org-present org-pomodoro org-mime org-download org-contrib
org-cliplink open-junk-file nose nginx-mode nameless multi-line
mmm-mode markdown-toc macrostep lorem-ipsum live-py-mode
link-hint indent-guide importmagic hybrid-mode hungry-delete
htmlize hl-todo highlight-parentheses highlight-numbers
highlight-indentation helm-xref helm-themes helm-swoop
helm-pydoc helm-purpose helm-projectile helm-org-rifle helm-org
helm-mode-manager helm-make helm-ls-git helm-git-grep helm-flx
helm-descbinds helm-company helm-c-yasnippet helm-ag
google-translate golden-ratio gnuplot gitignore-templates
git-timemachine git-messenger git-link git-gutter-fringe+ gh-md
geben fuzzy font-lock+ flycheck-pos-tip flycheck-package
flycheck-elsa flx-ido fancy-battery eyebrowse expand-region
evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor
evil-textobj-line evil-surround evil-org evil-numbers
evil-nerd-commenter evil-matchit evil-lisp-state evil-lion
evil-indent-plus evil-iedit-state evil-goggles evil-exchange
evil-escape evil-easymotion evil-collection evil-cleverparens
evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav ein
editorconfig dumb-jump drupal-mode drag-stuff dotenv-mode
dockerfile-mode docker-tramp docker dired-quick-sort diminish
define-word cython-mode company-phpactor company-php
company-anaconda column-enforce-mode clean-aindent-mode
centered-cursor-mode browse-at-remote blacken auto-yasnippet
auto-highlight-symbol auto-compile aggressive-indent ace-link
ace-jump-helm-line ac-ispell)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
)