[emacs] Bump to latest spacemacs
This commit is contained in:
parent
0237313431
commit
30eb16e869
|
@ -159,6 +159,7 @@ the [[file:CHANGELOG.org][CHANGELOG.org]] file.
|
|||
- Key bindings;
|
||||
- Changed ~SPC m p t~ to ~SPC m t F~ for =alchemist-project-find-test=
|
||||
(thanks to Lyuben Petrov)
|
||||
- Remove flycheck-mix-compile in favour of alchemist and lsp syntax checking
|
||||
***** Git
|
||||
- Improvements:
|
||||
- Adapted configuration to new transient commands of Magit (thanks to bmag)
|
||||
|
@ -345,6 +346,7 @@ sane way, here is the complete list of changed key bindings
|
|||
- dart (thanks to Bruno Tavares)
|
||||
- dhall (thanks to Colin Woodbury)
|
||||
- elasticsearch (thanks to Jean Rigotti)
|
||||
- extempore (thanks to Ben Swift)
|
||||
- factor (thanks to timor)
|
||||
- forth (thanks to Tim Jaeger)
|
||||
- gpu (thanks to Evan Klitzke)
|
||||
|
@ -453,6 +455,8 @@ sane way, here is the complete list of changed key bindings
|
|||
- New variable =dotspacemacs-undecorated-at-startup= (thanks to bb2020)
|
||||
- New variable =dotspacemacs-startup-buffer-show-version=
|
||||
(thanks to Zach Pearson)
|
||||
- New variable =dotspacemacs-read-process-output-max= to optimise lsp
|
||||
performance in emacs 27 (thanks to Maximilian Wolff)
|
||||
- Removed Variables:
|
||||
- Removed unused variable =dotspacemacs-verbose-loading= from
|
||||
=.spacemacs.template= (thanks to Ying Qu)
|
||||
|
@ -562,6 +566,8 @@ Other:
|
|||
(thanks to Nikita Leshenko)
|
||||
- Open Spacemacs home buffer in other/new window with prefix argument
|
||||
(thanks to duianto)
|
||||
- Add =emacs-version= to the default value for
|
||||
=dotspacemacs-emacs-dumper-dump-file= (thanks to Evan Klitzke)
|
||||
- Fixes:
|
||||
- Avoid non-idempotent use of push in init code (thanks to Miciah Masters)
|
||||
- Moved Spacemacs startup progress bar to =core-progress-bar.el=, removed
|
||||
|
@ -656,6 +662,8 @@ Other:
|
|||
- Replace =spacemacs/close-compilation-window= with
|
||||
=spacemacs/show-hide-compilation-window= (thanks to Hans Jang)
|
||||
- Avoid unnecessary packages installation of tern layer
|
||||
- Fixed terminal mode line indicator overlapping (thanks to duianto)
|
||||
- Fixed broken --timed-requires and --adv-timers under Emacs 27 and above (thanks to Ying Qu)
|
||||
- Other:
|
||||
- New function =configuration-layer/message= to display message in
|
||||
=*Messages*= buffer (thanks to Sylvain Benner)
|
||||
|
@ -1157,6 +1165,10 @@ Other:
|
|||
(thanks to Andriy Kmit)
|
||||
- Improved google-translate for set source language to "auto" and
|
||||
select target language interactively (thanks to Lin Sun)
|
||||
- Allowed users to specify layout local variables (thanks to CeleritasCelery, fauxsoup)
|
||||
- Refactor +layers/+tools packages to use prefix ~at~
|
||||
migrating most key bindings to lower cases and
|
||||
expanding room for further aliases (thanks to John Stevenson)
|
||||
- Fixed:
|
||||
- Fixed ~h~ key binding in compilation and grep buffers
|
||||
(thanks to Sylvain Benner)
|
||||
|
@ -1304,6 +1316,7 @@ Other:
|
|||
(thanks to Muneeb Shaikh)
|
||||
- Fixed ~SPC h f~ =helm-spacemacs-help-faq= (thanks to duianto)
|
||||
- Fixed =cl= package deprecated =letf= (thanks to duianto)
|
||||
- Fixed origami bindings in normal mode (thanks to Tomasz Kowal)
|
||||
*** Layer changes and fixes
|
||||
**** Agda
|
||||
- Fixes
|
||||
|
@ -1427,6 +1440,7 @@ Other:
|
|||
**** Cfengine
|
||||
- New packages:
|
||||
- Added =ob-cfengine3= (thanks to Nick Anderson)
|
||||
- Added =mustache-mode=
|
||||
- Improvements:
|
||||
- Configure =org-babel= for =cfengine= source blocks
|
||||
(thanks to Sylvain Benner)
|
||||
|
@ -1855,6 +1869,9 @@ Other:
|
|||
=evil-snipe-override-mode= is enabled (thanks to Sylvain Benner)
|
||||
**** Factor
|
||||
- Misc fixes for factor version 0.98 (thanks to timor)
|
||||
- Support running graphical Factor listener instances from Spacemacs
|
||||
- Support reloading factor-mode/fuel-mode code when connecting to different
|
||||
Factor versions
|
||||
**** Finance
|
||||
- Remove key-bindings pointing to removed commands (thanks to Alexander Baier)
|
||||
- Added =evil-ledger= package (thanks to Alexander Miller)
|
||||
|
@ -1991,6 +2008,8 @@ Other:
|
|||
- Make flycheck disable checkers covered by golangci (thanks to zhuoyikang)
|
||||
- Updated build instructions for =golangci-lint= (thanks to pancho horrillo)
|
||||
- Added =dap-go= integration (ljupchokotev)
|
||||
- Added =go-run-command= variable (thanks to Jay Z)
|
||||
- Added =go-test-command= variable (thanks to Jay Z)
|
||||
- Key bindings
|
||||
- =godoctor= key bindings (thanks to TinySong and Eivind Fonn):
|
||||
- ~SPC m r n~ to rename
|
||||
|
@ -2383,6 +2402,8 @@ Other:
|
|||
- Fixed key remapping after =cl= package deprecation (thanks to Damien Picard)
|
||||
- Fixed =bepo= layout, commented out broken evil-window :common bindings
|
||||
(thanks to CharlesHD)
|
||||
- Added evil-lisp-state mapping (thanks to Damien Picard)
|
||||
- Added ediff mapping (thanks to iv-nn)
|
||||
**** Kivy
|
||||
- Added the =kivy= package (thanks to Nasser Alshammari and Ryota Kayanuma)
|
||||
**** LaTeX
|
||||
|
@ -2401,6 +2422,7 @@ Other:
|
|||
- Fixed README to say auto-fill on by default. (thanks to Max Willsey)
|
||||
- Added ConTeXt mode to the key bindings (thanks to ft)
|
||||
- Fixed ~SPC m ;~ binding (thanks to Tianshu Wang)
|
||||
- Fix jump handlers setup and use dumb-jump as default (thanks to Matt Kramer)
|
||||
**** Lua
|
||||
- Added support for auto-completion with =company= (thanks to halfcrazy)
|
||||
- Added support for =LSP= (EmmyLua-LS-all) (thanks to Lin.Sun)
|
||||
|
@ -2772,6 +2794,8 @@ Other:
|
|||
=hyper=, =super= or =alt= (thanks to Binbin Ye)
|
||||
- Added a layer variable =osx-swap-option-and-command= defaults to =nil=
|
||||
(thanks to Binbin Ye)
|
||||
- Enabled GNU =gls= support in dired without requiring
|
||||
=exec-path-from-shell= (thanks to Aaron Zeng)
|
||||
**** Pandoc
|
||||
- Fixed =spacemacs/run-pandoc= not to reset =pandoc--local-settings=
|
||||
(thanks to martian-f)
|
||||
|
@ -2909,6 +2933,8 @@ Other:
|
|||
**** Racket
|
||||
- Restore smart closing paren behavior in racket-mode (thanks to Don March)
|
||||
- Updated racket logo (thanks to Vityou)
|
||||
- Add racket-xp-mode to Racket layer (thanks to Shrutarshi Basu)
|
||||
- Correctly switch to insert state in REPL
|
||||
**** Ranger
|
||||
- Key bindings:
|
||||
- Added ~j D~ to jump other window (thanks to Rich Alesi)
|
||||
|
@ -3077,6 +3103,9 @@ Other:
|
|||
- Disabled =sbt-supershell= in =sbt-mode= (thanks to Rodolfo Hansen)
|
||||
- Enable new DAP and lsp-treemacs integration via metals
|
||||
(thanks to Rodolfo Hansen)
|
||||
- Turned off ability to convert to Unicode arrows deprecated in Scala (and remove
|
||||
=scala-use-unicode-arrows= variable) (thanks to Keith Pinson)
|
||||
- Added =lsp-metals= and remove broken =lsp-treemacs= initialization (Bjarke Vad Andersen)
|
||||
**** Scheme
|
||||
- Added missing =parinfer= package declaration (thanks to Kalle Lindqvist)
|
||||
- Update install docs for Chicken 5 changes (thanks to Grant Shangreaux)
|
||||
|
@ -3120,6 +3149,8 @@ Other:
|
|||
(thanks to Paweł Siudak)
|
||||
- Restore =auto-completion-idle-delay= value for =company-idle-delay=
|
||||
(thanks to Miciah Dashiel Butler Masters)
|
||||
- Added =auto-completion-minimum-prefix-length= layer variable
|
||||
(thanks to Maximilian Wolff)
|
||||
- Added =shell-default-width= layer variable (thanks to David Balatero)
|
||||
- Function =resize-shell-to-desired-width= check for shell buffer before
|
||||
changing size (thanks to thanhvg)
|
||||
|
@ -3144,6 +3175,13 @@ Other:
|
|||
movement in term shells on emacs 26.1
|
||||
- Stopped the cursor from jumping to =point-max= when entering insert state from
|
||||
a multi line (thanks to Steven Allen)
|
||||
- Prevented =shell-pop-out= from restoring a dead buffer or window
|
||||
(thanks to CeleritasCelery, fauxsoup)
|
||||
- Made =pop-shell= layout local (thanks to CeleritasCelery, fauxsoup)
|
||||
- Checked that the following are bound in =spacemacs-base=:
|
||||
- variable: =layouts-enable-local-variables=
|
||||
- function: =spacemacs/make-variable-layout-local=
|
||||
(thanks to JAremko and duianto)
|
||||
**** Shell Scripts
|
||||
- Added new company-shell environment variable backend
|
||||
(thanks to Alexander-Miller)
|
||||
|
@ -3180,6 +3218,7 @@ Other:
|
|||
- Install orgit only when org package is used (thanks to Boris Buliga)
|
||||
- Defer git-gutter loading (thanks to Aaron Jensen)
|
||||
- Remove redundant arg from git-gutter timer (thanks to bmag)
|
||||
- Added Git Blame Transient State (thanks to duianto)
|
||||
**** Spotify
|
||||
- Replaced helm-spotify package with helm-spotify-plus
|
||||
(thanks to Leonard Lausen)
|
||||
|
@ -3244,6 +3283,7 @@ Other:
|
|||
- Added opt-in layer variable =terraform-fmt-on-save= to format buffers on save
|
||||
with =terraform fmt= (thanks to Harry Hull)
|
||||
- Added support for =terraform-company= (thanks to Sylvain Benner)
|
||||
- Added LSP support for terraform-lsp
|
||||
**** Templates
|
||||
- Fixed issue with templates layer ignoring =templates-private-directory=
|
||||
(thanks to Seong Yong-ju)
|
||||
|
@ -3280,6 +3320,7 @@ Other:
|
|||
- Updated =doom-themes= list to reflect upstream
|
||||
(thanks to Dominic Pearson, Muneeb Shaikh)
|
||||
- Added highly accessible =modus-themes= (thanks to Muneeb Shaikh)
|
||||
- Added =doom-gruvbox-light= theme (thanks to John Stevenson)
|
||||
**** Tmux
|
||||
- Prevent =tmux-command= at GUI mode (thanks to Isaac Zeng)
|
||||
- Fixed regression in tmux by setting keybindings using =use-package=
|
||||
|
@ -3465,8 +3506,8 @@ Other:
|
|||
Sunghyun Hwang, Swaroop C H, Sylvain Benner, Szunti, Thijs Vermeir, Tianyi
|
||||
Wang, Tim Stewart, timor, TinySong, Titov Andrey, Thomas de Beauchêne, Tomasz
|
||||
Cichocinski, Trey Merkley, tzhao11, Vincent Taing, Ullas Holla, Vlad Bokov,
|
||||
Vladimir Kochnev, wenpin, Wieland Hoffmann, Witoslaw Koczewski, Xiang Ji, Yi
|
||||
Liu, Zach Latta, Zane Sterling, zer09, Zhige Xin)
|
||||
Vladimir Kochnev, weihua-lu, wenpin, Wieland Hoffmann, Witoslaw Koczewski,
|
||||
Xiang Ji, Yi Liu, Zach Latta, Zane Sterling, zer09, Zhige Xin)
|
||||
**** Documentation and website
|
||||
- DOCUMENTATION.org:
|
||||
- Fixed the example for how to change the separator style
|
||||
|
|
|
@ -161,7 +161,12 @@ This might also be true for other linux distributions.
|
|||
|
||||
```
|
||||
brew tap d12frosted/emacs-plus
|
||||
# to install Emacs 26
|
||||
brew install emacs-plus
|
||||
# or to install Emacs 27
|
||||
brew install emacs-plus@27 --with-spacemacs-icon
|
||||
# or to install Emacs 28
|
||||
brew install emacs-plus@28 --with-spacemacs-icon
|
||||
brew link emacs-plus
|
||||
```
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ seconds to load")
|
|||
(profiler-report)
|
||||
(profiler-stop))))))
|
||||
|
||||
(when (version<= "27.0" emacs-version)
|
||||
(require 'time-date))
|
||||
(when spacemacs-debug-with-timed-requires
|
||||
(with-current-buffer (get-buffer-create "*load-times*")
|
||||
(insert (format "Threshold set at %.3f seconds\n\n"
|
||||
|
|
|
@ -66,18 +66,25 @@ EXPERIMENTAL.org at to root of the git repository.")
|
|||
(defvar dotspacemacs-emacs-pdumper-executable-file "emacs"
|
||||
"File path pointing to emacs 27 or later executable.")
|
||||
|
||||
(defvar dotspacemacs-emacs-dumper-dump-file "spacemacs.pdmp"
|
||||
(defvar dotspacemacs-emacs-dumper-dump-file
|
||||
(format "spacemacs-%s.pdmp" emacs-version)
|
||||
"Name of the Spacemacs dump file. This is the file will be created by the
|
||||
portable dumper in the cache directory under dumps sub-directory.
|
||||
To load it when starting Emacs add the parameter `--dump-file'
|
||||
when invoking Emacs 27.1 executable on the command line, for instance:
|
||||
./emacs --dump-file=/Users/sylvain/.emacs.d/.cache/dumps/spacemacs.pdmp")
|
||||
./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp")
|
||||
|
||||
(defvar dotspacemacs-gc-cons '(100000000 0.1)
|
||||
"Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
|
||||
This is an advanced option and should not be changed unless you suspect
|
||||
performance issues due to garbage collection operations.")
|
||||
|
||||
(defvar dotspacemacs-read-process-output-max (* 1024 1024)
|
||||
"Set `read-process-output-max' when startup finishes.
|
||||
This defines how much data is read from a foreign process.
|
||||
Setting this >= 1 MB should increase performance for lsp servers
|
||||
in emacs 27.")
|
||||
|
||||
(defvar dotspacemacs-elpa-https t
|
||||
"If non nil ELPA repositories are contacted via HTTPS whenever it's
|
||||
possible. Set it to nil if you have no way to use HTTPS in your
|
||||
|
|
|
@ -101,6 +101,11 @@ The return value is nil if no font was found, truthy otherwise."
|
|||
`dotspacemacs-mode-line-unicode-symbols'.
|
||||
If ASCII is not provided then UNICODE is used instead. If neither are provided,
|
||||
the mode will not show in the mode line."
|
||||
(when (and unicode
|
||||
(not (display-graphic-p)) ; terminal
|
||||
;; the new indicator is 3 chars (including the space), ex: " Ⓔh"
|
||||
(= (length unicode) 3))
|
||||
(setq unicode (spacemacs/terminal-fix-mode-line-indicator-overlap unicode)))
|
||||
`(let ((cell (assq ',mode spacemacs--diminished-minor-modes)))
|
||||
(if cell
|
||||
(setcdr cell '(,unicode ,ascii))
|
||||
|
|
|
@ -420,4 +420,19 @@ set."
|
|||
(funcall spacemacs--gne-line-func
|
||||
(buffer-substring (point-at-bol) (point-at-eol))))
|
||||
|
||||
(defun spacemacs/terminal-fix-mode-line-indicator-overlap (str)
|
||||
"Add a space between two mode line indicators,
|
||||
to fix an overlapping issue, that occurs when
|
||||
Spacemacs is started in a terminal,
|
||||
and a modes mode line name is diminished to:
|
||||
- A unicode character followed by a non unicode character, ex: \" Ⓔh\"
|
||||
- Or to two unicode characters, ex: \" Ⓔⓗ\""
|
||||
(let ((first-char (substring str 1 2)) ; first char after the space
|
||||
second-char)
|
||||
(if (equal (char-charset (string-to-char first-char)) 'unicode)
|
||||
(progn
|
||||
(setq second-char (substring str 2 3)) ; second char after the space
|
||||
(concat first-char " " second-char))
|
||||
str)))
|
||||
|
||||
(provide 'core-funcs)
|
||||
|
|
|
@ -238,6 +238,8 @@ Note: the hooked function is not executed when in dumped mode."
|
|||
(spacemacs/check-for-new-version nil spacemacs-version-check-interval)
|
||||
(setq spacemacs-initialized t)
|
||||
(setq gc-cons-threshold (car dotspacemacs-gc-cons)
|
||||
gc-cons-percentage (cadr dotspacemacs-gc-cons)))))
|
||||
gc-cons-percentage (cadr dotspacemacs-gc-cons))
|
||||
(unless (version< emacs-version "27")
|
||||
(setq read-process-output-max dotspacemacs-read-process-output-max)))))
|
||||
|
||||
(provide 'core-spacemacs)
|
||||
|
|
|
@ -184,6 +184,7 @@
|
|||
(doom-ephemeral . doom-themes)
|
||||
(doom-fairy-floss . doom-themes)
|
||||
(doom-gruvbox . doom-themes)
|
||||
(doom-gruvbox-light . doom-themes)
|
||||
(doom-horizon . doom-themes)
|
||||
(doom-laserwave . doom-themes)
|
||||
(doom-manegarm . doom-themes)
|
||||
|
@ -277,6 +278,9 @@
|
|||
(eziam-light . eziam-theme)
|
||||
(eziam-dark . eziam-theme)
|
||||
(eziam-dusk . eziam-theme)
|
||||
(poet-dark . poet-theme)
|
||||
(poet-monochrome . poet-theme)
|
||||
(poet-dark-monochrome . poet-theme)
|
||||
)
|
||||
"alist matching a theme name with its package name, required when
|
||||
package name does not match theme name + `-theme' suffix.")
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
configuration.
|
||||
|
||||
In order to use this macro the variable `use-package-inject-hooks'
|
||||
must be non-nil.
|
||||
must be non-nil. If it is not a warning will be issued.
|
||||
|
||||
This is useful in the dotfile to override the default configuration
|
||||
of a package.
|
||||
|
|
|
@ -103,9 +103,9 @@ It should only modify the values of Spacemacs settings."
|
|||
;; portable dumper in the cache directory under dumps sub-directory.
|
||||
;; To load it when starting Emacs add the parameter `--dump-file'
|
||||
;; when invoking Emacs 27.1 executable on the command line, for instance:
|
||||
;; ./emacs --dump-file=~/.emacs.d/.cache/dumps/spacemacs.pdmp
|
||||
;; (default spacemacs.pdmp)
|
||||
dotspacemacs-emacs-dumper-dump-file "spacemacs.pdmp"
|
||||
;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp
|
||||
;; (default spacemacs-27.1.pdmp)
|
||||
dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version)
|
||||
|
||||
;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
|
||||
;; possible. Set it to nil if you have no way to use HTTPS in your
|
||||
|
@ -125,6 +125,13 @@ It should only modify the values of Spacemacs settings."
|
|||
;; (default '(100000000 0.1))
|
||||
dotspacemacs-gc-cons '(100000000 0.1)
|
||||
|
||||
;; Set `read-process-output-max' when startup finishes.
|
||||
;; This defines how much data is read from a foreign process.
|
||||
;; Setting this >= 1 MB should increase performance for lsp servers
|
||||
;; in emacs 27.
|
||||
;; (default (* 1024 1024))
|
||||
dotspacemacs-read-process-output-max (* 1024 1024)
|
||||
|
||||
;; If non-nil then Spacelpa repository is the primary source to install
|
||||
;; a locked version of packages. If nil then Spacemacs will install the
|
||||
;; latest version of packages from MELPA. (default nil)
|
||||
|
|
|
@ -3838,6 +3838,7 @@ retested.
|
|||
| 9000th star!!!!!!!!! | [[https://github.com/deb0ch][deb0ch]] |
|
||||
| 10000th star :star: | [[https://github.com/colt365][colt365]] |
|
||||
| 15000th star :star: :star: | [[https://github.com/missingfaktor][missingfaktor]] |
|
||||
| 20000th star! :scream_cat: | [[https://github.com/davehorner][davehorner]] |
|
||||
|
||||
** Gitter chat
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@ jobs:
|
|||
"Validate PR":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:latest
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
steps:
|
||||
- checkout
|
||||
|
@ -67,18 +69,24 @@ jobs:
|
|||
"core Emacs25 (required)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:emacs25
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *steps_core_steps
|
||||
|
||||
"spacemacs-base dist. Emacs25 (required)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:emacs25
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *spacemacs_base_steps
|
||||
|
||||
"spacemacs dist. Emacs25 (required)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:emacs25
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *spacemacs_steps
|
||||
|
||||
|
@ -86,18 +94,24 @@ jobs:
|
|||
"core Emacs26 (required)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:latest
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *steps_core_steps
|
||||
|
||||
"spacemacs-base dist. Emacs26 (required)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:latest
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *spacemacs_base_steps
|
||||
|
||||
"spacemacs dist. Emacs26 (required)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:latest
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *spacemacs_steps
|
||||
|
||||
|
@ -105,24 +119,32 @@ jobs:
|
|||
"core Emacs snapshot (optional)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:emacs-snapshot
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *steps_core_steps
|
||||
|
||||
"spacemacs-base dist. Emacs snapshot (optional)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:emacs-snapshot
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *spacemacs_base_steps
|
||||
|
||||
"spacemacs dist. Emacs snapshot (optional)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:emacs-snapshot
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
<<: *spacemacs_steps
|
||||
|
||||
"CHANGELOG.develop updated (optional)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:latest
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
steps:
|
||||
- checkout
|
||||
|
@ -136,6 +158,8 @@ jobs:
|
|||
"Validate Documentation (required)":
|
||||
docker:
|
||||
- image: jare/spacemacs-circleci:latest
|
||||
environment:
|
||||
BASH_ENV: ".circleci/shared"
|
||||
working_directory: ~/.emacs.d
|
||||
steps:
|
||||
- checkout
|
||||
|
|
|
@ -11,21 +11,14 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${DIR}/shared"
|
||||
|
||||
|
||||
if [[ -z "${CIRCLE_PR_NUMBER// }" ]]; then
|
||||
echo "Skipping PR check for branch update."
|
||||
exit 0
|
||||
fi
|
||||
skip_when_branch_update
|
||||
fail_when_undefined_pr_number
|
||||
|
||||
pr_base=$(curl -s "${pr_data_URL}" | jq '.base.ref')
|
||||
|
||||
if [[ "${pr_base}" == "\"develop\"" ]]; then
|
||||
if [[ "${pr_base}" == "\"${dev_b}\"" ]]; then
|
||||
echo "You are PRing to the develop branch. This is good."
|
||||
exit 0
|
||||
elif [[ "${pr_base}" == "\"master\"" ]]; then
|
||||
elif [[ "${pr_base}" == "\"${mst_b}\"" ]]; then
|
||||
printf '=%.0s' {1..80}
|
||||
printf "\n し(*・∀・)/ Thanks for the contribution! \(・∀・*)ノ\n"
|
||||
printf '=%.0s' {1..80}
|
||||
|
|
|
@ -11,24 +11,20 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${DIR}/shared"
|
||||
skip_when_branch_update
|
||||
|
||||
## This seems to bug out when someone has a CircleCI setup at the source fork.
|
||||
# if [[ -z "${CIRCLE_PR_NUMBER// }" ]]; then
|
||||
# echo "Skipping changelogs check for branch update."
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
if [[ "$CIRCLE_PR_USERNAME" == "emacspace" ]]; then
|
||||
if [[ "$CIRCLE_PR_USERNAME" == "${bot_login}" ]]; then
|
||||
echo "Fun fact. Bots can't climb stairs or update CHANGELOG.develop"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
fail_when_undefined_pr_number
|
||||
|
||||
if grep -q CHANGELOG.develop /tmp/changed_files; then
|
||||
echo "CHANGELOG.develop was updated as required"
|
||||
else
|
||||
echo "Please mention your contribution in CHANGELOG.develop"
|
||||
echo "Please describe your contribution in CHANGELOG.develop"
|
||||
echo "if you want it to be mentioned in the release file."
|
||||
echo "See CONTRIBUTING.org for the details."
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -11,16 +11,10 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${DIR}/shared"
|
||||
|
||||
if [[ -z "${CIRCLE_PR_NUMBER// }" ]]; then
|
||||
echo "Skipping PR rebase check for branch update."
|
||||
exit 0
|
||||
fi
|
||||
skip_when_branch_update
|
||||
fail_when_undefined_pr_number
|
||||
|
||||
upstream_head_sha=$(curl -s "${upstream_data_URL}" | jq '.commit.sha')
|
||||
|
||||
pr_base_sha=$(curl -s "${pr_data_URL}" | jq '.base.sha')
|
||||
|
||||
if [[ "${upstream_head_sha}" == "${pr_base_sha}" ]]; then
|
||||
|
@ -35,8 +29,8 @@ else
|
|||
echo_headline "How to rebase PR(first timer guide):"
|
||||
printf "git remote add upstream "
|
||||
printf "https://github.com/"
|
||||
printf "${CIRCLE_PROJECT_USERNAME}/"
|
||||
printf "${CIRCLE_PROJECT_REPONAME}.git\n"
|
||||
printf "${prj_owner}/"
|
||||
printf "${prj_repo}.git\n"
|
||||
printf "git fetch upstream\n"
|
||||
printf "git rebase upstream/develop\n"
|
||||
printf "git push --force\n"
|
||||
|
|
|
@ -11,18 +11,8 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${DIR}/shared"
|
||||
|
||||
if [[ -z "${CIRCLE_PR_NUMBER// }" ]]; then
|
||||
echo "Skipping documentation validation for branch update."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
pr_patch_URL="https://patch-diff.githubusercontent.com/raw/"
|
||||
pr_patch_URL+="${CIRCLE_PROJECT_USERNAME}/"
|
||||
pr_patch_URL+="${CIRCLE_PROJECT_REPONAME}/pull/"
|
||||
pr_patch_URL+="${CIRCLE_PR_NUMBER}.patch"
|
||||
skip_when_branch_update
|
||||
fail_when_undefined_pr_number
|
||||
|
||||
echo "PATCH_URL: \"${pr_patch_URL}\""
|
||||
|
||||
|
|
|
@ -11,6 +11,24 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
# Vars
|
||||
dev_b="develop"
|
||||
mst_b="master"
|
||||
prj_owner="syl20bnr"
|
||||
prj_repo="spacemacs"
|
||||
bot_login="emacspace"
|
||||
upstream_data_URL_root="https://api.github.com/repos/"
|
||||
upstream_data_URL_root+="${prj_owner}/"
|
||||
upstream_data_URL_root+="${prj_repo}"
|
||||
CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"
|
||||
pr_data_URL="${upstream_data_URL_root}/pulls/${CIRCLE_PR_NUMBER}"
|
||||
upstream_data_URL="${upstream_data_URL_root}/branches/develop"
|
||||
pr_patch_URL="https://patch-diff.githubusercontent.com/raw/"
|
||||
pr_patch_URL+="${prj_owner}/"
|
||||
pr_patch_URL+="${prj_repo}/pull/"
|
||||
pr_patch_URL+="${CIRCLE_PR_NUMBER}.patch"
|
||||
|
||||
# Helpers
|
||||
echo_headline () {
|
||||
printf '=%.0s' {1..80}
|
||||
printf "\n$1\n"
|
||||
|
@ -18,13 +36,33 @@ echo_headline () {
|
|||
echo
|
||||
}
|
||||
|
||||
upstream_data_URL_root="https://api.github.com/repos/"
|
||||
upstream_data_URL_root+="${CIRCLE_PROJECT_USERNAME}/"
|
||||
upstream_data_URL_root+="${CIRCLE_PROJECT_REPONAME}"
|
||||
select_changed_orgs () {
|
||||
changed_f_as_args=()
|
||||
while read p
|
||||
do
|
||||
if [ -f "$p" ]; then
|
||||
if [ ${p: -4} == ".org" ]; then
|
||||
changed_f_as_args+=("${p}")
|
||||
fi
|
||||
fi
|
||||
done </tmp/changed_files
|
||||
}
|
||||
|
||||
pr_data_URL="${upstream_data_URL_root}/pulls/${CIRCLE_PR_NUMBER}"
|
||||
fail_when_undefined_pr_number () {
|
||||
if [[ -z "${CIRCLE_PR_NUMBER// }" ]]; then
|
||||
echo "CircleCI didn't set CIRCLE_PR_NUMBER"
|
||||
echo "nor CIRCLE_PULL_REQUEST."
|
||||
echo "Job restart sometimes helps."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
upstream_data_URL="${upstream_data_URL_root}/branches/develop"
|
||||
skip_when_branch_update () {
|
||||
if [[ "${IS_BRANCH_UPDATE}" == "yes" ]]; then
|
||||
echo "Skipping for branch update."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup () {
|
||||
rm -rf ~/.emacs.d/elpa ~/.emacs.d/.cache -f ~/.spacemacs
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${DIR}/shared"
|
||||
|
||||
cleanup
|
||||
|
||||
testdir=~/.emacs.d/tests/$1
|
||||
|
|
|
@ -11,24 +11,10 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${DIR}/../shared"
|
||||
|
||||
if [[ -z "${CIRCLE_PR_NUMBER// }" ]]; then
|
||||
echo "Skipping documentation validation for branch update."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
changed_f_as_args=()
|
||||
while read p
|
||||
do
|
||||
if [ -f "$p" ]; then
|
||||
if [ ${p: -4} == ".org" ]; then
|
||||
changed_f_as_args+=("${p}")
|
||||
fi
|
||||
fi
|
||||
done </tmp/changed_files
|
||||
skip_when_branch_update
|
||||
fail_when_undefined_pr_number
|
||||
|
||||
select_changed_orgs
|
||||
if [ ${#changed_f_as_args[@]} -ne 0 ]; then
|
||||
emacs -batch -l /opt/spacetools/spacedoc/sdnize/sdnize.el -no-site-file \
|
||||
-q /root/.emacs.d/ /tmp/exported/ \
|
||||
|
|
|
@ -11,24 +11,10 @@
|
|||
##
|
||||
## License: GPLv3
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${DIR}/../shared"
|
||||
|
||||
if [[ -z "${CIRCLE_PR_NUMBER// }" ]]; then
|
||||
echo "Skipping documentation validation for branch update."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
changed_f_as_args=()
|
||||
while read p
|
||||
do
|
||||
if [ -f "$p" ]; then
|
||||
if [ ${p: -4} == ".org" ]; then
|
||||
changed_f_as_args+=("${p}")
|
||||
fi
|
||||
fi
|
||||
done </tmp/changed_files
|
||||
skip_when_branch_update
|
||||
fail_when_undefined_pr_number
|
||||
|
||||
select_changed_orgs
|
||||
if [ ${#changed_f_as_args[@]} -ne 0 ]; then
|
||||
spacedoc validate -c"./.ci/spacedoc-cfg.edn" /tmp/exported/
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
|
@ -53,6 +53,7 @@ projectile-bookmarks.eld
|
|||
projectile.cache
|
||||
python-*-docs-html
|
||||
quickurls
|
||||
racket-mode/
|
||||
semanticdb/
|
||||
server/
|
||||
tmp/
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
- [[#enablingdisabling-tooltips][Enabling/Disabling tooltips]]
|
||||
- [[#disabling-by-default][Disabling by default]]
|
||||
- [[#enable-flycheck-globally][Enable flycheck globally]]
|
||||
- [[#enable-support-for-traditional-error-navigation][Enable support for traditional error navigation]]
|
||||
- [[#bitmaps][Bitmaps]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
|
||||
|
@ -70,6 +71,19 @@ This may result in loading slow or not properly configured checkers
|
|||
as well as break some of the more advanced configuration settings
|
||||
of the layer system.
|
||||
|
||||
** Enable support for traditional error navigation
|
||||
By default spacemacs takes care to call the right function to jump
|
||||
to the next or previous error. However if wished flycheck can also
|
||||
override =next-error= and =previous-error= respectively allowing
|
||||
to use alternative general emacs bindings instead of the spacemacs
|
||||
specific ones. To do so set =syntax-checking-use-standard-error-navigation=
|
||||
to non-nil.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers
|
||||
'((syntax-checking :variables syntax-checking-use-standard-error-navigation t)))
|
||||
#+END_SRC
|
||||
|
||||
** Bitmaps
|
||||
If the original flycheck fringe bitmaps are more to your liking, you can set the
|
||||
variable =syntax-checking-use-original-bitmaps= to =t=:
|
||||
|
|
|
@ -20,5 +20,8 @@
|
|||
(defvar syntax-checking-use-original-bitmaps nil
|
||||
"If non-nil, use the original bitmaps from flycheck.")
|
||||
|
||||
(defvar syntax-checking-use-standard-error-navigation nil
|
||||
"If non-nil hook into emacs standard error navigation")
|
||||
|
||||
;; Command Prefixes
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
(lambda () (when syntax-checking-enable-by-default
|
||||
(global-flycheck-mode 1)))
|
||||
lazy-load-flycheck)
|
||||
(setq flycheck-standard-error-navigation nil
|
||||
(setq flycheck-standard-error-navigation syntax-checking-use-standard-error-navigation
|
||||
flycheck-global-modes nil)
|
||||
;; key bindings
|
||||
(spacemacs/set-leader-keys
|
||||
|
|
|
@ -65,6 +65,10 @@ layer variables:
|
|||
5. =auto-completion-idle-delay= is the number of seconds to wait before suggesting
|
||||
completions. The default value is 0.2 seconds. Set to =nil= to disable
|
||||
automatic suggestions (the ~TAB~ key will still perform completion).
|
||||
Set to 0.0 for optimal results with lsp mode.
|
||||
6. =auto-completion-minimum-prefix-length= is the minimum number of characters
|
||||
which must be entered before completions will be suggested automatically.
|
||||
Set to 1 for optimal results with lsp mode.
|
||||
|
||||
The default configuration of the layer is:
|
||||
|
||||
|
@ -75,6 +79,7 @@ The default configuration of the layer is:
|
|||
auto-completion-tab-key-behavior 'cycle
|
||||
auto-completion-complete-with-key-sequence nil
|
||||
auto-completion-complete-with-key-sequence-delay 0.1
|
||||
auto-completion-minimum-prefix-length 2
|
||||
auto-completion-idle-delay 0.2
|
||||
auto-completion-private-snippets-directory nil
|
||||
auto-completion-enable-snippets-in-popup nil
|
||||
|
|
|
@ -38,6 +38,9 @@ selection.")
|
|||
"Timeout (seconds) when waiting for the second key of
|
||||
`auto-completion-complete-with-key-sequence'.")
|
||||
|
||||
(defvar auto-completion-minimum-prefix-length 2
|
||||
"The minimum prefix length for idle completion.")
|
||||
|
||||
(defvar auto-completion-idle-delay 0.2
|
||||
"Delay (seconds) before completions are shown.")
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
:init
|
||||
(progn
|
||||
(setq company-idle-delay auto-completion-idle-delay
|
||||
company-minimum-prefix-length 2
|
||||
company-minimum-prefix-length auto-completion-minimum-prefix-length
|
||||
company-require-match nil
|
||||
company-dabbrev-ignore-case nil
|
||||
company-dabbrev-downcase nil)
|
||||
|
@ -132,9 +132,9 @@
|
|||
(add-hook 'company-mode-hook 'company-statistics-mode))))
|
||||
|
||||
(defun auto-completion/pre-init-counsel ()
|
||||
(spacemacs|use-package-add-hook company
|
||||
:post-config
|
||||
(define-key company-active-map (kbd "C-/") 'counsel-company)))
|
||||
(spacemacs|use-package-add-hook company
|
||||
:post-config
|
||||
(define-key company-active-map (kbd "C-/") 'counsel-company)))
|
||||
|
||||
(defun auto-completion/init-fuzzy ()
|
||||
(use-package fuzzy :defer t))
|
||||
|
@ -301,11 +301,11 @@
|
|||
(let* ((spacemacs--auto-completion-dir
|
||||
(configuration-layer/get-layer-local-dir 'auto-completion))
|
||||
(emacs-directory-snippets-dir (concat
|
||||
spacemacs-private-directory
|
||||
"snippets/"))
|
||||
spacemacs-private-directory
|
||||
"snippets/"))
|
||||
(spacemacs-layer-snippets-dir (expand-file-name
|
||||
"snippets"
|
||||
spacemacs--auto-completion-dir))
|
||||
"snippets"
|
||||
spacemacs--auto-completion-dir))
|
||||
(dotspacemacs-directory-snippets-dir
|
||||
(when dotspacemacs-directory
|
||||
(let ((snippet-dir (expand-file-name
|
||||
|
|
|
@ -114,8 +114,8 @@ If DEFAULT-INPUTP is non nil then the current region or symbol at point
|
|||
(interactive)
|
||||
(call-interactively
|
||||
(spacemacs//helm-do-search-find-tool "helm-file-do"
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
|
||||
(defun spacemacs/helm-file-smart-do-search-region-or-symbol ()
|
||||
"Search in current file using `dotspacemacs-search-tools' with
|
||||
|
@ -183,8 +183,8 @@ If DEFAULT-INPUTP is non nil then the current region or symbol at point
|
|||
(interactive)
|
||||
(call-interactively
|
||||
(spacemacs//helm-do-search-find-tool "helm-files-do"
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
|
||||
(defun spacemacs/helm-files-smart-do-search-region-or-symbol ()
|
||||
"Search in files using `dotspacemacs-search-tools' with default input.
|
||||
|
@ -247,8 +247,8 @@ If DEFAULT-INPUTP is non nil then the current region or symbol at point
|
|||
(interactive)
|
||||
(call-interactively
|
||||
(spacemacs//helm-do-search-find-tool "helm-dir-do"
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
|
||||
(defun spacemacs/helm-dir-smart-do-search-region-or-symbol ()
|
||||
"Search in current directory using `dotspacemacs-search-tools'.
|
||||
|
@ -313,8 +313,8 @@ If DEFAULT-INPUTP is non nil then the current region or symbol at point
|
|||
(interactive)
|
||||
(call-interactively
|
||||
(spacemacs//helm-do-search-find-tool "helm-buffers-do"
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
dotspacemacs-search-tools
|
||||
default-inputp)))
|
||||
|
||||
(defun spacemacs/helm-buffers-smart-do-search-region-or-symbol ()
|
||||
"Search in opened buffers using `dotspacemacs-search-tools' with
|
||||
|
@ -412,8 +412,8 @@ If DEFAULT-INPUTP is non nil then the current region or symbol at point
|
|||
(let ((projectile-require-project-root nil))
|
||||
(call-interactively
|
||||
(spacemacs//helm-do-search-find-tool "helm-project-do"
|
||||
dotspacemacs-search-tools
|
||||
default-inputp))))
|
||||
dotspacemacs-search-tools
|
||||
default-inputp))))
|
||||
|
||||
(defun spacemacs/helm-project-smart-do-search-region-or-symbol ()
|
||||
"Search in current project using `dotspacemacs-search-tools' with
|
||||
|
@ -577,7 +577,7 @@ to buffers)."
|
|||
(when (>= num-buffers-placed num-windows) (cl-return))
|
||||
(set-window-buffer (winum-get-window-by-number cur-win) buffer)
|
||||
(setq cur-win (+ 1 (mod cur-win num-windows)))
|
||||
(incf num-buffers-placed))))
|
||||
(cl-incf num-buffers-placed))))
|
||||
|
||||
(defun spacemacs/helm-find-buffers-windows ()
|
||||
(interactive)
|
||||
|
@ -600,9 +600,9 @@ to buffers)."
|
|||
(with-current-buffer "*helm ag results*"
|
||||
(setq spacemacs--gne-min-line 5
|
||||
spacemacs--gne-max-line (save-excursion
|
||||
(goto-char (point-max))
|
||||
(previous-line)
|
||||
(line-number-at-pos))
|
||||
(goto-char (point-max))
|
||||
(previous-line)
|
||||
(line-number-at-pos))
|
||||
spacemacs--gne-line-func
|
||||
(lambda (c)
|
||||
(helm-ag--find-file-action
|
||||
|
@ -636,3 +636,12 @@ to buffers)."
|
|||
(interactive)
|
||||
(let ((helm-boring-buffer-regexp-list nil))
|
||||
(call-interactively #'helm-buffers-list)))
|
||||
|
||||
;; Command search ---------------------------------------------------------------------
|
||||
|
||||
(defun spacemacs/helm-M-x-fuzzy-matching ()
|
||||
"Helm M-x with fuzzy matching enabled"
|
||||
(interactive)
|
||||
(let ((completion-styles completion-styles))
|
||||
(add-to-list 'completion-styles `,(if (version< emacs-version "27") 'helm-flex 'flex) t)
|
||||
(command-execute 'helm-M-x)))
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
(evil-ex-define-cmd "buffers" 'helm-buffers-list))
|
||||
;; use helm by default for M-x, C-x C-f, and C-x b
|
||||
(unless (configuration-layer/layer-usedp 'smex)
|
||||
(global-set-key (kbd "M-x") 'helm-M-x))
|
||||
(global-set-key (kbd "M-x") 'spacemacs/helm-M-x-fuzzy-matching))
|
||||
(global-set-key (kbd "C-x C-f") 'spacemacs/helm-find-files)
|
||||
(global-set-key (kbd "C-x b") 'helm-buffers-list)
|
||||
;; use helm everywhere
|
||||
|
@ -122,8 +122,8 @@
|
|||
(kbd "C-c C-e") 'spacemacs/helm-find-files-edit)
|
||||
(defun spacemacs//add-action-helm-find-files-edit ()
|
||||
(helm-add-action-to-source
|
||||
"Edit files in dired `C-c C-e'" 'spacemacs//helm-find-files-edit
|
||||
helm-source-find-files))
|
||||
"Edit files in dired `C-c C-e'" 'spacemacs//helm-find-files-edit
|
||||
helm-source-find-files))
|
||||
(add-hook 'helm-find-files-before-init-hook
|
||||
'spacemacs//add-action-helm-find-files-edit))
|
||||
;; Add minibuffer history with `helm-minibuffer-history'
|
||||
|
@ -151,7 +151,7 @@
|
|||
;; to overwrite any key binding
|
||||
(unless (configuration-layer/layer-usedp 'smex)
|
||||
(spacemacs/set-leader-keys
|
||||
dotspacemacs-emacs-command-key 'helm-M-x)))))
|
||||
dotspacemacs-emacs-command-key 'spacemacs/helm-M-x-fuzzy-matching)))))
|
||||
:config
|
||||
(progn
|
||||
(helm-mode)
|
||||
|
|
|
@ -55,10 +55,10 @@ The `insert state' is replaced by the `emacs state'."
|
|||
:lighter " holy"
|
||||
:group 'spacemacs
|
||||
(if holy-mode
|
||||
(in-nominus-patris-et-filii-et-spiritus-sancti)
|
||||
(in-nomine-patris-et-filii-et-spiritus-sancti)
|
||||
(amen)))
|
||||
|
||||
(defun in-nominus-patris-et-filii-et-spiritus-sancti ()
|
||||
(defun in-nomine-patris-et-filii-et-spiritus-sancti ()
|
||||
"Enter the church of Emacs (wash your hands)."
|
||||
;; make all buffers' initial state emacs
|
||||
(push '("." . emacs) evil-buffer-regexps)
|
||||
|
|
|
@ -415,12 +415,12 @@
|
|||
|
||||
;; SPC b- buffers
|
||||
;; rename the buffer-to-window-1 entry, to 1..9
|
||||
(push '(("\\(.*\\)1" . "buffer-to-window-1") .
|
||||
("\\11..9" . "buffer to window 1..9"))
|
||||
(push '(("\\(.*\\)1" . "Move buffer to window 1") .
|
||||
("\\11..9" . "Move buffer to window 1..9"))
|
||||
which-key-replacement-alist)
|
||||
|
||||
;; hide the "[2-9] -> buffer-to-window-[2-9]" entries
|
||||
(push '((nil . "buffer-to-window-[2-9]") . t)
|
||||
(push '((nil . "Move buffer to window [2-9]") . t)
|
||||
which-key-replacement-alist)
|
||||
|
||||
;; SPC k- lisp
|
||||
|
|
|
@ -63,7 +63,7 @@ This layer enables [[http://orgmode.org/][org mode]] for Spacemacs.
|
|||
|
||||
** Features:
|
||||
- Vim inspired key bindings are provided by [[https://github.com/Somelauw/evil-org-mode][evil-org-mode]]
|
||||
- Nicer bullet via [[https://github.com/sabof/org-bullets][org-bullets]]
|
||||
- Nicer bullet via [[https://github.com/integral-dw/org-superstar-mode][org-superstar-mode]]
|
||||
- A [[https://cirillocompany.de/pages/pomodoro-technique][pomodoro method]] integration via [[https://github.com/lolownia/org-pomodoro][org-pomodoro]]
|
||||
- Presentation mode via [[https://github.com/rlister/org-present][org-present]]
|
||||
- Insertion of images via [[https://github.com/abo-abo/org-download][org-download]]
|
||||
|
@ -254,16 +254,16 @@ To install Trello support set the variable =org-enable-trello-support= to =t=.
|
|||
** Different bullets
|
||||
You can tweak the bullets displayed in the org buffer in the function
|
||||
=dotspacemacs/user-config= of your dotfile by setting the variable
|
||||
=org-bullets-bullet-list=. By default the list is set to =("◉" "○" "✸" "✿")=.
|
||||
=org-superstar-headline-bullets-list=. By default the list is set to =("◉" "○" "✸" "✿")=.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq org-bullets-bullet-list '("■" "◆" "▲" "▶"))
|
||||
(setq org-superstar-bullet-list '("■" "◆" "▲" "▶"))
|
||||
#+END_SRC
|
||||
|
||||
You can disable the fancy bullets entirely by adding =org-bullets= to =dotspacemacs-excluded-packages=.
|
||||
You can disable the fancy bullets entirely by adding =org-superstar= to =dotspacemacs-excluded-packages=.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(dotspacemacs-excluded-packages '(org-bullets))
|
||||
(dotspacemacs-excluded-packages '(org-superstar))
|
||||
#+END_SRC
|
||||
|
||||
** Project support
|
||||
|
|
|
@ -440,7 +440,7 @@ Will work on both org-mode and any mode that accepts plain html."
|
|||
("k" org-babel-previous-src-block)
|
||||
("g" org-babel-goto-named-src-block)
|
||||
("z" recenter-top-bottom)
|
||||
("e" org-babel-execute-maybe :exit t)
|
||||
("e" org-babel-execute-maybe)
|
||||
("'" org-edit-special :exit t)))))
|
||||
|
||||
(defun org/init-org-agenda ()
|
||||
|
|
|
@ -151,8 +151,10 @@ mu4e-use-maildirs-extension-load to be evaluated after mu4e has been loaded."
|
|||
:init (with-eval-after-load 'mu4e (mu4e-maildirs-extension-load))))
|
||||
|
||||
(defun mu4e/pre-init-org ()
|
||||
;; load org-mu4e when org is actually loaded
|
||||
(with-eval-after-load 'org (require 'org-mu4e nil 'noerror)))
|
||||
;; load mu4e-org when org is actually loaded
|
||||
(with-eval-after-load 'org
|
||||
(require 'mu4e nil 'noerror)
|
||||
(require 'mu4e-org nil 'noerror)))
|
||||
|
||||
(defun mu4e/pre-init-window-purpose ()
|
||||
(spacemacs|use-package-add-hook window-purpose
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; funcs.el --- Neotree Layer functions File
|
||||
;;; funcs.el --- Neotree Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; layers.el --- Treemacs layers File for Spacemacs
|
||||
;;; layers.el --- Neotree layers File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; packages.el --- Neotree Layer packages File
|
||||
;;; packages.el --- Neotree Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
|
|
|
@ -163,10 +163,6 @@ many other commands.
|
|||
| ~C-c C-p p~ | Select a projectile project to add to the workspace. |
|
||||
| ~C-c C-p d~ | Remove project at point from the workspace. |
|
||||
| ~C-c C-p r~ | Rename project at point. |
|
||||
| ~th~ | Toggle the hiding and displaying of dotfiles. |
|
||||
| ~tw~ | Toggle whether the treemacs buffer should have a fixed width. |
|
||||
| ~tf~ | Toggle treemacs-follow-mode. |
|
||||
| ~ta~ | treemacs-filewatch-mode. |
|
||||
| ~w~ | Set a new value for the width of the treemacs window. |
|
||||
| ~TAB~ | Do what I mean (as defined in ~treemacs-TAB-actions-config~). Prefers expanding nodes by default. |
|
||||
| ~RET~ | Do what I mean (as defined in ~treemacs-RET-actions-config~). Prefers visiting nodes by default. |
|
||||
|
@ -187,10 +183,12 @@ many other commands.
|
|||
| ~oah~ | Open current file or tag by horizontally splitting a window selected by ace-window. |
|
||||
| ~oav~ | Open current file or tag by vertically splitting a window selected by ace-window. |
|
||||
| ~ox~ | Open current file according to its mime type in an external application. Linux, Windows and macOS are supported. |
|
||||
| ~ta~ | Toggle ~treemacs-filewatch-mode~. |
|
||||
| ~tf~ | Toggle ~treemacs-follow-mode~. |
|
||||
| ~ta~ | Toggle ~treemacs-filewatch-mode~. |
|
||||
| ~tg~ | Toggle ~git-mode~. |
|
||||
| ~th~ | Toggle the hiding and displaying of dotfiles. |
|
||||
| ~tw~ | Toggle whether the treemacs buffer should have a fixed width. |
|
||||
| ~tv~ | Toggle the hiding and displaying of dotfiles. |
|
||||
| ~yr~ | Copy the absolute path of the nearest project node at point. |
|
||||
| ~yy~ | Copy the absolute path of the node at point. |
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; config.el --- treemacs Layer configuration File for Spacemacs
|
||||
;;; config.el --- Treemacs Layer configuration File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; funcs.el --- Treemacs Layer functions File
|
||||
;;; funcs.el --- Treemacs Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; packages.el --- treemacs Layer packages File for Spacemacs
|
||||
;;; packages.el --- Treemacs Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2019 Sylvain Benner & Contributors
|
||||
;;
|
||||
|
@ -97,7 +97,7 @@
|
|||
|
||||
(defun treemacs/init-treemacs-icons-dired ()
|
||||
(use-package treemacs-icons-dired
|
||||
:hook (dired-load . treemacs-icons-dired-mode)))
|
||||
:hook (dired-mode . treemacs-icons-dired-mode)))
|
||||
|
||||
(defun treemacs/pre-init-winum ()
|
||||
(spacemacs|use-package-add-hook winum
|
||||
|
|
|
@ -243,6 +243,7 @@ The available configurations are:
|
|||
- avy
|
||||
- comint
|
||||
- company
|
||||
- ediff
|
||||
- elfeed
|
||||
- evil
|
||||
- evil-escape
|
||||
|
|
|
@ -15,10 +15,13 @@
|
|||
avy
|
||||
comint
|
||||
company
|
||||
ediff
|
||||
elfeed
|
||||
evil
|
||||
evil-cleverparens
|
||||
evil-escape
|
||||
evil-evilified-state
|
||||
evil-lisp-state
|
||||
evil-magit
|
||||
evil-surround
|
||||
eyebrowse
|
||||
|
@ -103,6 +106,20 @@
|
|||
"C-k"
|
||||
"C-l")))
|
||||
|
||||
(defun keyboard-layout/pre-init-ediff ()
|
||||
(kl|config ediff
|
||||
:description
|
||||
"Remap `ediff' bindings."
|
||||
:loader
|
||||
;; HACK: ediff-mode-map is only defined when ediff is started
|
||||
(add-hook 'ediff-startup-hook #'(lambda () BODY))
|
||||
:common
|
||||
(kl/correct-keys ediff-mode-map
|
||||
"h"
|
||||
"j"
|
||||
"k"
|
||||
"l")))
|
||||
|
||||
(defun keyboard-layout/pre-init-elfeed ()
|
||||
(kl|config elfeed
|
||||
:description
|
||||
|
@ -205,6 +222,20 @@
|
|||
(define-key evil-normal-state-map "K" nil)
|
||||
(define-key evil-normal-state-map "L" 'spacemacs/evil-smart-doc-lookup))))
|
||||
|
||||
(defun keyboard-layout/pre-init-evil-cleverparens ()
|
||||
(kl|config evil-cleverparens
|
||||
:description
|
||||
"Remap `evil-cleverparens' bindings."
|
||||
:loader
|
||||
;; (spacemacs|use-package-add-hook evil-cleverparens :post-init BODY)
|
||||
(with-eval-after-load 'evil-cleverparens BODY)
|
||||
:common
|
||||
(kl/evil-correct-keys 'normal evil-cleverparens-mode-map
|
||||
"h"
|
||||
"j"
|
||||
"k"
|
||||
"l")))
|
||||
|
||||
(defun keyboard-layout/pre-init-evil-escape ()
|
||||
(kl|config evil-escape
|
||||
:description
|
||||
|
@ -229,6 +260,24 @@
|
|||
"k"
|
||||
"l")))
|
||||
|
||||
(defun keyboard-layout/pre-init-evil-lisp-state ()
|
||||
(kl|config evil-lisp-state
|
||||
:description
|
||||
"Remap `evil-lisp-state' bindings."
|
||||
:loader
|
||||
(with-eval-after-load 'evil-lisp-state BODY)
|
||||
:common
|
||||
(kl/correct-keys evil-lisp-state-map
|
||||
"h"
|
||||
"j"
|
||||
"k"
|
||||
"l"
|
||||
;;
|
||||
"H"
|
||||
"J"
|
||||
"K"
|
||||
"L")))
|
||||
|
||||
(defun keyboard-layout/pre-init-evil-magit ()
|
||||
(kl|config evil-magit
|
||||
:description
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- C/C++ Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,43 +9,44 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq c-c++-packages
|
||||
'(
|
||||
cc-mode
|
||||
clang-format
|
||||
(company-c-headers :requires company)
|
||||
(cpp-auto-include
|
||||
:location (recipe :fetcher github
|
||||
:repo "syohex/emacs-cpp-auto-include"))
|
||||
disaster
|
||||
eldoc
|
||||
flycheck
|
||||
gdb-mi
|
||||
google-c-style
|
||||
helm-cscope
|
||||
org
|
||||
projectile
|
||||
realgud
|
||||
semantic
|
||||
srefactor
|
||||
stickyfunc-enhance
|
||||
xcscope
|
||||
;; lsp
|
||||
(ccls :requires lsp-mode)
|
||||
dap-mode
|
||||
;; rtags
|
||||
(company-rtags :requires (company rtags))
|
||||
counsel-gtags
|
||||
(flycheck-rtags :requires (flycheck rtags))
|
||||
ggtags
|
||||
helm-gtags
|
||||
(helm-rtags :requires (helm rtags))
|
||||
(ivy-rtags :requires (ivy rtags))
|
||||
rtags
|
||||
;; ycmd
|
||||
(company-ycmd :requires company)
|
||||
(flycheck-ycmd :requires flycheck)
|
||||
ycmd))
|
||||
(defconst c-c++-packages
|
||||
'(
|
||||
cc-mode
|
||||
clang-format
|
||||
company
|
||||
(company-c-headers :requires company)
|
||||
(cpp-auto-include
|
||||
:location (recipe :fetcher github
|
||||
:repo "syohex/emacs-cpp-auto-include"))
|
||||
disaster
|
||||
eldoc
|
||||
flycheck
|
||||
gdb-mi
|
||||
google-c-style
|
||||
helm-cscope
|
||||
org
|
||||
projectile
|
||||
realgud
|
||||
semantic
|
||||
srefactor
|
||||
stickyfunc-enhance
|
||||
xcscope
|
||||
;; lsp
|
||||
(ccls :requires lsp-mode)
|
||||
dap-mode
|
||||
;; rtags
|
||||
(company-rtags :requires (company rtags))
|
||||
counsel-gtags
|
||||
(flycheck-rtags :requires (flycheck rtags))
|
||||
ggtags
|
||||
helm-gtags
|
||||
(helm-rtags :requires (helm rtags))
|
||||
(ivy-rtags :requires (ivy rtags))
|
||||
rtags
|
||||
;; ycmd
|
||||
(company-ycmd :requires company)
|
||||
(flycheck-ycmd :requires flycheck)
|
||||
ycmd))
|
||||
|
||||
(defun c-c++/init-cc-mode ()
|
||||
(use-package cc-mode
|
||||
|
@ -117,8 +118,11 @@
|
|||
"ri" #'spacemacs/c++-organize-includes))))
|
||||
|
||||
(defun c-c++/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'c-mode)
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'c++-mode)
|
||||
(pcase (spacemacs//c-c++-backend)
|
||||
(`lsp-clangd (add-to-list 'spacemacs--dap-supported-modes 'c-mode)
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'c++-mode))
|
||||
(`lsp-ccls (add-to-list 'spacemacs--dap-supported-modes 'c-mode)
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'c++-mode)))
|
||||
(add-hook 'c-mode-local-vars-hook #'spacemacs//c-c++-setup-dap)
|
||||
(add-hook 'c++-mode-local-vars-hook #'spacemacs//c-c++-setup-dap))
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
- [[#flycheck][Flycheck]]
|
||||
- [[#credo][Credo]]
|
||||
- [[#dogma][Dogma]]
|
||||
- [[#mix-compile][mix compile]]
|
||||
- [[#language-server-protocol][Language server protocol]]
|
||||
- [[#debugger][Debugger]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
|
@ -55,7 +54,6 @@ As Alchemist is no longer maintained, elixir-ls is a preferred solution, even th
|
|||
- Smart code completion
|
||||
- Elixir project management
|
||||
- Integration with [[http://company-mode.github.io/][company-mode]]
|
||||
- Flycheck support for mix compile
|
||||
- Flycheck support for [[https://github.com/rrrene/credo][credo]]
|
||||
- Flycheck support for test results
|
||||
- Interactive debugger using [[https://github.com/emacs-lsp/dap-mode][dap-mode]]
|
||||
|
@ -152,38 +150,6 @@ Then run in your shell:
|
|||
$ mix deps.get
|
||||
#+END_SRC
|
||||
|
||||
*** mix compile
|
||||
*Important:*
|
||||
|
||||
Elixir compiler is based on macros and can execute arbitrary during compilation.
|
||||
Therefore Spacemacs disable flycheck compilation checker by default.
|
||||
|
||||
To enable flycheck support for compilation errors *globally* the variable
|
||||
=elixir-enable-compilation-checking= can be set explicitly to =t= in your
|
||||
dotfile but it is not recommended to do so because of the limitation described
|
||||
above.
|
||||
|
||||
Instead you should use directory local variables in order to enable the flycheck
|
||||
checker only for certain projects. Directory local variables are stored in a
|
||||
file named =.dir-locals.el= usually at the root of a project. To easily add a
|
||||
directory local variable use the key binding ~SPC f v d~ then choose the
|
||||
=elixir-mode= and the variable name =elixir-enable-compilation-checking= with a
|
||||
value of t. The result is a new file =.dir-locals.el= with the following
|
||||
contents:
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
;;; Directory Local Variables
|
||||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((elixir-mode
|
||||
(elixir-enable-compilation-checking . t)))
|
||||
#+END_SRC
|
||||
|
||||
Spacemacs marks the variable =elixir-enable-compilation-checking= as safe so
|
||||
Emacs won't ask you if the variable is safe whenever an elixir file is opened.
|
||||
|
||||
Remember that you can verify the flycheck checkers status with ~SPC e v~.
|
||||
|
||||
** Language server protocol
|
||||
The =lsp= backend uses [[https://github.com/JakeBecker/elixir-ls][elixir-ls]] as its language server implementation
|
||||
Clone the project to your system and follow the building instructions [[https://github.com/JakeBecker/elixir-ls#building-and-running][here]]
|
||||
|
|
|
@ -11,12 +11,6 @@
|
|||
|
||||
;; Variables
|
||||
|
||||
(defvar elixir-enable-compilation-checking nil
|
||||
"If non-nil syntax checking is enable for compilation.
|
||||
Default is nil because Elixir compilation is based on macros and thus it
|
||||
is unsafe. Activate this option only for trusted code, usage of a
|
||||
directory variable is recommended.")
|
||||
|
||||
(defvar elixir-backend nil
|
||||
"The backend to use for IDE features.
|
||||
Possible values are `alchemist' and `lsp'.
|
||||
|
|
|
@ -94,13 +94,6 @@
|
|||
(forward-line -1)
|
||||
(indent-according-to-mode)))))
|
||||
|
||||
(defun spacemacs//elixir-enable-compilation-checking ()
|
||||
"Enable compile checking if `elixir-enable-compilation-checking' is non nil."
|
||||
(when (or elixir-enable-compilation-checking)
|
||||
(flycheck-mix-setup)
|
||||
;; enable credo only if there are no compilation errors
|
||||
(flycheck-add-next-checker 'elixir-mix '(warning . elixir-credo))))
|
||||
|
||||
(defun spacemacs/elixir-annotate-pry ()
|
||||
"Highlight breakpoint lines."
|
||||
(interactive)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Elixir Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,23 +9,21 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq elixir-packages
|
||||
'(
|
||||
alchemist
|
||||
company
|
||||
counsel-gtags
|
||||
dap-mode
|
||||
elixir-mode
|
||||
evil-matchit
|
||||
flycheck
|
||||
flycheck-credo
|
||||
flycheck-mix
|
||||
ggtags
|
||||
helm-gtags
|
||||
ob-elixir
|
||||
popwin
|
||||
smartparens
|
||||
))
|
||||
(defconst elixir-packages
|
||||
'(
|
||||
alchemist
|
||||
company
|
||||
counsel-gtags
|
||||
dap-mode
|
||||
elixir-mode
|
||||
evil-matchit
|
||||
flycheck
|
||||
flycheck-credo
|
||||
ggtags
|
||||
helm-gtags
|
||||
ob-elixir
|
||||
popwin
|
||||
smartparens))
|
||||
|
||||
(defun elixir/init-alchemist ()
|
||||
(use-package alchemist
|
||||
|
@ -38,7 +36,7 @@
|
|||
(setq alchemist-project-compile-when-needed t
|
||||
alchemist-test-status-modeline nil)
|
||||
(add-to-list 'spacemacs-jump-handlers-elixir-mode
|
||||
'(alchemist-goto-definition-at-point :async t)))
|
||||
'(alchemist-goto-definition-at-point :async t)))
|
||||
:config
|
||||
(spacemacs/declare-prefix-for-mode 'elixir-mode "mX" "hex")
|
||||
(spacemacs/declare-prefix-for-mode 'elixir-mode "mc" "compile")
|
||||
|
@ -153,7 +151,8 @@
|
|||
(spacemacs/counsel-gtags-define-keys-for-mode 'elixir-mode))
|
||||
|
||||
(defun elixir/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'elixir-mode)
|
||||
(pcase (spacemacs//elixir-backend)
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'elixir-mode)))
|
||||
(add-hook 'elixir-mode-local-vars-hook #'spacemacs//elixir-setup-dap))
|
||||
|
||||
(defun elixir/post-init-evil-matchit ()
|
||||
|
@ -177,18 +176,6 @@
|
|||
:defer t
|
||||
:init (add-hook 'flycheck-mode-hook #'flycheck-credo-setup)))
|
||||
|
||||
(defun elixir/init-flycheck-mix ()
|
||||
(use-package flycheck-mix
|
||||
:commands (flycheck-mix-setup)
|
||||
:init
|
||||
(progn
|
||||
(add-to-list 'safe-local-variable-values
|
||||
(cons 'elixir-enable-compilation-checking nil))
|
||||
(add-to-list 'safe-local-variable-values
|
||||
(cons 'elixir-enable-compilation-checking t))
|
||||
(add-hook 'elixir-mode-local-vars-hook
|
||||
'spacemacs//elixir-enable-compilation-checking))))
|
||||
|
||||
(defun elixir/post-init-ggtags ()
|
||||
(add-hook 'elixir-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
|
||||
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
#+TITLE: Extempore layer
|
||||
|
||||
#+TAGS: layer|lisp|music|programming
|
||||
|
||||
* Table of Contents :TOC_5_gh:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#features][Features:]]
|
||||
- [[#install][Install]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
|
||||
* Description
|
||||
This layer adds support for the [[https://github.com/digego/extempore][Extempore]] programming environment.
|
||||
|
||||
** Features:
|
||||
- run Extempore (inferior extempore buffer)
|
||||
- connect to & evaluate code
|
||||
- eldoc support
|
||||
|
||||
* Install
|
||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
add =extempore= to the existing =dotspacemacs-configuration-layers= list in this
|
||||
file.
|
||||
|
||||
** Configuration
|
||||
The only configuration variable you might want to set out-of-the-box is
|
||||
=extempore-path=, so that you don't have to answer the "which directory?" prompt
|
||||
every time you call =switch-to-extempore=. You can set it when you add
|
||||
=extempore= to your =dotspacemacs-configuration-layers= like so:
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(extempore :variables extempore-path "/path/to/extempore/")
|
||||
#+END_SRC
|
||||
|
||||
Alternately, you could set it elsewhere in your init file, or through the
|
||||
=customize= interface.
|
||||
|
||||
There are a few other config variables to tweak, but in most cases the defaults
|
||||
will be ok if you're just starting out. If you want to see them all, open up
|
||||
=M-x customize= and look in the =extempore= group.
|
||||
|
||||
* Key bindings
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+-------------------------|
|
||||
| ~SPC m c c~ | Switch to Extempore |
|
||||
| ~SPC m c j~ | Connect to Extempore |
|
||||
| ~SPC m e f~ | Eval current definition |
|
||||
| ~SPC m e e~ | Eval last sexp |
|
||||
| ~SPC m e r~ | Eval region |
|
||||
| ~SPC m e b~ | Eval buffer |
|
|
@ -0,0 +1,14 @@
|
|||
;;; funcs.el --- Extempore Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Maximilian Wolff <smile13241324@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defun spacemacs//extempore-setup-eldoc ()
|
||||
(setq-local eldoc-documentation-function 'extempore-eldoc-documentation-function)
|
||||
(eldoc-mode))
|
|
@ -0,0 +1,50 @@
|
|||
;;; packages.el --- Extempore Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Ben Swift <ben@benswift.me>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defconst extempore-packages
|
||||
'(extempore-mode))
|
||||
|
||||
(defun extempore/init-extempore-mode ()
|
||||
"Initialize extempore mode"
|
||||
(use-package extempore-mode
|
||||
:defer t
|
||||
:mode
|
||||
(("\\.xtm$" . extempore-mode))
|
||||
:init
|
||||
(spacemacs/register-repl 'extempore-mode 'extempore-repl "extempore")
|
||||
:config
|
||||
(progn
|
||||
(spacemacs/declare-prefix-for-mode 'extempore-mode "mc" "process")
|
||||
(spacemacs/declare-prefix-for-mode 'extempore-mode "me" "eval")
|
||||
|
||||
(spacemacs/set-leader-keys-for-major-mode 'extempore-mode
|
||||
"'" 'extempore-repl
|
||||
"," 'lisp-state-toggle-lisp-state
|
||||
|
||||
"cc" 'switch-to-extempore
|
||||
"cj" 'extempore-connect
|
||||
|
||||
"ee" 'extempore-send-last-sexp
|
||||
"ef" 'extempore-send-definition
|
||||
"er" 'extempore-send-region
|
||||
"eb" 'extempore-send-buffer-or-region
|
||||
(setq extempore-tab-completion nil)
|
||||
|
||||
(set-face-attribute 'extempore-blink-face nil :foreground "#272822" :background "#FD971F")
|
||||
(set-face-attribute 'extempore-sb-blink-face nil :foreground "#272822" :background "#39FF14")
|
||||
|
||||
;; stop the ' (quote) character being paired by smartparens
|
||||
(with-eval-after-load 'smartparens
|
||||
(sp-local-pair 'extempore-mode "'" nil :actions nil)
|
||||
(sp-local-pair 'extempore-mode "`" nil :actions nil))))))
|
||||
|
||||
(defun extempore/post-init-eldoc ()
|
||||
(add-hook 'extempore-mode-hook #'spacemacs//extempore-setup-eldoc))
|
|
@ -12,6 +12,7 @@
|
|||
- [[#factor-mode-editing-source-files][factor-mode (editing source files)]]
|
||||
- [[#fuel-listener-mode][fuel-listener-mode]]
|
||||
- [[#snippets][Snippets]]
|
||||
- [[#starting-a-graphical-listener][Starting a Graphical Listener]]
|
||||
|
||||
* Description
|
||||
A spacemacs layer for Factor language support.
|
||||
|
@ -22,6 +23,8 @@ A spacemacs layer for Factor language support.
|
|||
- Auto-Completion in REPL
|
||||
- Scaffolding support
|
||||
- Refactoring support
|
||||
- Running graphical Listeners
|
||||
- Reloading emacs-lisp portion of FUEL
|
||||
|
||||
* Install
|
||||
This layer depends on the elisp files that are bundled with factor. To use this
|
||||
|
@ -85,3 +88,21 @@ after typing a single ~:~. Note that you might have
|
|||
to set =yas-triggers-in-field= to nil if you use =x= for stack effect
|
||||
declaration elements a lot, as this will trigger a builtin snippet from
|
||||
prog-mode instead of advancing to the next field when pressing =<TAB>=.
|
||||
|
||||
* Starting a Graphical Listener
|
||||
The command =factor/start-ui-listener= can be used to run a Factor process which
|
||||
sets up a FUEL server on the standard port and runs the graphical listener. If successful, the
|
||||
command =connect-to-factor= will connect to that factor instance.
|
||||
|
||||
This procedure can be influenced with the following variables, which can also be
|
||||
set as directory-local variables to make it easier to work with projects which
|
||||
require different Factor versions, for example. (See their respective
|
||||
documentation for details)
|
||||
- =fuel-factor-root-dir=
|
||||
- =fuel-listener-factor-binary=
|
||||
- =fuel-listener-factor-image=
|
||||
- =factor-ui-listener-args=
|
||||
|
||||
Note that the commands described in the [[#key-bindings][Key bindings]] section which start a
|
||||
factor listener are supplied by FUEL and don't take the last of these variables,
|
||||
=factor-ui-listener-args= into account.
|
||||
|
|
|
@ -10,3 +10,6 @@
|
|||
;;; License: GPLv3
|
||||
|
||||
(spacemacs|define-jump-handlers factor-mode 'fuel-edit-word-at-point)
|
||||
|
||||
(defvar factor-ui-listener-args ""
|
||||
"Extra arguments to the factor VM binary when starting the graphical listener.")
|
||||
|
|
|
@ -9,10 +9,115 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(autoload 'feature-file "loadhist")
|
||||
(autoload 'file-requires "loadhist")
|
||||
|
||||
(defvar factor--ui-listener-process nil
|
||||
"Holds the factor process which serves the current fuel connection.")
|
||||
|
||||
(defun factor//fuel-stack-effect ()
|
||||
"Small wrapper around factors stack effect help. If region is
|
||||
active, use that, otherwise use sexp under point."
|
||||
active, use that, otherwise use sexp under point."
|
||||
(interactive)
|
||||
(if (region-active-p)
|
||||
(call-interactively 'fuel-stack-effect-region)
|
||||
(call-interactively 'fuel-stack-effect-sexp)))
|
||||
|
||||
(defun factor//fuel-elisp-dir ()
|
||||
"Get the directory of the currently loaded fuel implementation."
|
||||
(expand-file-name (concat (feature-file 'factor-mode)
|
||||
"/..")))
|
||||
|
||||
(defun factor//fuel-feature-p (fuel-directory feature)
|
||||
"Check if FEATURE is provided by a file under FUEL-DIRECTORY."
|
||||
(string-prefix-p fuel-directory (feature-file feature)))
|
||||
|
||||
(defun factor//loaded-fuel-features ()
|
||||
"Recursively determine all loaded features that belong to the
|
||||
currently loaded fuel implementation."
|
||||
(cl-loop with fuel-directory = (factor//fuel-elisp-dir)
|
||||
for fuel-features = '(fuel-mode factor-mode)
|
||||
then (cl-union fuel-features new-features)
|
||||
for next-features = (cl-remove-duplicates
|
||||
(cl-reduce 'cl-union
|
||||
(mapcar (lambda(f) (file-requires (feature-file f)))
|
||||
fuel-features)))
|
||||
for new-features = (cl-remove-if-not
|
||||
(lambda(f) (and (featurep f)
|
||||
(factor//fuel-feature-p fuel-directory f)))
|
||||
(cl-set-difference next-features fuel-features))
|
||||
while new-features
|
||||
finally (return fuel-features)))
|
||||
|
||||
(defun factor//unload-fuel ()
|
||||
"Close fuel connection and unload fuel code.
|
||||
|
||||
Will stop current fuel connection if applicable."
|
||||
(when (and (featurep 'fuel-listener)
|
||||
fuel-listener--buffer)
|
||||
(kill-buffer fuel-listener--buffer))
|
||||
(cl-loop for f in (factor//loaded-fuel-features) do
|
||||
(unload-feature f t)))
|
||||
|
||||
(defun factor//load-fuel-from-path (path)
|
||||
"Load emacs lisp fuel implementation from the specified PATH."
|
||||
(let ((load-path (cons path load-path)))
|
||||
(require 'fuel-mode)
|
||||
(require 'factor-mode)))
|
||||
|
||||
(defun factor//reload-fuel-from-path (path)
|
||||
"Unload current emacs lisp fuel implementation and load the on from PATH.
|
||||
|
||||
Since unloading switches buffers which were in factor-mode back
|
||||
to fundamental mode, this re-enables factor-mode in these buffers
|
||||
afterwards."
|
||||
(let ((factor-buffers (cl-loop for b being the buffers
|
||||
if (eq (buffer-local-value 'major-mode b)
|
||||
'factor-mode)
|
||||
collect b)))
|
||||
(factor//unload-fuel)
|
||||
(factor//load-fuel-from-path path)
|
||||
(cl-loop for b in factor-buffers do
|
||||
(with-current-buffer b
|
||||
(factor-mode)))))
|
||||
|
||||
(defun factor/start-connect-factor (factor-binary factor-image fuel-path &optional cmd-line-options)
|
||||
"Start a graphical Factor listener at FACTOR-ROOT.
|
||||
|
||||
If non-nil IMAGE-NAME denotes a path to the desired factor image
|
||||
relative to FACTOR-ROOT, if no absolute path is given. Connect to
|
||||
it using the fuel-mode implementation in FUEL-PATH, if non-nil. Returns the
|
||||
process object.
|
||||
|
||||
Will append the value of `factor-ui-listener-args' to the command line options.
|
||||
|
||||
Returns the process object.
|
||||
"
|
||||
(when fuel-path
|
||||
(factor//reload-fuel-from-path fuel-path))
|
||||
(setq factor--ui-listener-process
|
||||
(start-process-shell-command
|
||||
"Factor-UI-Listener" "*Factor-UI-Listener*"
|
||||
(format "%s -image='%s' -e='USING: fuel.remote ; fuel-start-remote-listener* \"ui.tools\" run ' %s"
|
||||
factor-binary
|
||||
factor-image
|
||||
(or cmd-line-options "")))))
|
||||
|
||||
(defun factor/start-ui-listener ()
|
||||
"Run the graphical factor listener with fuel support and connect to it.
|
||||
|
||||
If `fuel-factor-root-dir' is set,
|
||||
unloads the current fuel implementation and reloads fuel from there.
|
||||
"
|
||||
(interactive)
|
||||
(when (and (process-live-p factor--ui-listener-process)
|
||||
(y-or-n-p "Graphical listener already running. Kill process?"))
|
||||
(delete-process factor--ui-listener-process))
|
||||
(let* ((factor-process (factor/start-connect-factor
|
||||
(fuel-listener-factor-binary)
|
||||
(fuel-listener-factor-image)
|
||||
(expand-file-name "misc/fuel" fuel-factor-root-dir))))
|
||||
;; This check will only catch immediate failures:
|
||||
(unless (process-live-p factor-process)
|
||||
(error "Listener process exited with code: %d"
|
||||
(process-exit-status factor-process)))))
|
||||
|
|
|
@ -104,6 +104,14 @@ layers are enabled as well.
|
|||
|
||||
* Configuration
|
||||
** Execution
|
||||
By default, the go run command is =go run=. If you want to use a different
|
||||
command or run with environment variables, set the layer variable
|
||||
=go-run-command=.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(go :variables go-run-command "ENV_VAR=foo go run")
|
||||
#+END_SRC
|
||||
|
||||
To run the current =main= package with command line arguments, set the value of
|
||||
=go-run-args= as a file local variable, e.g.
|
||||
|
||||
|
@ -150,6 +158,21 @@ If you wish to use =golangci-lint=, set the following layer variable to non-nil:
|
|||
|
||||
Check [[https://github.com/golangci/golangci-lint][golangci-lint]] and [[https://github.com/weijiangan/flycheck-golangci-lint][flycheck-golangci-lint]] for more details.
|
||||
|
||||
Please remember that without properly configured =flycheck-golangci-lint= variables =golangci-lint=
|
||||
may not run as expected. The recommended way is to use a =.golangi.yml= in your project.
|
||||
But if this is not possible you can also set global command line flags for =golangci-lint=.
|
||||
Especially important is the selection of which linters to run and whether to lint test files too.
|
||||
|
||||
It may happen from time to time that =golangci-lint= is not able to parse a buffers content
|
||||
properly. This normally happens when there are basic errors in the file which prevent more
|
||||
complex analytics to run. In this case a set of errors will be shown at the top of the
|
||||
current buffer which are not properly parsed by flycheck. Spacemacs still shows basic
|
||||
errors in your buffer. When these have been fixed =golangci-lint= will regenerate
|
||||
and further diagnostic data will be made available.
|
||||
|
||||
When this happens please report a bug to `golangci-lint` they are working hard
|
||||
to fix these.
|
||||
|
||||
** Tests
|
||||
If you're using =gocheck= or =testify= in your project you can use the
|
||||
=go-use-gocheck-for-testing= or =go-use-testify-for-testing= variable to enable
|
||||
|
@ -159,6 +182,14 @@ Tests are run in a compilation buffer displayed in a popup window that can be
|
|||
closed by pressing ~C-g~ from any other window. The variable =go-test-buffer-name=
|
||||
can be customized to set the output buffer name.
|
||||
|
||||
By default, the go test command is =go test=. If you want to use a different
|
||||
command or test with environment variables, set the layer variable
|
||||
=go-test-command=.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(go :variables go-test-command "ENV_VAR=foo go test")
|
||||
#+END_SRC
|
||||
|
||||
To provide additional arguments to =go test=, specify =go-use-test-args=.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
|
|
@ -44,3 +44,9 @@ If `nil' then `go-mode' is the default backend unless `lsp' layer is used.")
|
|||
|
||||
(defvar go-run-args ""
|
||||
"Additional arguments to by supplied to `go run` during runtime.")
|
||||
|
||||
(defvar go-run-command "go run"
|
||||
"Go run command. Default is `go run`.")
|
||||
|
||||
(defvar go-test-command "go test"
|
||||
"Go test command. Default is `go test`.")
|
||||
|
|
|
@ -66,6 +66,12 @@
|
|||
(lsp))
|
||||
(message "`lsp' layer is not installed, please add `lsp' layer to your dotfile.")))
|
||||
|
||||
(defun spacemacs//go-setup-dap ()
|
||||
"Conditionally setup go DAP integration."
|
||||
;; currently DAP is only available using LSP
|
||||
(pcase (spacemacs//go-backend)
|
||||
(`lsp (spacemacs//go-setup-lsp-dap))))
|
||||
|
||||
(defun spacemacs//go-setup-lsp-dap ()
|
||||
"Setup DAP integration."
|
||||
(require 'dap-go)
|
||||
|
@ -79,20 +85,32 @@
|
|||
(setq flycheck-disabled-checkers '(go-gofmt
|
||||
go-golint
|
||||
go-vet
|
||||
go-build
|
||||
go-test
|
||||
;; go-build
|
||||
;; go-test
|
||||
go-errcheck
|
||||
go-staticcheck
|
||||
go-unconvert
|
||||
))
|
||||
(flycheck-golangci-lint-setup))
|
||||
go-unconvert))
|
||||
(flycheck-golangci-lint-setup)
|
||||
|
||||
;; Make sure to only run golangci after go-build
|
||||
;; to ensure we show at least basic errors in the buffer
|
||||
;; when golangci fails. Make also sure to run go-test if possible.
|
||||
;; See #13580 for details
|
||||
(flycheck-add-next-checker 'go-build '(warning . golangci-lint) t)
|
||||
(flycheck-add-next-checker 'go-test '(warning . golangci-lint) t)
|
||||
|
||||
;; Set basic checkers explicitly as flycheck will
|
||||
;; select the better golangci-lint automatically.
|
||||
;; However if it fails we require these as fallbacks.
|
||||
(cond ((flycheck-may-use-checker 'go-test) (flycheck-select-checker 'go-test))
|
||||
((flycheck-may-use-checker 'go-build) (flycheck-select-checker 'go-build))))
|
||||
|
||||
|
||||
;; run
|
||||
|
||||
(defun spacemacs/go-run-tests (args)
|
||||
(interactive)
|
||||
(compilation-start (concat "go test " (when go-test-verbose "-v ") args " " go-use-test-args)
|
||||
(compilation-start (concat go-test-command " " (when go-test-verbose "-v ") args " " go-use-test-args)
|
||||
nil (lambda (n) go-test-buffer-name) nil))
|
||||
|
||||
(defun spacemacs/go-run-package-tests ()
|
||||
|
@ -130,7 +148,7 @@
|
|||
(defun spacemacs/go-run-main ()
|
||||
(interactive)
|
||||
(shell-command
|
||||
(format "go run %s %s"
|
||||
(format (concat go-run-command " %s %s")
|
||||
(shell-quote-argument (or (file-remote-p (buffer-file-name (buffer-base-buffer)) 'localname)
|
||||
(buffer-file-name (buffer-base-buffer))))
|
||||
go-run-args)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Go Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,29 +9,29 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq go-packages
|
||||
'(
|
||||
company
|
||||
dap-mode
|
||||
(company-go :requires company)
|
||||
counsel-gtags
|
||||
eldoc
|
||||
flycheck
|
||||
(flycheck-golangci-lint :toggle (and go-use-golangci-lint
|
||||
(configuration-layer/package-used-p
|
||||
'flycheck)))
|
||||
ggtags
|
||||
helm-gtags
|
||||
go-eldoc
|
||||
go-fill-struct
|
||||
go-gen-test
|
||||
go-guru
|
||||
go-impl
|
||||
go-mode
|
||||
go-rename
|
||||
go-tag
|
||||
godoctor
|
||||
popwin))
|
||||
(defconst go-packages
|
||||
'(
|
||||
company
|
||||
dap-mode
|
||||
(company-go :requires company)
|
||||
counsel-gtags
|
||||
eldoc
|
||||
flycheck
|
||||
(flycheck-golangci-lint :toggle (and go-use-golangci-lint
|
||||
(configuration-layer/package-used-p
|
||||
'flycheck)))
|
||||
ggtags
|
||||
helm-gtags
|
||||
go-eldoc
|
||||
go-fill-struct
|
||||
go-gen-test
|
||||
go-guru
|
||||
go-impl
|
||||
go-mode
|
||||
go-rename
|
||||
go-tag
|
||||
godoctor
|
||||
popwin))
|
||||
|
||||
(defun go/init-company-go ()
|
||||
(use-package company-go
|
||||
|
@ -45,8 +45,9 @@
|
|||
(add-hook 'go-mode-local-vars-hook #'spacemacs//go-setup-company))
|
||||
|
||||
(defun go/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'go-mode)
|
||||
(add-hook 'go-mode-local-vars-hook #'spacemacs//go-setup-lsp-dap))
|
||||
(pcase (spacemacs//go-backend)
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'go-mode)))
|
||||
(add-hook 'go-mode-local-vars-hook #'spacemacs//go-setup-dap))
|
||||
|
||||
(defun go/post-init-counsel-gtags ()
|
||||
(spacemacs/counsel-gtags-define-keys-for-mode 'go-mode))
|
||||
|
|
|
@ -231,7 +231,6 @@ Documentation commands are prefixed by ~SPC m h~
|
|||
| ~SPC m h H~ | do a local Hoogle lookup |
|
||||
| ~SPC m h i~ | gets information for the identifier under the cursor |
|
||||
| ~SPC m h t~ | gets the type of the identifier under the cursor |
|
||||
| ~SPC m h y~ | do a Hayoo lookup |
|
||||
|
||||
** Debug
|
||||
Debug commands are prefixed by ~SPC m d~:
|
||||
|
@ -558,7 +557,7 @@ with the following script:
|
|||
|
||||
#+BEGIN_SRC bash
|
||||
#!/bin/bash
|
||||
cd `stack --project-root`
|
||||
cd `stack path --project-root`
|
||||
stack $*
|
||||
#+END_SRC
|
||||
|
||||
|
|
|
@ -264,7 +264,6 @@
|
|||
"hi" 'haskell-process-do-info
|
||||
"ht" 'haskell-process-do-type
|
||||
"hT" 'spacemacs/haskell-process-do-type-on-prev-line
|
||||
"hy" 'hayoo
|
||||
|
||||
"da" 'haskell-debug/abandon
|
||||
"db" 'haskell-debug/break-on-function
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Java Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Lukasz Klich <klich.lukasz@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,30 +9,30 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq java-packages
|
||||
'(
|
||||
company
|
||||
dap-mode
|
||||
flycheck
|
||||
ggtags
|
||||
gradle-mode
|
||||
counsel-gtags
|
||||
helm-gtags
|
||||
(java-mode :location built-in)
|
||||
maven-test-mode
|
||||
(meghanada :toggle (not (version< emacs-version "25.1")))
|
||||
mvn
|
||||
(lsp-java :requires lsp-mode)
|
||||
org
|
||||
smartparens
|
||||
))
|
||||
(defconst java-packages
|
||||
'(
|
||||
company
|
||||
dap-mode
|
||||
flycheck
|
||||
ggtags
|
||||
gradle-mode
|
||||
counsel-gtags
|
||||
helm-gtags
|
||||
(java-mode :location built-in)
|
||||
maven-test-mode
|
||||
(meghanada :toggle (not (version< emacs-version "25.1")))
|
||||
mvn
|
||||
(lsp-java :requires lsp-mode)
|
||||
org
|
||||
smartparens))
|
||||
|
||||
(defun java/post-init-company ()
|
||||
(add-hook 'java-mode-local-vars-hook #'spacemacs//java-setup-company))
|
||||
|
||||
(defun java/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'java-mode)
|
||||
(add-hook 'java-mode-local-vars-hook #'spacemacs//java-setup-lsp-dap))
|
||||
(pcase (spacemacs//java-backend)
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'java-mode)))
|
||||
(add-hook 'java-mode-local-vars-hook #'spacemacs//java-setup-dap))
|
||||
|
||||
(defun java/post-init-flycheck ()
|
||||
(add-hook 'java-mode-local-vars-hook #'spacemacs//java-setup-flycheck))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Javascript Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,31 +9,30 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq javascript-packages
|
||||
'(
|
||||
add-node-modules-path
|
||||
company
|
||||
counsel-gtags
|
||||
dap-mode
|
||||
evil-matchit
|
||||
flycheck
|
||||
ggtags
|
||||
helm-gtags
|
||||
imenu
|
||||
impatient-mode
|
||||
import-js
|
||||
js-doc
|
||||
js2-mode
|
||||
js2-refactor
|
||||
livid-mode
|
||||
nodejs-repl
|
||||
org
|
||||
prettier-js
|
||||
skewer-mode
|
||||
tern
|
||||
tide
|
||||
web-beautify
|
||||
))
|
||||
(defconst javascript-packages
|
||||
'(
|
||||
add-node-modules-path
|
||||
company
|
||||
counsel-gtags
|
||||
dap-mode
|
||||
evil-matchit
|
||||
flycheck
|
||||
ggtags
|
||||
helm-gtags
|
||||
imenu
|
||||
impatient-mode
|
||||
import-js
|
||||
js-doc
|
||||
js2-mode
|
||||
js2-refactor
|
||||
livid-mode
|
||||
nodejs-repl
|
||||
org
|
||||
prettier-js
|
||||
skewer-mode
|
||||
tern
|
||||
tide
|
||||
web-beautify))
|
||||
|
||||
(defun javascript/post-init-add-node-modules-path ()
|
||||
(spacemacs/add-to-hooks #'add-node-modules-path '(css-mode-hook
|
||||
|
@ -46,7 +45,8 @@
|
|||
(spacemacs/counsel-gtags-define-keys-for-mode 'js2-mode))
|
||||
|
||||
(defun javascript/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'js2-mode)
|
||||
(pcase (spacemacs//javascript-backend)
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'js2-mode)))
|
||||
(add-hook 'js2-mode-local-vars-hook #'spacemacs//javascript-setup-dap))
|
||||
|
||||
(defun javascript/post-init-evil-matchit ()
|
||||
|
@ -221,8 +221,8 @@
|
|||
(spacemacs/declare-prefix-for-mode 'js2-mode
|
||||
"msL" "nodejs-send-line-and-focus")
|
||||
(spacemacs/declare-prefix-for-mode 'js2-mode
|
||||
"msR" "nodejs-send-region-and-focus")
|
||||
))))
|
||||
"msR" "nodejs-send-region-and-focus")))))
|
||||
|
||||
|
||||
(defun javascript/pre-init-org ()
|
||||
(spacemacs|use-package-add-hook org
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
- [[#description][Description]]
|
||||
- [[#features][Features:]]
|
||||
- [[#install][Install]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#web-beautify][web-beautify]]
|
||||
- [[#prettier][prettier]]
|
||||
- [[#choosing-a-formatter][Choosing a formatter]]
|
||||
- [[#formatting-on-save][Formatting on save]]
|
||||
- [[#lsp][LSP]]
|
||||
- [[#usage][Usage]]
|
||||
- [[#reformat][Reformat]]
|
||||
- [[#display-navigable-hierarchy][Display navigable hierarchy]]
|
||||
|
@ -33,7 +34,7 @@ This layer adds support for JSON files with [[https://github.com/joshwnj/json-mo
|
|||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
add =json= to the existing =dotspacemacs-configuration-layers= list in this file.
|
||||
|
||||
** Configuration
|
||||
* Configuration
|
||||
To define the default indentation set the variable =js-indent-level=.
|
||||
|
||||
** web-beautify
|
||||
|
@ -49,7 +50,7 @@ To choose a formatter, set the layer variable =json-fmt-tool=:
|
|||
(json :variables json-fmt-tool 'web-beautify)
|
||||
#+END_SRC
|
||||
|
||||
Formatter can be chosen on a per project basis using directory local variables
|
||||
The formatter can be chosen on a per project basis using directory local variables
|
||||
(files named =.dir-locals.el= at the root of a project), an example to use the
|
||||
=prettier= formatter:
|
||||
|
||||
|
@ -69,9 +70,26 @@ To enable using the selected formatter on save, set the layer variable =json-fmt
|
|||
(json :variables json-fmt-on-save t)
|
||||
#+END_SRC
|
||||
|
||||
** LSP
|
||||
To enable LSP, install the lsp server via npm,
|
||||
then set the layer variable =json-backend= to ='lsp= like shown below:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(json :variables json-backend 'lsp)
|
||||
#+END_SRC
|
||||
|
||||
Alternatively you can also keep the variable on nil, then lsp will be used if lsp
|
||||
layer is loaded.
|
||||
|
||||
Installing the lsp server dependency can be done like this:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
npm install -g vscode-json-languageserver
|
||||
#+END_SRC
|
||||
|
||||
* Usage
|
||||
** Reformat
|
||||
~SPC m =~ will reformat the whole buffer or the active region. Use numerical
|
||||
~SPC m = =~ will reformat the whole buffer or the active region. Use numerical
|
||||
prefix argument to specify a different indentation than =js-indent-level=.
|
||||
Use the universal prefix argument to print decoded strings, for instance:
|
||||
|
||||
|
@ -91,18 +109,17 @@ Use the universal prefix argument to print decoded strings, for instance:
|
|||
#+END_SRC
|
||||
|
||||
** Display navigable hierarchy
|
||||
~SPC m h h~ displays the hierarchy for the whole JSON document or the active
|
||||
region. Use the universal prefix argument ~SPC u SPC m h h~ to create the
|
||||
~SPC m T h~ toggle the display of a hierarchy for the whole JSON document or the active
|
||||
region. Use the universal prefix argument ~SPC u SPC m T h~ to create the
|
||||
hierarchy for the JSON *after* the point.
|
||||
|
||||
* Key bindings
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+---------------------------------------------|
|
||||
| ~SPC m =~ | DWIM Reformat JSON |
|
||||
| ~SPC m h p~ | Get the path of the value at point |
|
||||
| ~SPC m h h~ | DWIM navigate JSON hierarchy |
|
||||
| ~SPC m h H~ | Navigate JSON hierarchy of the whole buffer |
|
||||
| Key binding | Description |
|
||||
|-------------+------------------------------------------------|
|
||||
| ~SPC m = =~ | Reformat thing under point |
|
||||
| ~SPC m h p~ | Print the path to the json element under point |
|
||||
| ~SPC m T h~ | Toggle graphical JSON hierarchy |
|
||||
|
||||
** JSON hierarchy
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; config.el --- json layer configuration file for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Seong Yong-ju <sei40kr@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -16,3 +16,8 @@
|
|||
|
||||
(defvar json-fmt-on-save nil
|
||||
"Run formatter on buffer save.")
|
||||
|
||||
(defvar json-backend nil
|
||||
"The backend to use for IDE features.
|
||||
Possible values are `lsp' and `company-json'.
|
||||
If `nil' then 'company-json` is the default backend unless `lsp' layer is used")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; funcs.el --- JSON Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Muneeb Shaikh <muneeb@reversehack.in>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,6 +9,28 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defun spacemacs//json-backend ()
|
||||
"Returns selected backend."
|
||||
(if json-backend
|
||||
json-backend
|
||||
(cond
|
||||
((configuration-layer/layer-used-p 'lsp) 'lsp)
|
||||
(t 'company-json))))
|
||||
|
||||
(defun spacemacs//json-setup-company ()
|
||||
"Conditionally setup company based on backend."
|
||||
(pcase (spacemacs//json-backend)
|
||||
;; Activate lsp company explicitly to activate
|
||||
;; standard backends as well
|
||||
(`lsp (spacemacs|add-company-backends
|
||||
:backends company-capf
|
||||
:modes json-mode))))
|
||||
|
||||
(defun spacemacs//json-setup-backend ()
|
||||
"Conditionally setup json backend."
|
||||
(pcase (spacemacs//json-backend)
|
||||
(`lsp (lsp))))
|
||||
|
||||
(defun spacemacs/json-navigator-dwim (arg &optional start end)
|
||||
"Display the JSON hierarchy of the whole buffer or the active region.
|
||||
If ARG is a universal prefix argument then display the hierarchy after point."
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; layers.el --- JSON Layer layers File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -10,3 +10,7 @@
|
|||
;;; License: GPLv3
|
||||
|
||||
(configuration-layer/declare-layer-dependencies '(node prettier web-beautify))
|
||||
|
||||
(when (and (boundp 'json-backend)
|
||||
(eq json-backend 'lsp))
|
||||
(configuration-layer/declare-layer-dependencies '(lsp)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- JSON Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -11,6 +11,7 @@
|
|||
|
||||
(setq json-packages
|
||||
'(
|
||||
company
|
||||
add-node-modules-path
|
||||
flycheck
|
||||
json-mode
|
||||
|
@ -18,8 +19,10 @@
|
|||
json-reformat
|
||||
json-snatcher
|
||||
prettier-js
|
||||
web-beautify
|
||||
))
|
||||
web-beautify))
|
||||
|
||||
(defun json/post-init-company ()
|
||||
(spacemacs//json-setup-company))
|
||||
|
||||
(defun json/post-init-add-node-modules-path ()
|
||||
(add-hook 'json-mode-hook #'add-node-modules-path))
|
||||
|
@ -29,7 +32,14 @@
|
|||
|
||||
(defun json/init-json-mode ()
|
||||
(use-package json-mode
|
||||
:defer t))
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(unless (eq (spacemacs//json-backend) 'lsp)
|
||||
(spacemacs/declare-prefix-for-mode 'json-mode "mT" "toggle")
|
||||
(spacemacs/declare-prefix-for-mode 'json-mode "mh" "help")
|
||||
(spacemacs/declare-prefix-for-mode 'json-mode "m=" "format"))
|
||||
(add-hook 'json-mode-hook #'spacemacs//json-setup-backend))))
|
||||
|
||||
(defun json/init-json-navigator ()
|
||||
(use-package json-navigator
|
||||
|
@ -39,7 +49,7 @@
|
|||
(evilified-state-evilify-map tabulated-list-mode-map
|
||||
:mode special-mode)
|
||||
(spacemacs/set-leader-keys-for-major-mode 'json-mode
|
||||
"hh" 'spacemacs/json-navigator-dwim))))
|
||||
"Th" 'spacemacs/json-navigator-dwim))))
|
||||
|
||||
(defun json/init-json-reformat ()
|
||||
(use-package json-reformat
|
||||
|
|
|
@ -11,7 +11,13 @@
|
|||
|
||||
;; variables
|
||||
|
||||
(spacemacs|define-jump-handlers latex-mode)
|
||||
;; Even though AUCTeX uses TeX-latex-mode rather than latex-mode, major-mode
|
||||
;; will still be bound to 'latex-mode (since AUCTeX uses an advice to override
|
||||
;; latex-mode with TeX-latex-mode), so the keymap's name should use the
|
||||
;; lowercase form, since bind-map uses the value of major-mode...
|
||||
(spacemacs|define-jump-handlers latex-mode dumb-jump-go)
|
||||
;; ...but AUCTeX runs LaTeX-mode-hook rather than latex-mode-hook, so:
|
||||
(add-hook 'LaTeX-mode-hook #'spacemacs//init-jump-handlers-latex-mode)
|
||||
|
||||
(defvar latex-build-command (if (executable-find "latexmk") "LatexMk" "LaTeX")
|
||||
"The default command to use with `SPC m b'")
|
||||
|
@ -30,5 +36,8 @@
|
|||
"align"
|
||||
"align*"
|
||||
"tabular"
|
||||
"tabular*"
|
||||
"tabu"
|
||||
"tabu*"
|
||||
"tikzpicture")
|
||||
"List of environment names in which `auto-fill-mode' will be inhibited.")
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
(pcase php-backend
|
||||
(`lsp (spacemacs//php-setup-lsp-dap))))
|
||||
|
||||
|
||||
(defun spacemacs//php-setup-lsp-dap ()
|
||||
"Setup DAP integration."
|
||||
(require 'dap-php))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- PHP Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -27,11 +27,11 @@
|
|||
(phpactor :toggle (not (eq php-backend 'lsp)))
|
||||
(company-phpactor :requires company :toggle (not (eq php-backend 'lsp)))
|
||||
(company-php :requires company :toggle (not (eq php-backend 'lsp)))
|
||||
(geben :toggle (not (eq php-backend 'lsp)))
|
||||
))
|
||||
(geben :toggle (not (eq php-backend 'lsp)))))
|
||||
|
||||
(defun php/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'php-mode)
|
||||
(pcase php-backend
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'php-mode)))
|
||||
(add-hook 'php-mode-local-vars-hook #'spacemacs//php-setup-dap))
|
||||
|
||||
(defun php/init-drupal-mode ()
|
||||
|
|
|
@ -58,10 +58,13 @@ and configure the =plantuml-jar-path= respectively:
|
|||
To get the full range of =Plantuml= compilations working, you will also need
|
||||
the native package [[http://graphviz.org/][graphviz]] installed on your system.
|
||||
|
||||
Additionally, to compile the image locally, you need to set =plantuml-default-exec-mode= to =jar=, e.g.:
|
||||
If you don't want to compile locally you can set =plantuml-exec-mode= to =server=.
|
||||
This will make plantuml try to use an online compile server. Be warned these resources
|
||||
change often and plantuml-mode is not always up-to-date. For a stable user experience
|
||||
we recommend using the default jar option instead.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq plantuml-default-exec-mode 'jar)
|
||||
(setq-default dotspacemacs-configuration-layers '((plantuml :variables plantuml-default-exec-mode 'server)))
|
||||
#+END_SRC
|
||||
|
||||
* Org-Babel Integration
|
||||
|
@ -69,7 +72,7 @@ To enable the execution of embedded plantuml code blocks within [[http://orgmode
|
|||
documents, define a value for =org-plantuml-jar-path= in your =~/.spacemacs=:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers '((plantuml :variables org-plantuml-jar-path "~/plantUml.jar")))
|
||||
(setq-default dotspacemacs-configuration-layers '((plantuml :variables plantuml-jar-path "~/plantUml.jar" org-plantuml-jar-path "~/plantUml.jar")))
|
||||
#+END_SRC
|
||||
|
||||
* Key bindings
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
:mode ("\\.\\(pum\\|puml\\)\\'" . plantuml-mode)
|
||||
:config
|
||||
(progn
|
||||
;; Our default is jar execution, not server as server is not working reliable see #13574
|
||||
(setq plantuml-default-exec-mode 'jar)
|
||||
(when (boundp 'spacemacs-indent-sensitive-modes)
|
||||
;; for now plantuml electric indentation is buggy and does not
|
||||
;; really work, let's disable auto-indentation on paste for
|
||||
|
|
|
@ -159,13 +159,6 @@ Additionally you can install the following other packages:
|
|||
# for mypy checking (python 3.4+ is needed)
|
||||
pip install pyls-mypy
|
||||
pip install pyls-black
|
||||
pip install rope
|
||||
pip install pyflakes
|
||||
pip install mccabe
|
||||
pip install pycodestyle
|
||||
pip install pydocstyle
|
||||
pip install autopep8
|
||||
pip install yapf
|
||||
#+END_SRC
|
||||
|
||||
If you've installed the language server and related packages as development
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Python Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,44 +9,43 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq python-packages
|
||||
'(
|
||||
blacken
|
||||
company
|
||||
counsel-gtags
|
||||
cython-mode
|
||||
dap-mode
|
||||
eldoc
|
||||
evil-matchit
|
||||
flycheck
|
||||
ggtags
|
||||
helm-cscope
|
||||
helm-gtags
|
||||
(helm-pydoc :requires helm)
|
||||
importmagic
|
||||
live-py-mode
|
||||
(nose :location local)
|
||||
org
|
||||
pip-requirements
|
||||
pipenv
|
||||
pippel
|
||||
py-isort
|
||||
pyenv-mode
|
||||
(pylookup :location local)
|
||||
pytest
|
||||
(python :location built-in)
|
||||
pyvenv
|
||||
semantic
|
||||
smartparens
|
||||
stickyfunc-enhance
|
||||
xcscope
|
||||
yapfify
|
||||
;; packages for anaconda backend
|
||||
anaconda-mode
|
||||
(company-anaconda :requires company)
|
||||
;; packages for Microsoft LSP backend
|
||||
(lsp-python-ms :requires lsp-mode)
|
||||
))
|
||||
(defconst python-packages
|
||||
'(
|
||||
blacken
|
||||
company
|
||||
counsel-gtags
|
||||
cython-mode
|
||||
dap-mode
|
||||
eldoc
|
||||
evil-matchit
|
||||
flycheck
|
||||
ggtags
|
||||
helm-cscope
|
||||
helm-gtags
|
||||
(helm-pydoc :requires helm)
|
||||
importmagic
|
||||
live-py-mode
|
||||
(nose :location local)
|
||||
org
|
||||
pip-requirements
|
||||
pipenv
|
||||
pippel
|
||||
py-isort
|
||||
pyenv-mode
|
||||
(pylookup :location local)
|
||||
pytest
|
||||
(python :location built-in)
|
||||
pyvenv
|
||||
semantic
|
||||
smartparens
|
||||
stickyfunc-enhance
|
||||
xcscope
|
||||
yapfify
|
||||
;; packages for anaconda backend
|
||||
anaconda-mode
|
||||
(company-anaconda :requires company)
|
||||
;; packages for Microsoft LSP backend
|
||||
(lsp-python-ms :requires lsp-mode)))
|
||||
|
||||
(defun python/init-anaconda-mode ()
|
||||
(use-package anaconda-mode
|
||||
|
@ -95,9 +94,9 @@
|
|||
(defun python/init-company-anaconda ()
|
||||
(use-package company-anaconda
|
||||
:if (eq (spacemacs//python-backend) 'anaconda)
|
||||
:defer t
|
||||
;; see `spacemacs//python-setup-anaconda-company'
|
||||
))
|
||||
:defer t))
|
||||
;; see `spacemacs//python-setup-anaconda-company'
|
||||
|
||||
|
||||
(defun python/init-blacken ()
|
||||
(use-package blacken
|
||||
|
@ -120,7 +119,8 @@
|
|||
"gu" 'anaconda-mode-find-references))))
|
||||
|
||||
(defun python/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'python-mode)
|
||||
(pcase (spacemacs//python-backend)
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'python-mode)))
|
||||
(add-hook 'python-mode-local-vars-hook #'spacemacs//python-setup-dap))
|
||||
|
||||
(defun python/post-init-eldoc ()
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
|
||||
;; variables
|
||||
|
||||
(spacemacs|define-jump-handlers racket-mode racket-visit-definition)
|
||||
(spacemacs|define-jump-handlers racket-mode racket-xp-mode racket-xp-visit-definition)
|
||||
|
|
|
@ -54,7 +54,8 @@
|
|||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(spacemacs/register-repl 'racket-mode 'racket-repl "racket"))
|
||||
(spacemacs/register-repl 'racket-mode 'racket-repl "racket")
|
||||
(add-hook 'racket-mode-hook 'racket-xp-mode))
|
||||
:config
|
||||
(progn
|
||||
;; smartparens configuration
|
||||
|
@ -74,7 +75,12 @@
|
|||
`insert state'."
|
||||
(interactive)
|
||||
(racket-run-and-switch-to-repl)
|
||||
(evil-insert-state))
|
||||
(when (buffer-live-p (get-buffer racket-repl-buffer-name))
|
||||
;; We don't need to worry about the first time the REPL is opened,
|
||||
;; since the first time, insert state is automatically entered (since
|
||||
;; it's registered as a REPL?).
|
||||
(with-current-buffer racket-repl-buffer-name
|
||||
(evil-insert-state))))
|
||||
|
||||
(defun spacemacs/racket-send-last-sexp-focus ()
|
||||
"Call `racket-send-last-sexp' and switch to REPL buffer in
|
||||
|
@ -100,23 +106,36 @@
|
|||
(racket-repl)
|
||||
(evil-insert-state))
|
||||
|
||||
(dolist (prefix '(("mg" . "navigation")
|
||||
(dolist (prefix '(("mE" . "errors")
|
||||
("mg" . "navigation")
|
||||
("mh" . "doc")
|
||||
("mi" . "insert")
|
||||
("mr" . "refactor")
|
||||
("ms" . "repl")
|
||||
("mt" . "tests")))
|
||||
(spacemacs/declare-prefix-for-mode 'racket-mode (car prefix) (cdr prefix)))
|
||||
|
||||
(spacemacs/set-leader-keys-for-major-mode 'racket-mode
|
||||
;; errors
|
||||
"En" 'racket-xp-next-error
|
||||
"EN" 'racket-xp-previous-error
|
||||
;; navigation
|
||||
"g`" 'racket-unvisit
|
||||
"gg" 'racket-xp-visit-definition
|
||||
"gn" 'racket-xp-next-definition
|
||||
"gN" 'racket-xp-previous-definition
|
||||
"gm" 'racket-visit-module
|
||||
"gr" 'racket-open-require-path
|
||||
"gu" 'racket-xp-next-use
|
||||
"gU" 'racket-xp-previous-use
|
||||
;; doc
|
||||
"hd" 'racket-describe
|
||||
"hh" 'racket-doc
|
||||
"ha" 'racket-xp-annotate
|
||||
"hd" 'racket-xp-describe
|
||||
"hh" 'racket-xp-documentation
|
||||
;; insert
|
||||
"il" 'racket-insert-lambda
|
||||
;; refactor
|
||||
"mr" 'racket-xp-rename
|
||||
;; REPL
|
||||
"'" 'racket-repl
|
||||
"sb" 'racket-run
|
||||
|
@ -128,8 +147,8 @@
|
|||
"si" 'racket-repl
|
||||
"sr" 'racket-send-region
|
||||
"sR" 'spacemacs/racket-send-region-focus
|
||||
"ss" 'racket-repl
|
||||
;; Tests
|
||||
"tb" 'racket-test
|
||||
"tB" 'spacemacs/racket-test-with-coverage)
|
||||
(define-key racket-mode-map (kbd "H-r") 'racket-run))))
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Ruby Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -37,8 +37,7 @@
|
|||
ruby-tools
|
||||
rvm
|
||||
seeing-is-believing
|
||||
smartparens
|
||||
))
|
||||
smartparens))
|
||||
|
||||
(defun ruby/init-bundler ()
|
||||
(use-package bundler
|
||||
|
@ -70,8 +69,9 @@
|
|||
(spacemacs/counsel-gtags-define-keys-for-mode 'enh-ruby-mode))
|
||||
|
||||
(defun ruby/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'ruby-mode)
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'enh-ruby-mode)
|
||||
(pcase (spacemacs//ruby-backend)
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'ruby-mode)
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'enh-ruby-mode)))
|
||||
(spacemacs/add-to-hooks #'spacemacs//ruby-setup-dap
|
||||
'(ruby-mode-local-vars-hook
|
||||
enh-ruby-mode-local-vars-hook)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Rust Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Chris Hoeppner <me@mkaito.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,21 +9,20 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq rust-packages
|
||||
'(
|
||||
cargo
|
||||
company
|
||||
counsel-gtags
|
||||
dap-mode
|
||||
flycheck
|
||||
(flycheck-rust :requires flycheck)
|
||||
ggtags
|
||||
helm-gtags
|
||||
racer
|
||||
rust-mode
|
||||
smartparens
|
||||
toml-mode
|
||||
))
|
||||
(defconst rust-packages
|
||||
'(
|
||||
cargo
|
||||
company
|
||||
counsel-gtags
|
||||
dap-mode
|
||||
flycheck
|
||||
(flycheck-rust :requires flycheck)
|
||||
ggtags
|
||||
helm-gtags
|
||||
racer
|
||||
rust-mode
|
||||
smartparens
|
||||
toml-mode))
|
||||
|
||||
(defun rust/init-cargo ()
|
||||
(use-package cargo
|
||||
|
@ -64,7 +63,8 @@
|
|||
(spacemacs/counsel-gtags-define-keys-for-mode 'rust-mode))
|
||||
|
||||
(defun rust/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'rust-mode)
|
||||
(pcase (spacemacs//rust-backend)
|
||||
(`lsp (add-to-list 'spacemacs--dap-supported-modes 'rust-mode)))
|
||||
(add-hook 'rust-mode-local-vars-hook #'spacemacs//rust-setup-dap))
|
||||
|
||||
(defun rust/post-init-flycheck ()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
- [[#enable-debug-adapter-protocol-dap][Enable Debug Adapter Protocol (DAP)]]
|
||||
- [[#automatically-show-the-type-of-the-symbol-under-the-cursor][Automatically show the type of the symbol under the cursor]]
|
||||
- [[#automatically-insert-asterisk-in-multiline-comments][Automatically insert asterisk in multiline comments]]
|
||||
- [[#automatically-replace-arrows-with-unicode-ones][Automatically replace arrows with unicode ones]]
|
||||
- [[#deprecated-automatic-replacement-of-arrows-with-unicode-ones][Deprecated: Automatic replacement of arrows with Unicode ones]]
|
||||
- [[#enable-gtags-as-a-fallback-navigation-utility][Enable GTags as a fallback navigation utility]]
|
||||
- [[#auto-start][Auto-start]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
|
@ -202,19 +202,24 @@ variable =scala-auto-insert-asterisk-in-comments= to =t=.
|
|||
(scala :variables scala-auto-insert-asterisk-in-comments t)))
|
||||
#+END_SRC
|
||||
|
||||
* Automatically replace arrows with unicode ones
|
||||
To replace ~=>~, =->= and =<-= with unicode arrows =⇒=, =→= and =←=, set the
|
||||
variable =scala-use-unicode-arrows= to =t=.
|
||||
|
||||
If in some occasions you don't want the arrows replaced (for example when
|
||||
defining compound operators like ~=>>~), you can always undo the change and get
|
||||
the ascii arrows back.
|
||||
* Deprecated: Automatic replacement of arrows with Unicode ones
|
||||
Scala used to support Unicode arrows =⇒=, =→= as aliases for ~=>~, =->= and =<-=, and the
|
||||
Scala layer would do the conversion to Unicode for you if you set
|
||||
=scala-use-unicode-arrows= to =t=. As the Unicode arrows are now [[https://github.com/scala/scala/pull/7540][deprecated]] in
|
||||
Scala, this variable has been dropped from the Scala layer. If it is still in
|
||||
your Scala layer variables like so:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers '(
|
||||
(scala :variables scala-use-unicode-arrows t)))
|
||||
#+END_SRC
|
||||
|
||||
Then you will need to remove it:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers '(scala))
|
||||
#+END_SRC
|
||||
|
||||
* Enable GTags as a fallback navigation utility
|
||||
To enable gtags when in scala-mode, in case metals, or, ensime are not fully
|
||||
functioning set the variable =scala-enable-gtags= to =t=.
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
(defvar scala-auto-insert-asterisk-in-comments nil
|
||||
"If non-nil automatically insert leading asterisk in multi-line comments.")
|
||||
|
||||
(defvar scala-use-unicode-arrows nil
|
||||
"If non-nil then `->`, `=>` and `<-` are replaced with unicode arrows.")
|
||||
|
||||
(defconst scala-backends '(scala-ensime scala-metals)
|
||||
"Backend server implementation to enable advanced IDE language features")
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
|
||||
(defun spacemacs//scala-setup-treeview ()
|
||||
"Setup lsp-treemacs for Scala."
|
||||
(lsp-metals-treeview-enable t)
|
||||
(setq lsp-metals-treeview-show-when-views-received t))
|
||||
|
||||
(defun spacemacs//scala-disable-flycheck-scala ()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Scala Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,21 +9,20 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq scala-packages
|
||||
'(
|
||||
lsp-mode
|
||||
dap-mode
|
||||
eldoc
|
||||
flycheck
|
||||
flyspell
|
||||
lsp-treemacs
|
||||
counsel-gtags
|
||||
ggtags
|
||||
helm-gtags
|
||||
(ensime :toggle (spacemacs//scala-backend-ensime-p))
|
||||
sbt-mode
|
||||
scala-mode
|
||||
))
|
||||
(defconst scala-packages
|
||||
'(
|
||||
lsp-mode
|
||||
(lsp-metals :toggle (spacemacs//scala-backend-metals-p))
|
||||
dap-mode
|
||||
eldoc
|
||||
flycheck
|
||||
flyspell
|
||||
counsel-gtags
|
||||
ggtags
|
||||
helm-gtags
|
||||
(ensime :toggle (spacemacs//scala-backend-ensime-p))
|
||||
sbt-mode
|
||||
scala-mode))
|
||||
|
||||
(defun scala/post-init-eldoc ()
|
||||
(when (and scala-enable-eldoc (spacemacs//scala-backend-ensime-p))
|
||||
|
@ -221,46 +220,6 @@
|
|||
(evil-define-key 'insert scala-mode-map
|
||||
(kbd "RET") 'scala/newline-and-indent-with-asterisk)
|
||||
|
||||
;; Automatically replace arrows with unicode ones when enabled
|
||||
(defconst scala-unicode-arrows-alist
|
||||
'(("=>" . "⇒")
|
||||
("->" . "→")
|
||||
("<-" . "←")))
|
||||
|
||||
(defun scala/replace-arrow-at-point ()
|
||||
"Replace the arrow before the point (if any) with unicode ones.
|
||||
An undo boundary is inserted before doing the replacement so that
|
||||
it can be undone."
|
||||
(let* ((end (point))
|
||||
(start (max (- end 2) (point-min)))
|
||||
(x (buffer-substring start end))
|
||||
(arrow (assoc x scala-unicode-arrows-alist)))
|
||||
(when arrow
|
||||
(undo-boundary)
|
||||
(backward-delete-char 2)
|
||||
(insert (cdr arrow)))))
|
||||
|
||||
(defun scala/gt ()
|
||||
"Insert a `>' to the buffer.
|
||||
If it's part of a right arrow (`->' or `=>'),replace it with the corresponding
|
||||
unicode arrow."
|
||||
(interactive)
|
||||
(insert ">")
|
||||
(scala/replace-arrow-at-point))
|
||||
|
||||
(defun scala/hyphen ()
|
||||
"Insert a `-' to the buffer.
|
||||
If it's part of a left arrow (`<-'),replace it with the unicode arrow."
|
||||
(interactive)
|
||||
(insert "-")
|
||||
(scala/replace-arrow-at-point))
|
||||
|
||||
(when scala-use-unicode-arrows
|
||||
(define-key scala-mode-map
|
||||
(kbd ">") 'scala/gt)
|
||||
(define-key scala-mode-map
|
||||
(kbd "-") 'scala/hyphen))
|
||||
|
||||
(evil-define-key 'normal scala-mode-map "J" 'spacemacs/scala-join-line)
|
||||
|
||||
;; Compatibility with `aggressive-indent'
|
||||
|
@ -270,15 +229,18 @@ If it's part of a left arrow (`<-'),replace it with the unicode arrow."
|
|||
scala-indent:operator-strategy))))
|
||||
|
||||
(defun scala/pre-init-dap-mode ()
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'scala-mode)
|
||||
(when (spacemacs//scala-backend-metals-p)
|
||||
(add-to-list 'spacemacs--dap-supported-modes 'scala-mode))
|
||||
(spacemacs//scala-setup-dap))
|
||||
|
||||
(defun scala/post-init-lsp-mode ()
|
||||
(when (spacemacs//scala-backend-metals-p)
|
||||
(spacemacs//scala-setup-metals)))
|
||||
|
||||
(defun scala/post-init-lsp-treemacs ()
|
||||
(when (spacemacs//scala-backend-metals-p)
|
||||
(defun scala/init-lsp-metals ()
|
||||
(use-package lsp-metals
|
||||
:defer t
|
||||
:init
|
||||
(spacemacs//scala-setup-treeview)))
|
||||
|
||||
(defun scala/post-init-ggtags ()
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
"smst" 'mc/reverse-regions)
|
||||
(setq mc/always-run-for-all t)
|
||||
(with-eval-after-load 'multiple-cursors-core
|
||||
(add-to-list 'mc/cmds-to-run-once 'helm-M-x)
|
||||
(add-to-list 'mc/cmds-to-run-once 'spacemacs/helm-M-x-fuzzy-matching)
|
||||
(add-to-list 'mc/cmds-to-run-once 'counsel-M-x)
|
||||
(add-to-list 'mc/cmds-to-run-once 'spacemacs/default-pop-shell)
|
||||
))))
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
(setq osx-packages
|
||||
'(
|
||||
exec-path-from-shell
|
||||
helm
|
||||
launchctl
|
||||
(osx-dictionary :toggle osx-use-dictionary-app)
|
||||
|
@ -25,18 +24,15 @@
|
|||
;; Enable built-in trash support via finder API if available (only on Emacs
|
||||
;; macOS Port)
|
||||
(when (boundp 'mac-system-move-file-to-trash-use-finder)
|
||||
(setq mac-system-move-file-to-trash-use-finder t)))
|
||||
(setq mac-system-move-file-to-trash-use-finder t))
|
||||
|
||||
(defun osx/post-init-exec-path-from-shell ()
|
||||
;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq
|
||||
;; dired-use-ls-dired nil)' to your config to suppress the Dired warning when
|
||||
;; not using GNU ls. We must look for `gls' after `exec-path-from-shell' was
|
||||
;; initialized to make sure that `gls' is in `exec-path'
|
||||
(when (spacemacs/system-is-mac)
|
||||
(let ((gls (executable-find "gls")))
|
||||
(when gls
|
||||
(setq insert-directory-program gls
|
||||
dired-listing-switches "-aBhl --group-directories-first")))))
|
||||
;; not using GNU ls.
|
||||
(let ((gls (executable-find "gls")))
|
||||
(when gls
|
||||
(setq insert-directory-program gls
|
||||
dired-listing-switches "-aBhl --group-directories-first"))))
|
||||
|
||||
(defun osx/pre-init-helm ()
|
||||
;; Use `mdfind' instead of `locate'.
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
- [[#log-selection-buffer][Log selection buffer]]
|
||||
- [[#interactive-rebase-buffer][Interactive rebase buffer]]
|
||||
- [[#quick-guide-for-recurring-use-cases-in-magit][Quick guide for recurring use cases in Magit]]
|
||||
- [[#git-blame-transient-state][Git Blame Transient State]]
|
||||
- [[#git-flow-1][Git-Flow]]
|
||||
- [[#git-time-machine][Git time machine]]
|
||||
- [[#git-links-to-web-services][Git links to web services]]
|
||||
|
@ -248,6 +249,27 @@ A log selection buffer is presented as an interactive way of selecting a recent
|
|||
- ~F -r C-u F~ and choose =upstream= or the name you gave to it
|
||||
- ~P P~ to push the commit to =origin=
|
||||
|
||||
** Git Blame Transient State
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+----------------------------------------------------------|
|
||||
| ~SPC g b~ | start magit-blame and open the git blame transient state |
|
||||
| ~?~ | toggle hint |
|
||||
| ~p~ | prev chunk |
|
||||
| ~P~ | prev chunk same commit |
|
||||
| ~n~ | next chunk |
|
||||
| ~N~ | next chunk same commit |
|
||||
| ~RET~ | show commit |
|
||||
| ~b~ | show commits with adding lines |
|
||||
| ~r~ | show commits with removing lines |
|
||||
| ~f~ | show last commits that still have lines |
|
||||
| ~e~ | show line revision info in echo area (not read only) |
|
||||
| ~q~ | kill recursive blame buffer or disable magit-blame-mode |
|
||||
| ~c~ | cycle style |
|
||||
| ~Y~ | copy hash |
|
||||
| ~B~ | magit-blame (magit transient) |
|
||||
| ~Q~ | quit transient state |
|
||||
|
||||
** Git-Flow
|
||||
[[https://github.com/jtatarik/magit-gitflow][magit-gitflow]] provides git-flow commands in its own magit menu.
|
||||
|
||||
|
|
|
@ -16,3 +16,6 @@
|
|||
|
||||
(defvar git-magit-status-fullscreen nil
|
||||
"If non nil magit-status buffer is displayed in fullscreen.")
|
||||
|
||||
(defvar spacemacs--git-blame-ts-full-hint-toggle nil
|
||||
"Display git blame transient state documentation.")
|
||||
|
|
|
@ -76,3 +76,35 @@
|
|||
(t
|
||||
(when (featurep 'evil-magit)
|
||||
(evil-magit-revert)))))
|
||||
|
||||
|
||||
;; git blame transient state
|
||||
|
||||
(defun spacemacs//git-blame-ts-toggle-hint ()
|
||||
"Toggle the full hint docstring for the git blame transient state."
|
||||
(interactive)
|
||||
(setq spacemacs--git-blame-ts-full-hint-toggle
|
||||
(not spacemacs--git-blame-ts-full-hint-toggle)))
|
||||
|
||||
(defun spacemacs//git-blame-ts-hint ()
|
||||
"Return a condensed/full hint for the git-blame transient state"
|
||||
(concat
|
||||
" "
|
||||
(if spacemacs--git-blame-ts-full-hint-toggle
|
||||
spacemacs--git-blame-ts-full-hint
|
||||
(concat "[" (propertize "?" 'face 'hydra-face-red) "] help"
|
||||
spacemacs--git-blame-ts-minified-hint))))
|
||||
|
||||
(spacemacs|transient-state-format-hint git-blame
|
||||
spacemacs--git-blame-ts-minified-hint "\n
|
||||
Chunks: _n_ _N_ _p_ _P_ _RET_ Commits: _b_ _r_ _f_ _e_ _q_")
|
||||
|
||||
(spacemacs|transient-state-format-hint git-blame
|
||||
spacemacs--git-blame-ts-full-hint
|
||||
(format "\n[_?_] toggle help
|
||||
Chunks^^^^ Commits^^ Other
|
||||
[_p_/_P_] prev /same commit [_b_] adding lines [_c_] cycle style
|
||||
[_n_/_N_] next /same commit [_r_] removing lines [_Y_] copy hash
|
||||
[_RET_]^^ show commit [_f_] last commit with lines [_B_] magit-blame
|
||||
^^^^ [_e_] echo [_Q_] quit TS
|
||||
^^^^ [_q_] quit blaming"))
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
;; key bindings
|
||||
(spacemacs/declare-prefix "gf" "file")
|
||||
(spacemacs/set-leader-keys
|
||||
"gb" 'spacemacs/git-blame-micro-state
|
||||
"gb" 'spacemacs/git-blame-transient-state/body
|
||||
"gc" 'magit-clone
|
||||
"gfF" 'magit-find-file
|
||||
"gfl" 'magit-log-buffer-file
|
||||
|
@ -175,26 +175,35 @@
|
|||
"gs" 'magit-status
|
||||
"gS" 'magit-stage-file
|
||||
"gU" 'magit-unstage-file)
|
||||
;; transient state
|
||||
;; TODO use transient state instead of old micro-state, IIRC we continue
|
||||
;; to use micro-state because of the re-entry keyword :on-enter which is
|
||||
;; not available in transient state
|
||||
(spacemacs|define-micro-state git-blame
|
||||
(spacemacs|define-transient-state git-blame
|
||||
:title "Git Blame Transient State"
|
||||
:doc "
|
||||
Press [_b_] again to blame further in the history, [_q_] to go up or quit."
|
||||
:hint-is-doc t
|
||||
:dynamic-hint (spacemacs//git-blame-ts-hint)
|
||||
:on-enter (let (golden-ratio-mode)
|
||||
(unless (bound-and-true-p magit-blame-mode)
|
||||
(call-interactively 'magit-blame-addition)))
|
||||
:foreign-keys run
|
||||
:bindings
|
||||
("?" spacemacs//git-blame-ts-toggle-hint)
|
||||
;; chunks
|
||||
("p" magit-blame-previous-chunk)
|
||||
("P" magit-blame-previous-chunk-same-commit)
|
||||
("n" magit-blame-next-chunk)
|
||||
("N" magit-blame-next-chunk-same-commit)
|
||||
("RET" magit-show-commit)
|
||||
;; commits
|
||||
("b" magit-blame-addition)
|
||||
;; here we use the :exit keyword because we should exit the
|
||||
;; micro-state only if the magit-blame-quit effectively disable
|
||||
;; the magit-blame mode.
|
||||
("q" nil :exit (progn (when (bound-and-true-p magit-blame-mode)
|
||||
(magit-blame-quit))
|
||||
(not (bound-and-true-p magit-blame-mode))))))
|
||||
("r" magit-blame-removal)
|
||||
("f" magit-blame-reverse)
|
||||
("e" magit-blame-echo)
|
||||
;; q closes any open blame buffers, one at a time,
|
||||
;; closing the last blame buffer disables magit-blame-mode,
|
||||
;; pressing q in this state closes the git blame TS
|
||||
("q" magit-blame-quit :exit (not (bound-and-true-p magit-blame-mode)))
|
||||
;; other
|
||||
("c" magit-blame-cycle-style)
|
||||
("Y" magit-blame-copy-hash)
|
||||
("B" magit-blame :exit t)
|
||||
("Q" nil :exit t)))
|
||||
:config
|
||||
(progn
|
||||
;; seems to be necessary at the time of release
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
("/" "search project")
|
||||
("?" "show keybindings")
|
||||
("a" "applications")
|
||||
("at" "tools")
|
||||
("atg" "geolocation")
|
||||
("A" "other applications")
|
||||
("c" "compile/comments")
|
||||
("C" "capture/colors")
|
||||
|
|
|
@ -221,21 +221,25 @@
|
|||
(use-package origami
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(let
|
||||
((rebind-normal-to-motion-state-map
|
||||
(lambda (key def)
|
||||
(define-key evil-normal-state-map key nil)
|
||||
(define-key evil-motion-state-map key def))))
|
||||
(global-origami-mode)
|
||||
(define-key evil-normal-state-map "za" 'origami-forward-toggle-node)
|
||||
(define-key evil-normal-state-map "zc" 'origami-close-node)
|
||||
(define-key evil-normal-state-map "zC" 'origami-close-node-recursively)
|
||||
(define-key evil-normal-state-map "zO" 'origami-open-node-recursively)
|
||||
(define-key evil-normal-state-map "zo" 'origami-open-node)
|
||||
(define-key evil-normal-state-map "zr" 'origami-open-all-nodes)
|
||||
(define-key evil-normal-state-map "zm" 'origami-close-all-nodes)
|
||||
(define-key evil-normal-state-map "zs" 'origami-show-only-node)
|
||||
(define-key evil-normal-state-map "zn" 'origami-next-fold)
|
||||
(define-key evil-normal-state-map "zp" 'origami-previous-fold)
|
||||
(define-key evil-normal-state-map "zR" 'origami-reset)
|
||||
(define-key evil-normal-state-map (kbd "z <tab>") 'origami-recursively-toggle-node)
|
||||
(define-key evil-normal-state-map (kbd "z TAB") 'origami-recursively-toggle-node)
|
||||
(funcall rebind-normal-to-motion-state-map "za" 'origami-forward-toggle-node)
|
||||
(funcall rebind-normal-to-motion-state-map "zc" 'origami-close-node)
|
||||
(funcall rebind-normal-to-motion-state-map "zC" 'origami-close-node-recursively)
|
||||
(funcall rebind-normal-to-motion-state-map "zO" 'origami-open-node-recursively)
|
||||
(funcall rebind-normal-to-motion-state-map "zo" 'origami-open-node)
|
||||
(funcall rebind-normal-to-motion-state-map "zr" 'origami-open-all-nodes)
|
||||
(funcall rebind-normal-to-motion-state-map "zm" 'origami-close-all-nodes)
|
||||
(funcall rebind-normal-to-motion-state-map "zs" 'origami-show-only-node)
|
||||
(funcall rebind-normal-to-motion-state-map "zn" 'origami-next-fold)
|
||||
(funcall rebind-normal-to-motion-state-map "zp" 'origami-previous-fold)
|
||||
(funcall rebind-normal-to-motion-state-map "zR" 'origami-reset)
|
||||
(funcall rebind-normal-to-motion-state-map (kbd "z <tab>") 'origami-recursively-toggle-node)
|
||||
(funcall rebind-normal-to-motion-state-map (kbd "z TAB") 'origami-recursively-toggle-node)
|
||||
|
||||
(spacemacs|define-transient-state fold
|
||||
:title "Code Fold Transient State"
|
||||
|
|
|
@ -66,3 +66,12 @@ in case none of the regular names can be used for a new layout.")
|
|||
|
||||
(defvar spacemacs-layouts-restrict-spc-tab nil
|
||||
"If `t' then `SPC-TAB' will be limited to the current layout's buffers.")
|
||||
|
||||
(defvar layouts-enable-local-variables t
|
||||
"Allow variables to be specified as layout-local (value local to a particular layout).")
|
||||
|
||||
(defvar spacemacs--layout-local-variables nil
|
||||
"List of variables that will be local to the current layout.")
|
||||
|
||||
(defvar spacemacs--layout-local-map (ht-create)
|
||||
"Map of layouts to their local variable values.")
|
||||
|
|
|
@ -71,8 +71,9 @@ Cancels autosave on exiting perspectives mode."
|
|||
(persp-switch spacemacs--last-selected-layout)))
|
||||
|
||||
(defun spacemacs-layouts/non-restricted-buffer-list-helm ()
|
||||
"Show all buffers accross all layouts."
|
||||
(interactive)
|
||||
(let ((ido-make-buffer-list-hook (remove #'persp-restrict-ido-buffers ido-make-buffer-list-hook)))
|
||||
(let ((helm-buffer-list-reorder-fn #'helm-buffers-reorder-buffer-list))
|
||||
(helm-mini)))
|
||||
|
||||
(defun spacemacs-layouts/non-restricted-buffer-list-ivy ()
|
||||
|
@ -128,7 +129,7 @@ Cancels autosave on exiting perspectives mode."
|
|||
(concat " "
|
||||
(mapconcat (lambda (persp)
|
||||
(spacemacs//layout-format-name
|
||||
persp (position persp persp-list)))
|
||||
persp (cl-position persp persp-list)))
|
||||
persp-list " | "))))
|
||||
(concat
|
||||
formatted-persp-list
|
||||
|
@ -450,7 +451,6 @@ perspectives does."
|
|||
:sources
|
||||
`(,(spacemacs//helm-perspectives-source)
|
||||
,(helm-build-dummy-source "Create new perspective"
|
||||
:requires-pattern t
|
||||
:action
|
||||
'(("Create new perspective" .
|
||||
spacemacs//create-persp-with-home-buffer)
|
||||
|
@ -547,6 +547,21 @@ Run PROJECT-ACTION on project."
|
|||
'spacemacs/helm-project-smart-do-search))))
|
||||
:buffer "*Helm Projectile Layouts*"))
|
||||
|
||||
(defun spacemacs//make-helm-list-reorder-fn (fn)
|
||||
"Take a function `helm-buffer-list-reorder-fn' and return a
|
||||
`helm-buffer-list-reorder-fn' function.
|
||||
This the return function will filter out buffers not in layout and then
|
||||
pass results to FN."
|
||||
(lambda (visibles others)
|
||||
(funcall fn
|
||||
(seq-remove #'spacemacs//layout-not-contains-buffer-p visibles)
|
||||
(seq-remove #'spacemacs//layout-not-contains-buffer-p others))))
|
||||
|
||||
(defun spacemacs//persp-helm-setup ()
|
||||
"Set new `helm-buffer-list-reorder-fn'.
|
||||
Compose it with a new one that will filter out a buffers on in current layout."
|
||||
(let ((my-wrapper (spacemacs//make-helm-list-reorder-fn helm-buffer-list-reorder-fn)))
|
||||
(setq helm-buffer-list-reorder-fn my-wrapper)))
|
||||
|
||||
;; Ivy integration
|
||||
(defun spacemacs//ivy-persp-switch-project-action (project)
|
||||
|
@ -816,3 +831,32 @@ containing the buffer."
|
|||
(append (persp-parameter 'gui-eyebrowse-window-configs persp)
|
||||
(persp-parameter 'term-eyebrowse-window-configs persp)))
|
||||
(eyebrowse--rename-window-config-buffers window-config old new)))))
|
||||
|
||||
|
||||
;; layout local variables
|
||||
|
||||
(defun spacemacs/make-variable-layout-local (&rest vars)
|
||||
"Make variables become layout-local whenever they are set.
|
||||
Accepts a list of VARIABLE, DEFAULT-VALUE pairs.
|
||||
|
||||
(spacemacs/make-variable-layout-local 'foo 1 'bar 2)"
|
||||
(cl-loop for (symbol default-value) on vars by 'cddr
|
||||
do (add-to-list 'spacemacs--layout-local-variables (cons symbol default-value))))
|
||||
|
||||
(defun spacemacs//load-layout-local-vars (persp-name &rest _)
|
||||
"Load the layout-local values of variables for PERSP-NAME."
|
||||
(let ((layout-local-vars (-filter 'boundp
|
||||
(-map 'car
|
||||
spacemacs--layout-local-variables))))
|
||||
;; save the current layout
|
||||
(ht-set! spacemacs--layout-local-map
|
||||
(spacemacs//current-layout-name)
|
||||
(--map (cons it (symbol-value it))
|
||||
layout-local-vars))
|
||||
;; load the default values into the new layout
|
||||
(--each layout-local-vars
|
||||
(set it (alist-get it spacemacs--layout-local-variables)))
|
||||
;; override with the previously bound values for the new layout
|
||||
(--when-let (ht-get spacemacs--layout-local-map persp-name)
|
||||
(-each it
|
||||
(-lambda ((var . val)) (set var val))))))
|
||||
|
|
|
@ -104,6 +104,7 @@
|
|||
|
||||
|
||||
(defun spacemacs-layouts/post-init-helm ()
|
||||
(with-eval-after-load 'helm (spacemacs//persp-helm-setup))
|
||||
(spacemacs/set-leader-keys
|
||||
"bB" 'spacemacs-layouts/non-restricted-buffer-list-helm
|
||||
"pl" 'spacemacs/helm-persp-switch-project))
|
||||
|
@ -223,9 +224,12 @@
|
|||
(add-hook 'persp-mode-hook 'spacemacs//layout-autosave)
|
||||
(advice-add 'persp-load-state-from-file
|
||||
:before 'spacemacs//layout-wait-for-modeline)
|
||||
(when layouts-enable-local-variables
|
||||
(advice-add 'persp-switch :before #'spacemacs//load-layout-local-vars))
|
||||
(dolist (fn spacemacs-layouts-restricted-functions)
|
||||
(advice-add fn
|
||||
:around 'spacemacs-layouts//advice-with-persp-buffer-list))
|
||||
(spacemacs/declare-prefix "b" "persp-buffers")
|
||||
(spacemacs/set-leader-keys
|
||||
"ba" 'persp-add-buffer
|
||||
"br" 'persp-remove-buffer))))
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
;; `org' package.
|
||||
(default-org-config :location built-in)
|
||||
(org-plus-contrib :step pre)
|
||||
org-bullets
|
||||
org-superstar
|
||||
(space-doc :location local)
|
||||
toc-org
|
||||
))
|
||||
|
@ -62,10 +62,10 @@
|
|||
;; Open links and files with RET in normal state
|
||||
(evil-define-key 'normal org-mode-map (kbd "RET") 'org-open-at-point)))))
|
||||
|
||||
(defun spacemacs-org/init-org-bullets ()
|
||||
(use-package org-bullets
|
||||
(defun spacemacs-org/init-org-superstar ()
|
||||
(use-package org-super-star
|
||||
:defer t
|
||||
:init (add-hook 'org-mode-hook 'org-bullets-mode)))
|
||||
:init (add-hook 'org-mode-hook 'org-superstar-mode)))
|
||||
|
||||
(defun spacemacs-org/init-toc-org ()
|
||||
(use-package toc-org
|
||||
|
|
|
@ -110,9 +110,9 @@ Display BUFFER as a popup buffer, according to the settings in
|
|||
|
||||
See `purpose-special-action-sequences' for a description of BUFFER and
|
||||
ALIST."
|
||||
(do ((display-fns (pupo//actions (cdr (popwin:match-config buffer)))
|
||||
(cdr display-fns))
|
||||
(window nil (and display-fns (funcall (car display-fns) buffer alist))))
|
||||
(cl-do ((display-fns (pupo//actions (cdr (popwin:match-config buffer)))
|
||||
(cdr display-fns))
|
||||
(window nil (and display-fns (funcall (car display-fns) buffer alist))))
|
||||
((or window (null display-fns)) window)))
|
||||
|
||||
(defun pupo/after-display (window)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
- [[#install][Install]]
|
||||
- [[#gnu-global-gtags][GNU Global (gtags)]]
|
||||
- [[#install-on-ubuntu][Install on Ubuntu]]
|
||||
- [[#install-on-arch-linux][Install on Arch Linux]]
|
||||
- [[#install-on-macos-using-homebrew][Install on macOS using Homebrew]]
|
||||
- [[#install-on-nix-from-source][Install on *nix from source]]
|
||||
- [[#install-recommended-dependencies][Install recommended dependencies]]
|
||||
|
@ -64,6 +65,11 @@ recommend installing from source.
|
|||
sudo apt-get install global
|
||||
#+END_SRC
|
||||
|
||||
*** Install on Arch Linux
|
||||
#+BEGIN_SRC sh
|
||||
yay -S global
|
||||
#+END_SRC
|
||||
|
||||
*** Install on macOS using Homebrew
|
||||
#+BEGIN_SRC sh
|
||||
brew install global
|
||||
|
@ -86,12 +92,36 @@ or e.g. Archlinux:
|
|||
#+END_SRC
|
||||
|
||||
**** Install with recommended features
|
||||
Download the latest tar.gz archive, then run these commands:
|
||||
Download the latest tar.gz archive from [[https://www.gnu.org/software/global/download.html][GNU Global Download page]].
|
||||
|
||||
Also check which version of gcc your system is using by default as this will influence the next steps:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
gcc --version
|
||||
#+END_SRC
|
||||
|
||||
Then run these commands:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
tar xvf global-<version>.tar.gz
|
||||
cd global-<version>
|
||||
#+END_SRC
|
||||
|
||||
If you have gcc version 10 then you will have to force building with an earlier version of gcc like so:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
./configure CC=gcc-8 --with-exuberant-ctags=/usr/bin/ctags
|
||||
#+END_SRC
|
||||
|
||||
Otherwise do not need to specify a CC flag
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
./configure --with-exuberant-ctags=/usr/bin/ctags
|
||||
#+END_SRC
|
||||
|
||||
And finally:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
make
|
||||
sudo make install
|
||||
#+END_SRC
|
||||
|
|
|
@ -33,4 +33,4 @@ file.
|
|||
|
||||
| Key binding | Description |
|
||||
|-------------+--------------------|
|
||||
| ~SPC a b~ | bm transient state |
|
||||
| ~SPC a t b~ | bm transient state |
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
;; Toggle
|
||||
("t" bm-toggle))
|
||||
(evil-leader/set-key
|
||||
"ab" 'spacemacs/bm-transient-state/body)
|
||||
"atb" 'spacemacs/bm-transient-state/body)
|
||||
(advice-add 'spacemacs/bm-transient-state/body
|
||||
:before #'bm-buffer-restore))
|
||||
:config (progn
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
This layer adds support for CFEngine policies to Spacemacs.
|
||||
|
||||
** Features:
|
||||
- Syntax highlighting
|
||||
- Syntax highlighting (CFEngine DSL, Mustache)
|
||||
- On the fly syntax checking via =flycheck= integration.
|
||||
- Auto completion via =company= integration.
|
||||
- Execution of =cfengine3= =SRC= blocks in =org-mode= via =ob-cfengine3= package.
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
flycheck
|
||||
(ob-cfengine3 :requires org)
|
||||
org
|
||||
mustache-mode
|
||||
))
|
||||
|
||||
(defun cfengine/init-cfengine3-mode ()
|
||||
|
@ -43,3 +44,8 @@
|
|||
(when (configuration-layer/layer-used-p 'org)
|
||||
(spacemacs|use-package-add-hook org
|
||||
:post-config (add-to-list 'org-babel-load-languages '(cfengine3 . t)))))
|
||||
|
||||
(defun cfengine/init-mustache-mode ()
|
||||
(use-package mustache-mode
|
||||
:init (add-to-list 'auto-mode-alist '("\\.mustache\\'" . mustache-mode))
|
||||
:defer t))
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue