├── .spacemacs └── README.rst /.spacemacs: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp; lexical-binding: t -*- 2 | ;; This file is loaded by Spacemacs at startup. 3 | ;; It must be stored in your home directory. 4 | 5 | (defun dotspacemacs/layers () 6 | "Layer configuration: 7 | This function should only modify configuration layer settings." 8 | (setq-default 9 | ;; Base distribution to use. This is a layer contained in the directory 10 | ;; `+distribution'. For now available distributions are `spacemacs-base' 11 | ;; or `spacemacs'. (default 'spacemacs) 12 | dotspacemacs-distribution 'spacemacs 13 | 14 | ;; Lazy installation of layers (i.e. layers are installed only when a file 15 | ;; with a supported type is opened). Possible values are `all', `unused' 16 | ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers 17 | ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will 18 | ;; lazy install any layer that support lazy installation even the layers 19 | ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy 20 | ;; installation feature and you have to explicitly list a layer in the 21 | ;; variable `dotspacemacs-configuration-layers' to install it. 22 | ;; (default 'unused) 23 | dotspacemacs-enable-lazy-installation 'unused 24 | 25 | ;; If non-nil then Spacemacs will ask for confirmation before installing 26 | ;; a layer lazily. (default t) 27 | dotspacemacs-ask-for-lazy-installation t 28 | 29 | ;; List of additional paths where to look for configuration layers. 30 | ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') 31 | dotspacemacs-configuration-layer-path '() 32 | 33 | ;; List of configuration layers to load. 34 | dotspacemacs-configuration-layers 35 | '( 36 | systemd 37 | ;; cscope 38 | command-log 39 | copy-as-format 40 | nginx 41 | javascript 42 | (auto-completion :variables 43 | auto-completion-enable-snippets-in-popup t 44 | auto-completion-enable-sort-by-usage t) 45 | (python :variables 46 | python-test-runner 'pytest) 47 | ranger 48 | ;; lsp 49 | ;; ---------------------------------------------------------------- 50 | ;; Example of useful layers you may want to use right away. 51 | ;; Uncomment some layer names and press `SPC f e R' (Vim style) or 52 | ;; `M-m f e R' (Emacs style) to install them. 53 | ;; ---------------------------------------------------------------- 54 | helm 55 | emacs-lisp 56 | emoji 57 | git 58 | github 59 | gtags 60 | html 61 | markdown 62 | org 63 | ;; (shell :variables 64 | ;; shell-default-height 30 65 | ;; shell-default-position 'bottom) 66 | salt 67 | shell 68 | terraform 69 | unicode-fonts 70 | shell-scripts 71 | (spell-checking :variables 72 | ;; May produce freeze when launching an emacs client 73 | spell-checking-enable-auto-dictionary t) 74 | (syntax-checking :variables 75 | syntax-checking-enable-by-default nil) 76 | twitter 77 | (version-control :variables 78 | version-control-diff-tool 'git-gutter+ 79 | version-control-global-margin t 80 | version-control-diff-side 'left) 81 | ;; semantic 82 | (treemacs :variables 83 | treemacs-collapse-dirs 3) 84 | yaml 85 | ) 86 | 87 | ;; List of additional packages that will be installed without being 88 | ;; wrapped in a layer. If you need some configuration for these 89 | ;; packages, then consider creating a layer. You can also put the 90 | ;; configuration in `dotspacemacs/user-config'. 91 | ;; To use a local version of a package, use the `:location' property: 92 | ;; '(your-package :location "~/path/to/your-package/") 93 | ;; Also include the dependencies as they will not be resolved automatically. 94 | dotspacemacs-additional-packages 95 | '( 96 | ;; all-the-icons 97 | dockerfile-mode 98 | highlight-operators 99 | pip-requirements 100 | pkgbuild-mode 101 | dotenv-mode 102 | ;; haskell-mode 103 | helm-backup 104 | hl-todo 105 | ;; cags-update 106 | 107 | ;; https://github.com/purcell/exec-path-from-shell 108 | exec-path-from-shell 109 | 110 | ;; https://github.com/magit/ssh-agency 111 | ssh-agency 112 | 113 | ;; https://github.com/preetpalS/emacs-dotenv-mode 114 | dotenv-mode 115 | 116 | sphinx-doc 117 | python-docstring 118 | 119 | po-mode 120 | 121 | yasnippet-snippets 122 | visual-regexp-steroids 123 | ) 124 | ;; A list of packages that cannot be updated. 125 | dotspacemacs-frozen-packages '() 126 | 127 | ;; A list of packages that will not be installed and loaded. 128 | dotspacemacs-excluded-packages '() 129 | 130 | ;; Defines the behaviour of Spacemacs when installing packages. 131 | ;; Possible values are `used-only', `used-but-keep-unused' and `all'. 132 | ;; `used-only' installs only explicitly used packages and deletes any unused 133 | ;; packages as well as their unused dependencies. `used-but-keep-unused' 134 | ;; installs only the used packages but won't delete unused ones. `all' 135 | ;; installs *all* packages supported by Spacemacs and never uninstalls them. 136 | ;; (default is `used-only') 137 | dotspacemacs-install-packages 'used-only)) 138 | 139 | (defun dotspacemacs/init () 140 | "Initialization: 141 | This function is called at the very beginning of Spacemacs startup, 142 | before layer configuration. 143 | It should only modify the values of Spacemacs settings." 144 | ;; This setq-default sexp is an exhaustive list of all the supported 145 | ;; spacemacs settings. 146 | (setq-default 147 | ;; If non-nil then enable support for the portable dumper. You'll need 148 | ;; to compile Emacs 27 from source following the instructions in file 149 | ;; EXPERIMENTAL.org at to root of the git repository. 150 | ;; (default nil) 151 | dotspacemacs-enable-emacs-pdumper nil 152 | 153 | ;; Name of executable file pointing to emacs 27+. This executable must be 154 | ;; in your PATH. 155 | ;; (default "emacs") 156 | dotspacemacs-emacs-pdumper-executable-file "emacs" 157 | 158 | ;; Name of the Spacemacs dump file. This is the file will be created by the 159 | ;; portable dumper in the cache directory under dumps sub-directory. 160 | ;; To load it when starting Emacs add the parameter `--dump-file' 161 | ;; when invoking Emacs 27.1 executable on the command line, for instance: 162 | ;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp 163 | ;; (default spacemacs-27.1.pdmp) 164 | dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version) 165 | 166 | ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's 167 | ;; possible. Set it to nil if you have no way to use HTTPS in your 168 | ;; environment, otherwise it is strongly recommended to let it set to t. 169 | ;; This variable has no effect if Emacs is launched with the parameter 170 | ;; `--insecure' which forces the value of this variable to nil. 171 | ;; (default t) 172 | dotspacemacs-elpa-https t 173 | 174 | ;; Maximum allowed time in seconds to contact an ELPA repository. 175 | ;; (default 5) 176 | dotspacemacs-elpa-timeout 5 177 | 178 | ;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes. 179 | ;; This is an advanced option and should not be changed unless you suspect 180 | ;; performance issues due to garbage collection operations. 181 | ;; (default '(100000000 0.1)) 182 | dotspacemacs-gc-cons '(100000000 0.1) 183 | 184 | ;; Set `read-process-output-max' when startup finishes. 185 | ;; This defines how much data is read from a foreign process. 186 | ;; Setting this >= 1 MB should increase performance for lsp servers 187 | ;; in emacs 27. 188 | ;; (default (* 1024 1024)) 189 | dotspacemacs-read-process-output-max (* 1024 1024) 190 | 191 | ;; If non-nil then Spacelpa repository is the primary source to install 192 | ;; a locked version of packages. If nil then Spacemacs will install the 193 | ;; latest version of packages from MELPA. (default nil) 194 | dotspacemacs-use-spacelpa nil 195 | 196 | ;; If non-nil then verify the signature for downloaded Spacelpa archives. 197 | ;; (default t) 198 | dotspacemacs-verify-spacelpa-archives t 199 | 200 | ;; If non-nil then spacemacs will check for updates at startup 201 | ;; when the current branch is not `develop'. Note that checking for 202 | ;; new versions works via git commands, thus it calls GitHub services 203 | ;; whenever you start Emacs. (default nil) 204 | dotspacemacs-check-for-update nil 205 | 206 | ;; If non-nil, a form that evaluates to a package directory. For example, to 207 | ;; use different package directories for different Emacs versions, set this 208 | ;; to `emacs-version'. (default 'emacs-version) 209 | dotspacemacs-elpa-subdirectory 'emacs-version 210 | 211 | ;; One of `vim', `emacs' or `hybrid'. 212 | ;; `hybrid' is like `vim' except that `insert state' is replaced by the 213 | ;; `hybrid state' with `emacs' key bindings. The value can also be a list 214 | ;; with `:variables' keyword (similar to layers). Check the editing styles 215 | ;; section of the documentation for details on available variables. 216 | ;; (default 'vim) 217 | dotspacemacs-editing-style 'vim 218 | 219 | ;; If non-nil show the version string in the Spacemacs buffer. It will 220 | ;; appear as (spacemacs version)@(emacs version) 221 | ;; (default t) 222 | dotspacemacs-startup-buffer-show-version t 223 | 224 | ;; Specify the startup banner. Default value is `official', it displays 225 | ;; the official spacemacs logo. An integer value is the index of text 226 | ;; banner, `random' chooses a random text banner in `core/banners' 227 | ;; directory. A string value must be a path to an image format supported 228 | ;; by your Emacs build. 229 | ;; If the value is nil then no banner is displayed. (default 'official) 230 | dotspacemacs-startup-banner nil 231 | 232 | ;; List of items to show in startup buffer or an association list of 233 | ;; the form `(list-type . list-size)`. If nil then it is disabled. 234 | ;; Possible values for list-type are: 235 | ;; `recents' `bookmarks' `projects' `agenda' `todos'. 236 | ;; List sizes may be nil, in which case 237 | ;; `spacemacs-buffer-startup-lists-length' takes effect. 238 | dotspacemacs-startup-lists '((recents . 5) 239 | (projects . 7)) 240 | 241 | ;; True if the home buffer should respond to resize events. (default t) 242 | dotspacemacs-startup-buffer-responsive t 243 | 244 | ;; Default major mode for a new empty buffer. Possible values are mode 245 | ;; names such as `text-mode'; and `nil' to use Fundamental mode. 246 | ;; (default `text-mode') 247 | dotspacemacs-new-empty-buffer-major-mode 'text-mode 248 | 249 | ;; Default major mode of the scratch buffer (default `text-mode') 250 | dotspacemacs-scratch-mode 'text-mode 251 | 252 | ;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!" 253 | ;; (default nil) 254 | dotspacemacs-initial-scratch-message nil 255 | 256 | ;; List of themes, the first of the list is loaded when spacemacs starts. 257 | ;; Press `SPC T n' to cycle to the next theme in the list (works great 258 | ;; with 2 themes variants, one dark and one light) 259 | dotspacemacs-themes '(spacemacs-dark 260 | spacemacs-light) 261 | 262 | ;; Set the theme for the Spaceline. Supported themes are `spacemacs', 263 | ;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The 264 | ;; first three are spaceline themes. `doom' is the doom-emacs mode-line. 265 | ;; `vanilla' is default Emacs mode-line. `custom' is a user defined themes, 266 | ;; refer to the DOCUMENTATION.org for more info on how to create your own 267 | ;; spaceline theme. Value can be a symbol or list with additional properties. 268 | ;; (default '(spacemacs :separator wave :separator-scale 1.5)) 269 | dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5) 270 | 271 | ;; If non-nil the cursor color matches the state color in GUI Emacs. 272 | ;; (default t) 273 | dotspacemacs-colorize-cursor-according-to-state t 274 | 275 | ;; Default font or prioritized list of fonts. 276 | dotspacemacs-default-font '("Source Code Pro" 277 | :size 14 278 | :weight normal 279 | :width normal 280 | :powerline-scale 1.1) 281 | ;; The leader key 282 | dotspacemacs-leader-key "SPC" 283 | 284 | ;; The key used for Emacs commands `M-x' (after pressing on the leader key). 285 | ;; (default "SPC") 286 | dotspacemacs-emacs-command-key "SPC" 287 | 288 | ;; The key used for Vim Ex commands (default ":") 289 | dotspacemacs-ex-command-key ":" 290 | 291 | ;; The leader key accessible in `emacs state' and `insert state' 292 | ;; (default "M-m") 293 | dotspacemacs-emacs-leader-key "M-m" 294 | 295 | ;; Major mode leader key is a shortcut key which is the equivalent of 296 | ;; pressing ` m`. Set it to `nil` to disable it. (default ",") 297 | dotspacemacs-major-mode-leader-key "," 298 | 299 | ;; Major mode leader key accessible in `emacs state' and `insert state'. 300 | ;; (default "C-M-m" for terminal mode, "" for GUI mode). 301 | ;; Thus M-RET should work as leader key in both GUI and terminal modes. 302 | ;; C-M-m also should work in terminal mode, but not in GUI mode. 303 | dotspacemacs-major-mode-emacs-leader-key (if window-system "" "C-M-m") 304 | 305 | ;; These variables control whether separate commands are bound in the GUI to 306 | ;; the key pairs `C-i', `TAB' and `C-m', `RET'. 307 | ;; Setting it to a non-nil value, allows for separate commands under `C-i' 308 | ;; and TAB or `C-m' and `RET'. 309 | ;; In the terminal, these pairs are generally indistinguishable, so this only 310 | ;; works in the GUI. (default nil) 311 | dotspacemacs-distinguish-gui-tab t 312 | 313 | ;; Name of the default layout (default "Default") 314 | dotspacemacs-default-layout-name "Default" 315 | 316 | ;; If non-nil the default layout name is displayed in the mode-line. 317 | ;; (default nil) 318 | dotspacemacs-display-default-layout nil 319 | 320 | ;; If non-nil then the last auto saved layouts are resumed automatically upon 321 | ;; start. (default nil) 322 | dotspacemacs-auto-resume-layouts nil 323 | 324 | ;; If non-nil, auto-generate layout name when creating new layouts. Only has 325 | ;; effect when using the "jump to layout by number" commands. (default nil) 326 | dotspacemacs-auto-generate-layout-names nil 327 | 328 | ;; Size (in MB) above which spacemacs will prompt to open the large file 329 | ;; literally to avoid performance issues. Opening a file literally means that 330 | ;; no major mode or minor modes are active. (default is 1) 331 | dotspacemacs-large-file-size 1 332 | 333 | ;; Location where to auto-save files. Possible values are `original' to 334 | ;; auto-save the file in-place, `cache' to auto-save the file to another 335 | ;; file stored in the cache directory and `nil' to disable auto-saving. 336 | ;; (default 'cache) 337 | dotspacemacs-auto-save-file-location 'cache 338 | 339 | ;; Maximum number of rollback slots to keep in the cache. (default 5) 340 | dotspacemacs-max-rollback-slots 5 341 | 342 | ;; If non-nil, the paste transient-state is enabled. While enabled, after you 343 | ;; paste something, pressing `C-j' and `C-k' several times cycles through the 344 | ;; elements in the `kill-ring'. (default nil) 345 | dotspacemacs-enable-paste-transient-state nil 346 | 347 | ;; Which-key delay in seconds. The which-key buffer is the popup listing 348 | ;; the commands bound to the current keystroke sequence. (default 0.4) 349 | dotspacemacs-which-key-delay 1 350 | 351 | ;; Which-key frame position. Possible values are `right', `bottom' and 352 | ;; `right-then-bottom'. right-then-bottom tries to display the frame to the 353 | ;; right; if there is insufficient space it displays it at the bottom. 354 | ;; (default 'bottom) 355 | dotspacemacs-which-key-position 'bottom 356 | 357 | ;; Control where `switch-to-buffer' displays the buffer. If nil, 358 | ;; `switch-to-buffer' displays the buffer in the current window even if 359 | ;; another same-purpose window is available. If non-nil, `switch-to-buffer' 360 | ;; displays the buffer in a same-purpose window even if the buffer can be 361 | ;; displayed in the current window. (default nil) 362 | dotspacemacs-switch-to-buffer-prefers-purpose nil 363 | 364 | ;; If non-nil a progress bar is displayed when spacemacs is loading. This 365 | ;; may increase the boot time on some systems and emacs builds, set it to 366 | ;; nil to boost the loading time. (default t) 367 | dotspacemacs-loading-progress-bar nil 368 | 369 | ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil) 370 | ;; (Emacs 24.4+ only) 371 | dotspacemacs-fullscreen-at-startup nil 372 | 373 | ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen. 374 | ;; Use to disable fullscreen animations in OSX. (default nil) 375 | dotspacemacs-fullscreen-use-non-native nil 376 | 377 | ;; If non-nil the frame is maximized when Emacs starts up. 378 | ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. 379 | ;; (default nil) (Emacs 24.4+ only) 380 | dotspacemacs-maximized-at-startup nil 381 | 382 | ;; If non-nil the frame is undecorated when Emacs starts up. Combine this 383 | ;; variable with `dotspacemacs-maximized-at-startup' in OSX to obtain 384 | ;; borderless fullscreen. (default nil) 385 | dotspacemacs-undecorated-at-startup nil 386 | 387 | ;; A value from the range (0..100), in increasing opacity, which describes 388 | ;; the transparency level of a frame when it's active or selected. 389 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 390 | dotspacemacs-active-transparency 90 391 | 392 | ;; A value from the range (0..100), in increasing opacity, which describes 393 | ;; the transparency level of a frame when it's inactive or deselected. 394 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 395 | dotspacemacs-inactive-transparency 90 396 | 397 | ;; If non-nil show the titles of transient states. (default t) 398 | dotspacemacs-show-transient-state-title t 399 | 400 | ;; If non-nil show the color guide hint for transient state keys. (default t) 401 | dotspacemacs-show-transient-state-color-guide t 402 | 403 | ;; If non-nil unicode symbols are displayed in the mode line. 404 | ;; If you use Emacs as a daemon and wants unicode characters only in GUI set 405 | ;; the value to quoted `display-graphic-p'. (default t) 406 | dotspacemacs-mode-line-unicode-symbols nil 407 | 408 | ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth 409 | ;; scrolling overrides the default behavior of Emacs which recenters point 410 | ;; when it reaches the top or bottom of the screen. (default t) 411 | dotspacemacs-smooth-scrolling t 412 | 413 | ;; Control line numbers activation. 414 | ;; If set to `t', `relative' or `visual' then line numbers are enabled in all 415 | ;; `prog-mode' and `text-mode' derivatives. If set to `relative', line 416 | ;; numbers are relative. If set to `visual', line numbers are also relative, 417 | ;; but lines are only visual lines are counted. For example, folded lines 418 | ;; will not be counted and wrapped lines are counted as multiple lines. 419 | ;; This variable can also be set to a property list for finer control: 420 | ;; '(:relative nil 421 | ;; :visual nil 422 | ;; :disabled-for-modes dired-mode 423 | ;; doc-view-mode 424 | ;; markdown-mode 425 | ;; org-mode 426 | ;; pdf-view-mode 427 | ;; text-mode 428 | ;; :size-limit-kb 1000) 429 | ;; When used in a plist, `visual' takes precedence over `relative'. 430 | ;; (default nil) 431 | dotspacemacs-line-numbers '(:relative t 432 | :size-limit-kb 1000) 433 | 434 | ;; Code folding method. Possible values are `evil' and `origami'. 435 | ;; (default 'evil) 436 | dotspacemacs-folding-method 'evil 437 | 438 | ;; If non-nil `smartparens-strict-mode' will be enabled in programming modes. 439 | ;; (default nil) 440 | dotspacemacs-smartparens-strict-mode nil 441 | 442 | ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes 443 | ;; over any automatically added closing parenthesis, bracket, quote, etc... 444 | ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil) 445 | dotspacemacs-smart-closing-parenthesis nil 446 | 447 | ;; Select a scope to highlight delimiters. Possible values are `any', 448 | ;; `current', `all' or `nil'. Default is `all' (highlight any scope and 449 | ;; emphasis the current one). (default 'all) 450 | dotspacemacs-highlight-delimiters 'current 451 | 452 | ;; If non-nil, start an Emacs server if one is not already running. 453 | ;; (default nil) 454 | dotspacemacs-enable-server t 455 | 456 | ;; Set the emacs server socket location. 457 | ;; If nil, uses whatever the Emacs default is, otherwise a directory path 458 | ;; like \"~/.emacs.d/server\". It has no effect if 459 | ;; `dotspacemacs-enable-server' is nil. 460 | ;; (default nil) 461 | dotspacemacs-server-socket-dir nil 462 | 463 | ;; If non-nil, advise quit functions to keep server open when quitting. 464 | ;; (default nil) 465 | dotspacemacs-persistent-server t 466 | 467 | ;; List of search tool executable names. Spacemacs uses the first installed 468 | ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'. 469 | ;; (default '("rg" "ag" "pt" "ack" "grep")) 470 | dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep") 471 | 472 | ;; Format specification for setting the frame title. 473 | ;; %a - the `abbreviated-file-name', or `buffer-name' 474 | ;; %t - `projectile-project-name' 475 | ;; %I - `invocation-name' 476 | ;; %S - `system-name' 477 | ;; %U - contents of $USER 478 | ;; %b - buffer name 479 | ;; %f - visited file name 480 | ;; %F - frame name 481 | ;; %s - process status 482 | ;; %p - percent of buffer above top of window, or Top, Bot or All 483 | ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All 484 | ;; %m - mode name 485 | ;; %n - Narrow if appropriate 486 | ;; %z - mnemonics of buffer, terminal, and keyboard coding systems 487 | ;; %Z - like %z, but including the end-of-line format 488 | ;; (default "%I@%S") 489 | dotspacemacs-frame-title-format "%I@%S" 490 | 491 | ;; Format specification for setting the icon title format 492 | ;; (default nil - same as frame-title-format) 493 | dotspacemacs-icon-title-format nil 494 | 495 | ;; Delete whitespace while saving buffer. Possible values are `all' 496 | ;; to aggressively delete empty line and long sequences of whitespace, 497 | ;; `trailing' to delete only the whitespace at end of lines, `changed' to 498 | ;; delete only whitespace for changed lines or `nil' to disable cleanup. 499 | ;; (default nil) 500 | dotspacemacs-whitespace-cleanup 'all 501 | 502 | ;; If non nil activate `clean-aindent-mode' which tries to correct 503 | ;; virtual indentation of simple modes. This can interfer with mode specific 504 | ;; indent handling like has been reported for `go-mode'. 505 | ;; If it does deactivate it here. 506 | ;; (default t) 507 | dotspacemacs-use-clean-aindent-mode t 508 | 509 | ;; Either nil or a number of seconds. If non-nil zone out after the specified 510 | ;; number of seconds. (default nil) 511 | dotspacemacs-zone-out-when-idle nil 512 | 513 | ;; Run `spacemacs/prettify-org-buffer' when 514 | ;; visiting README.org files of Spacemacs. 515 | ;; (default nil) 516 | dotspacemacs-pretty-docs nil)) 517 | 518 | (defun dotspacemacs/user-env () 519 | "Environment variables setup. 520 | This function defines the environment variables for your Emacs session. By 521 | default it calls `spacemacs/load-spacemacs-env' which loads the environment 522 | variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'. 523 | See the header of this file for more information." 524 | (spacemacs/load-spacemacs-env)) 525 | 526 | (defun dotspacemacs/user-config () 527 | "Initialization for user code: 528 | This function is called immediately after `dotspacemacs/init', before layer 529 | configuration. 530 | It is mostly for variables that should be set before packages are loaded. 531 | If you are unsure, try setting them in `dotspacemacs/user-config' first." 532 | (global-git-commit-mode t) 533 | ;; (global-set-key (kbd "C-x k") 'kill-this-buffer) 534 | (setq browse-url-generic-program "firefox") 535 | (setq multi-term-program "/usr/bin/zsh") 536 | (setq browse-url-browser-function 'browse-url-firefox) 537 | (setq mouse-yank-at-point t) 538 | (setq require-final-newline t) 539 | (setq tags-add-tables nil) 540 | (setq auto-completion-private-snippets-directory "~/.emacs.d/elpa/yasnippet-snippets-20200410.1128/snippets") 541 | (setq warning-minimum-level :error) 542 | 543 | ;; make emacs don't cut words on _ 544 | (add-hook 'prog-mode-hook #'(lambda () (modify-syntax-entry ?_ "w"))) 545 | 546 | ;; do not create .# files 547 | (setq create-lockfiles nil) 548 | 549 | ;; disable smartparents gracefully 550 | ;; https://github.com/syl20bnr/spacemacs/issues/6144#issuecomment-251979196 551 | (with-eval-after-load 'smartparens 552 | '(progn 553 | (sp-pair "(" nil :actions :rem) 554 | (sp-pair "[" nil :actions :rem) 555 | (sp-pair "'" nil :actions :rem) 556 | (sp-pair "\"" nil :actions :rem))) 557 | 558 | ;; automatically create TAGS in your project 559 | (setq ctags-update-prompt-create-tags t) 560 | (setq ctags-update-delay-seconds (* 30 60)) 561 | 562 | ;; (with-eval-after-load 'ctags-update 563 | ;; (add-to-list 'ctags-update-other-options "--gtagslabel=pygments") 564 | ;; ) 565 | 566 | (add-hook 'after-save-hook 'helm-backup-versioning) 567 | 568 | ;; exec-path-from-shell 569 | (exec-path-from-shell-copy-env "SSH_AGENT_PID") 570 | (exec-path-from-shell-copy-env "SSH_AUTH_SOCK") 571 | 572 | (with-eval-after-load 'flycheck 573 | (setq flycheck-disabled-checkers '(python-mypy)) 574 | (setq flycheck-highlighting-mode nil) 575 | (setq flycheck-check-syntax-automatically '(save idle-change)) 576 | (setq flycheck-idle-change-delay 1.5) 577 | (setq flycheck-checker-error-threshold 25) 578 | ) 579 | 580 | (spacemacs/toggle-automatic-symbol-highlight-on) 581 | (spacemacs/toggle-indent-guide-globally-on) 582 | (rainbow-delimiters-mode t) 583 | 584 | (setq vr/engine 'python) 585 | ;; limit number of matches shown in visual feedback 586 | (setq vr/default-feedback-limit 100) 587 | 588 | (with-eval-after-load 'python-mode 589 | (highlight-operators-mode t) 590 | ;; do not use double spaces when formatting text 591 | (setq python-docstring-sentence-end-double-space nil) 592 | (add-hook 'prog-mode-hook 'hl-todo-mode) 593 | (add-hook 'python-mode-hook 'sphinx-doc-mode) 594 | (add-hook 'python-mode-hook 'python-docstring-mode) 595 | ;; (add-hook 'python-mode-hook 'turn-on-ctags-auto-update-mode) 596 | ) 597 | 598 | (setq git-link-use-commit t) 599 | (setq git-link-open-in-browser nil) 600 | 601 | ;; try to show differences as diff-highlight (yeah, it's kind of poor) 602 | (setq magit-diff-refine-hunk t) 603 | ;; sort listing of refs by creator date (e.g. branch listing) 604 | (setq magit-list-refs-sortby "-creatordate") 605 | ;; open magit in full screen 606 | (setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1) 607 | 608 | ;; do not list submodule files 609 | (setq projectile-git-submodule-command nil) 610 | 611 | ;; expand column width in helm to show the full name of the file 612 | ;; https://github.com/emacs-helm/helm/issues/514#issuecomment-418015625 613 | (setq helm-buffer-max-length 60) 614 | 615 | ;; avoid asking to follow a symbolic link in VCS 616 | (setq vc-follow-symlinks t) 617 | 618 | ;; sorting only works with 'native 619 | ;; (setq projectile-indexing-method 'native) 620 | ;; (setq projectile-sort-order 'recently-active) 621 | 622 | (add-to-list 'auto-mode-alist '("\\.po\\'" . po-mode)) 623 | ) 624 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | Emacs Configuration 3 | ===================== 4 | 5 | 6 | I used to have a very customized Emacs configuration with lot of packages, 7 | hotkeys, custom variables and a lot of things. 8 | 9 | Then, one day, I met Spacemacs_. Basically, it is *exactly what I had* but 10 | better and **maintained by other people**. 11 | 12 | .. _Spacemacs: https://www.spacemacs.org/ 13 | 14 | 15 | *NOTE: there is other branches in this repository with the old configurations, 16 | in case you care about them or you want to know a specific variable/function 17 | that I was using* 18 | --------------------------------------------------------------------------------