[emacs] Bump spacemacs to latest master
parent
8e2d7a1af8
commit
66fea501b2
1
Makefile
1
Makefile
|
@ -21,6 +21,7 @@ update-third-parties: update-zsh update-plug.vim update-spacemacs update-kubectx
|
|||
update-spacemacs:
|
||||
curl -s -L -o spacemacs-develop.tar.gz https://github.com/syl20bnr/spacemacs/archive/develop.tar.gz
|
||||
chezmoi import --strip-components 1 --destination ${HOME}/.emacs.d spacemacs-develop.tar.gz
|
||||
find ~/.emacs.d -name "*.elc" -print0 -exec rm {} \;
|
||||
|
||||
update-zsh:
|
||||
curl -s -L -o oh-my-zsh-master.tar.gz https://github.com/robbyrussell/oh-my-zsh/archive/master.tar.gz
|
||||
|
|
|
@ -35,10 +35,10 @@ the [[file:CHANGELOG.org][CHANGELOG.org]] file.
|
|||
** 0.300.0
|
||||
*** Hot new feature
|
||||
- Extensive use of lazy loading of packages and other tricks to reduce Spacemacs
|
||||
startup time. In most cases you should see a noticable improvement in load time
|
||||
and smoothness in startup. We also added the time spent to load your personal
|
||||
=dotspacemacs/user-config= so you can quickly spot if it is a bottleneck
|
||||
(thanks to Sylvain Benner, Ben Leggett, and bmag)
|
||||
startup time. In most cases you should see a noticable improvement in load
|
||||
time and smoothness in startup. We also added the time spent to load your
|
||||
personal =dotspacemacs/user-config= so you can quickly spot if it is a
|
||||
bottleneck (thanks to Sylvain Benner, Ben Leggett, and bmag)
|
||||
- Added support for native line numbers in Emacs 26+ (thanks to bmag)
|
||||
- Improved themes support. Support are now handled like regular packages. The
|
||||
list of themes now supports =:location= keyword like in package lists. More
|
||||
|
@ -64,7 +64,8 @@ the [[file:CHANGELOG.org][CHANGELOG.org]] file.
|
|||
- Added support for =ripgrep=. To enable it add =rg= to
|
||||
=dotspacemacs-search-tools=. =ripgrep= key bindings are under ~SPC s r~
|
||||
prefix. (thanks to Aron Griffis)
|
||||
- Make =ripgrep= work properly with =ripgrep config files= (thanks to Jacek Swierk)
|
||||
- Make =ripgrep= work properly with =ripgrep config files=
|
||||
(thanks to Jacek Swierk)
|
||||
- Simplify declaration of company backends, see the section
|
||||
=Add auto-completion in a layer= of the =README.org= file of the
|
||||
=auto-completion= layer.
|
||||
|
@ -191,6 +192,7 @@ the [[file:CHANGELOG.org][CHANGELOG.org]] file.
|
|||
(folded into ~SPC m i i~)
|
||||
- Removed ~SPC m i L~ for =markdown-insert-reference-link-dwim=
|
||||
(folded into ~SPC m i l~)
|
||||
- Added ~SPC m x k~ for =markdown-insert-kbd= (thanks to Ben Swift)
|
||||
***** nlinum
|
||||
- The =nlinum= layer is deprecated on Emacs 26.1 and newer in favor of native
|
||||
line number support (thanks to bmag)
|
||||
|
@ -270,7 +272,8 @@ sane way, here is the complete list of changed key bindings
|
|||
- ~SPC m t d c~ for =spacemacs/org-trello-pull-card=
|
||||
- ~SPC m t u b~ for =spacemacs/org-trello-push-buffer=
|
||||
- ~SPC m t u c~ for =spacemacs/org-trello-push-card=
|
||||
- New keybinding for =org-table-field-info= ~SPC m t f~ (thanks to Dominik Schrempf)
|
||||
- New keybinding for =org-table-field-info= ~SPC m t f~
|
||||
(thanks to Dominik Schrempf)
|
||||
***** Python
|
||||
- Key bindings (thanks to Danny Freeman):
|
||||
- Changed ~SPC m s F~ to ~SPC m e F~ for =lisp-eval-defun-and-go=
|
||||
|
@ -332,6 +335,7 @@ sane way, here is the complete list of changed key bindings
|
|||
- crystal (thanks to Sylvain Benner)
|
||||
- dart (thanks to Bruno Tavares)
|
||||
- dhall (thanks to Colin Woodbury)
|
||||
- elasticsearch (thanks to Jean Rigotti)
|
||||
- factor (thanks to timor)
|
||||
- forth (thanks to Tim Jaeger)
|
||||
- gpu (thanks to Evan Klitzke)
|
||||
|
@ -398,6 +402,7 @@ sane way, here is the complete list of changed key bindings
|
|||
*** Removed layers
|
||||
- evil-cleverparens (moved to =spacemacs-evil=)
|
||||
- extra-langs (replaced by =ad-hoc= layers)
|
||||
- flow-type (replaced by LSP in =javascript= layer)
|
||||
- ycmd (moved to =c-c++=)
|
||||
*** Dotfile changes
|
||||
- New Variables:
|
||||
|
@ -535,6 +540,8 @@ Other:
|
|||
(thanks to Spenser Truex)
|
||||
- Converted =case= to =cl-case= to fix =cl-lib= related errors
|
||||
(thanks to Nikita Leshenko)
|
||||
- Open Spacemacs home buffer in other/new window with prefix argument
|
||||
(thanks to duianto)
|
||||
- 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
|
||||
|
@ -619,6 +626,11 @@ Other:
|
|||
- Fixed ~SPC TAB~ in =spacemacs-base= distribution (thanks to duianto)
|
||||
- Frame title setting doesn't need to depend on environment (gui/cli)
|
||||
(thanks to Mpho Jele)
|
||||
- Replaced =destructuring-bind= with =cl-destructuring-bind=
|
||||
(thanks to duianto)
|
||||
- Ignore nils in dotspacemacs-configuration-layers (thanks to Ag)
|
||||
- Fixed redundant package version checking during update
|
||||
(thanks to aaronjensen)
|
||||
- Other:
|
||||
- New function =configuration-layer/message= to display message in
|
||||
=*Messages*= buffer (thanks to Sylvain Benner)
|
||||
|
@ -709,33 +721,33 @@ Other:
|
|||
(thanks to Codruț Constantin Gușoi)
|
||||
- New key binding ~SPC b H~ to open or select the =*Help*= buffer
|
||||
(thanks to duianto)
|
||||
- New ~SPC E~ prefix for ediff commands:
|
||||
- ~SPC E b 3~ ediff-buffers3
|
||||
- ~SPC E b b~ ediff-buffers
|
||||
- ~SPC E p b~ ediff-patch-buffer
|
||||
- ~SPC E B~ ediff-backup
|
||||
- ~SPC E d 3~ ediff-directories3
|
||||
- ~SPC E d d~ ediff-directories
|
||||
- ~SPC E d r~ ediff-directory-revisions
|
||||
- ~SPC E f .~ spacemacs/ediff-dotfile-and-template
|
||||
- ~SPC E f 3~ ediff-files3
|
||||
- ~SPC E f f~ ediff-files
|
||||
- ~SPC E f p~ ediff-patch-file
|
||||
- ~SPC E h~ ediff-documentation
|
||||
- ~SPC E m b 3~ ediff-merge-buffers-with-ancestor
|
||||
- ~SPC E m b b~ ediff-merge-buffers
|
||||
- ~SPC E m d 3~ ediff-merge-directories-with-ancestor
|
||||
- ~SPC E m d d~ ediff-merge-directories
|
||||
- ~SPC E m f 3~ ediff-merge-files-with-ancestor
|
||||
- ~SPC E m f f~ ediff-merge-files
|
||||
- ~SPC E m r 3~ ediff-merge-revisions-with-ancestor
|
||||
- ~SPC E m r r~ ediff-merge-revisions
|
||||
- ~SPC E r l~ ediff-regions-linewise
|
||||
- ~SPC E r w~ ediff-regions-wordwise
|
||||
- ~SPC E s~ ediff-show-registry
|
||||
- ~SPC E v~ ediff-revision
|
||||
- ~SPC E w l~ ediff-windows-linewise
|
||||
- ~SPC E w w~ ediff-windows-wordwise
|
||||
- New ~SPC D~ prefix for diff commands using =ediff=:
|
||||
- ~SPC D b 3~ ediff-buffers3
|
||||
- ~SPC D b b~ ediff-buffers
|
||||
- ~SPC D b p~ ediff-patch-buffer
|
||||
- ~SPC D B~ ediff-backup
|
||||
- ~SPC D d 3~ ediff-directories3
|
||||
- ~SPC D d d~ ediff-directories
|
||||
- ~SPC D d r~ ediff-directory-revisions
|
||||
- ~SPC D f .~ spacemacs/ediff-dotfile-and-template
|
||||
- ~SPC D f 3~ ediff-files3
|
||||
- ~SPC D f f~ ediff-files
|
||||
- ~SPC D f p~ ediff-patch-file
|
||||
- ~SPC D h~ ediff-documentation
|
||||
- ~SPC D m b 3~ ediff-merge-buffers-with-ancestor
|
||||
- ~SPC D m b b~ ediff-merge-buffers
|
||||
- ~SPC D m d 3~ ediff-merge-directories-with-ancestor
|
||||
- ~SPC D m d d~ ediff-merge-directories
|
||||
- ~SPC D m f 3~ ediff-merge-files-with-ancestor
|
||||
- ~SPC D m f f~ ediff-merge-files
|
||||
- ~SPC D m r 3~ ediff-merge-revisions-with-ancestor
|
||||
- ~SPC D m r r~ ediff-merge-revisions
|
||||
- ~SPC D r l~ ediff-regions-linewise
|
||||
- ~SPC D r w~ ediff-regions-wordwise
|
||||
- ~SPC D s~ ediff-show-registry
|
||||
- ~SPC D v~ ediff-revision
|
||||
- ~SPC D w l~ ediff-windows-linewise
|
||||
- ~SPC D w w~ ediff-windows-wordwise
|
||||
(thanks to Spenser Truex)
|
||||
- New ~SPC K~ prefix and subprefixes to use keyboard macros built-ins:
|
||||
- ~SPC K (~ kmacro-start-macro-or-insert-counter
|
||||
|
@ -989,6 +1001,7 @@ Other:
|
|||
- With the =hybrid= editing style in =normal= state:
|
||||
- ~n~ =evil-search-next=
|
||||
- ~N~ =evil-search-previous=
|
||||
- Added ~SPC x d l~ =delete-blank-lines= (thanks to duianto)
|
||||
- Improvements:
|
||||
- Rewrote window layout functions for ~SPC w 1~, ~SPC w 2~, ~SPC w 3~, and
|
||||
~SPC w 4~ (thanks to Codruț Constantin Gușoi):
|
||||
|
@ -1259,6 +1272,7 @@ Other:
|
|||
- Fixed =evilified-state=, mapped ~C-w~ to =evil-window-map=
|
||||
(thanks to Muneeb Shaikh)
|
||||
- Fixed ~SPC h f~ =helm-spacemacs-help-faq= (thanks to duianto)
|
||||
- Fixed =cl= package deprecated =letf= (thanks to duianto)
|
||||
*** Layer changes and fixes
|
||||
**** Agda
|
||||
- Fixes
|
||||
|
@ -1302,6 +1316,7 @@ Other:
|
|||
- Use =counsel-company= to show completion candidates
|
||||
(thanks to Kalle Lindqvist)
|
||||
- Added =company-semantic= as a default company backend (thanks to bet4it)
|
||||
- Don't install =company-statistics= unless necessary (thanks to Tianshu Wang)
|
||||
- Fixes:
|
||||
- Check if =dotspacemacs-directory-snippets-dir= exists before adding it
|
||||
(thanks to Wojciech Wojtyniak)
|
||||
|
@ -1417,7 +1432,8 @@ Other:
|
|||
- Allowed to send input to the REPL via ~RET~ in normal mode
|
||||
(thanks to Dieter Komendera)
|
||||
- Improved spacemacs-jump-handlers (thanks to Ag Ibragimov)
|
||||
- Autoscroll to end of REPL when sending buffer content (thanks to Vitaly Banchenko)
|
||||
- Autoscroll to end of REPL when sending buffer content
|
||||
(thanks to Vitaly Banchenko)
|
||||
- Added ability to use multiple linters together (thanks to didibus)
|
||||
- Key bindings:
|
||||
- ~SPC m e ;~ to eval sexp and show result as comment
|
||||
|
@ -1463,6 +1479,44 @@ Other:
|
|||
- Removed ~SPC m h g~ for =grimoire= as it is deprecated (thanks to Sam Hedin)
|
||||
- ~C-return~ to =cider-repl-newline-and-indent= in REPL evil insert state
|
||||
(thanks to Gia Thanh Vuong)
|
||||
- changed clear repl buffer of evaluation to match terminal clear key
|
||||
~SPC s s l~ 'cider-repl-clear-buffer
|
||||
~SPC s s L~ 'cider-find-and-clear-repl-output
|
||||
(thanks to John Stevenson)
|
||||
- Add sesman session management keybindings to ~SPC m m~
|
||||
~SPC m m b~ 'sesman-browser
|
||||
~SPC m m i~ 'sesman-info
|
||||
~SPC m m g~ 'sesman-goto
|
||||
~SPC m m l b~ 'sesman-link-buffer
|
||||
~SPC m m l d~ 'sesman-link-directory
|
||||
~SPC m m l p~ 'sesman-link-project
|
||||
~SPC m m l u~ 'sesman-unlink
|
||||
~SPC m m q q~ 'sesman-quit
|
||||
~SPC m m q r~ 'sesman-restart
|
||||
~SPC m m s~ 'sesman-start
|
||||
~SPC m m S j~ 'cider-connect-sibling-clj
|
||||
~SPC m m S s~ 'cider-connect-sibling-cljs
|
||||
(thanks to John Stevenson)
|
||||
- updated repl shortcut to use sesman-start wrapper, selecting any repl type
|
||||
~SPC m '~ 'sesman-start
|
||||
- changed toggle between source and repl to match key for toggle between code
|
||||
and test
|
||||
~SPC m s a~ (if (eq m 'cider-repl-mode)
|
||||
'cider-switch-to-last-clojure-buffer
|
||||
'cider-switch-to-repl-buffer)
|
||||
(thanks to John Stevenson)
|
||||
- added formatting command not previously included
|
||||
~SPC m = =~ 'cider-format-buffer
|
||||
~SPC m = e b~ 'cider-format-edn-last-sexp
|
||||
~SPC m = e e~ 'cider-format-edn-last-sexp
|
||||
~SPC m = e r~ 'cider-format-edn-region
|
||||
~SPC m = f~ 'cider-format-defun
|
||||
~SPC m = l ~ 'cider-format-region
|
||||
~SPC m = r~ 'cider-format-region
|
||||
(thanks to John Stevenson)
|
||||
- added evaluation keybinding - evaluate up to point
|
||||
~SPC m e V~ 'cider-eval-sexp-up-to-point
|
||||
(thanks to John Stevenson)
|
||||
- Fixes:
|
||||
- Removed =cider.nrepl/cider-middleware= in lein quick start setting
|
||||
- Fixed =cider-inspector-prev-page= binding, also add ~p~ as another key
|
||||
|
@ -1515,6 +1569,9 @@ Other:
|
|||
- Fixed ~SPC m e~ key bindings to behave like in Emacs Lisp
|
||||
(thanks to Boris Avdeev)
|
||||
- Fixed initialization of =counsel-gtags= (thanks to Sylvain Benner)
|
||||
**** Coq
|
||||
- Key bindings:
|
||||
- ~SPC m T e~ Toggle electric terminator (thanks to Ignat Insarov)
|
||||
**** Cscope
|
||||
- Key bindings:
|
||||
- Fixed key binding ~g C~ (thanks to dubnde)
|
||||
|
@ -1574,6 +1631,8 @@ Other:
|
|||
- ~SPC m o~ deft open file in other window (thanks to Bahtiar Gadimov)
|
||||
- ~SPC m q~ for quitting the deft window (thanks to tinysong)
|
||||
- ~SPC m r~ rename selected note (thanks to Bahtiar Gadimov)
|
||||
- When zetteldeft is enabled, ~SPC a n~ is moved to ~SPC a n n~
|
||||
- Added zetteldeft support
|
||||
**** Django
|
||||
- Key bindings:
|
||||
- Added names to django mode prefixes (thanks to Boris Verhovsky)
|
||||
|
@ -1703,6 +1762,11 @@ Other:
|
|||
- ~SPC m r~ for predefined keymap =ess-extra-map=
|
||||
- ~SPC m w~ for predefined keymap =ess-r-package-dev-map=
|
||||
- ~SPC m d~ for predefined keymap =ess-dev-map=
|
||||
- Change some leader keys (thanks to Seong Yong-ju)
|
||||
- ~SPC m E~ for predefined keymap =ess-extra-map=
|
||||
- ~SPC m D~ for predefined keymap =ess-r-package-dev-map=
|
||||
- ~SPC m d~ for predefined keymap =ess-dev-map=
|
||||
- Removed noweb bindings since it no longer works (thanks to Seong Yong-ju)
|
||||
- Fixed issue with read-only REPL buffer (thanks to Jack Kamm)
|
||||
- Added ess layer variable =ess-disable-underscore-assign= (thanks to Jack Kamm)
|
||||
- Remove =ess-R-object-popup= from ess layer (thanks to Naylyn Gaffney)
|
||||
|
@ -1715,6 +1779,7 @@ Other:
|
|||
- Update ess-disable-underscore-assign for ESS 18.10 (thanks to Leonard Lausen)
|
||||
- Update layer with the latest upstream changes (thanks to Guido Kraemer)
|
||||
- Evilified states for ess help buffer (thanks to ft)
|
||||
- Added LSP support for R (thanks to Seong Yong-ju)
|
||||
**** Evil snipe
|
||||
- Must always explicitly enable =evil-snipe-mode= even when
|
||||
=evil-snipe-override-mode= is enabled (thanks to Sylvain Benner)
|
||||
|
@ -1917,6 +1982,8 @@ Other:
|
|||
- ~C-k~ switch to previous history item
|
||||
- ~C-l~ clear the REPL
|
||||
(thanks to Joscha)
|
||||
- Reverted the REPL stuck snippets from checking if the =haskell= package is
|
||||
used, to checking if the =haskell= layer is used (thanks to duianto)
|
||||
**** Helm
|
||||
- New packages:
|
||||
- =helm-ls-git= (thanks to duianto)
|
||||
|
@ -1944,7 +2011,7 @@ Other:
|
|||
- Updated =helm-xref= to set the correct =xref-show-xrefs-function= for
|
||||
Emacs 27 (thanks to Junxuan)
|
||||
- Key bindings:
|
||||
- Added Key bindings for directory search (thanks to Tim Jäger and Eivind Fonn):
|
||||
- Added Key bindings for directory search:
|
||||
- ~SPC s d for =spacemacs/helm-dir-smart-do-search=
|
||||
- ~SPC s D for =spacemacs/helm-dir-smart-do-search-region-or-symbol=
|
||||
- ~SPC s a d for =spacemacs/helm-dir-do-ag=
|
||||
|
@ -1955,6 +2022,7 @@ Other:
|
|||
- ~SPC s r D for =spacemacs/helm-dir-do-rg-region-or-symbol=
|
||||
- ~SPC s t d for =spacemacs/helm-dir-do-pt=
|
||||
- ~SPC s t D for =spacemacs/helm-dir-do-pt-region-or-symbol=
|
||||
(thanks to Tim Jäger and Eivind Fonn)
|
||||
- Added ~SPC b U~ to list all useless buffers(thanks to Thomas de Beauchêne)
|
||||
- Added ~SPC s C~ for =helm-swoop-clear-cache= (thanks to Yang Qian)
|
||||
- Removed ~SPC s w w~ key binding for =helm-wikipedia-suggest=, which was
|
||||
|
@ -2107,6 +2175,7 @@ Other:
|
|||
(thanks to Carlos Ibáñez and Juuso Valkeejärvi)
|
||||
- Fix visual selection expansion across the buffer on `SPC s S` and `SPC s B`
|
||||
(thanks to Andriy Kmit)
|
||||
- Fixed =cl= package deprecated =letf*= (thanks to duianto)
|
||||
**** Imenu-list
|
||||
- Changed ~SPC b i~ to ~SPC b t~ for =imenu= tree view
|
||||
(thansk to Sylvain Benner)
|
||||
|
@ -2410,8 +2479,6 @@ Other:
|
|||
function (thanks to Profpatsch)
|
||||
- Associate nix-mode with .nix files (thanks to jpathy)
|
||||
- Updated layer banner (thanks to kalium)
|
||||
- Added option =nixos-enable-company= to toggle company auto-completion
|
||||
(thanks to bhipple)
|
||||
**** Nim
|
||||
- Added key binding ~SPC m h h~ to show symbol documentation
|
||||
(thanks to Valts Liepiņš)
|
||||
|
@ -2587,6 +2654,8 @@ Other:
|
|||
(thanks to duianto)
|
||||
- Fixed =org-present=: exiting presentation always removes inline images
|
||||
(thanks to Keith Pinson)
|
||||
- Replace =org-toggle-latex-fragment= with =org-latex-preview=
|
||||
(thanks to Tianshu Wang)
|
||||
**** Osx
|
||||
- Fixed OSX mapping issue (thanks to Joey Liu)
|
||||
- Added layer variables to customize modifier behaviors on macOS:
|
||||
|
@ -2610,7 +2679,6 @@ 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)
|
||||
- Use standard init function for ~exec-path-from-shell~ (thanks to Christopher Eames)
|
||||
**** Pandoc
|
||||
- Fixed =spacemacs/run-pandoc= not to reset =pandoc--local-settings=
|
||||
(thanks to martian-f)
|
||||
|
@ -2618,7 +2686,7 @@ Other:
|
|||
**** Perl5
|
||||
- Fixed =spacemacs/perltidy-format-buffer= and
|
||||
=spacemacs/perltidy-format-function= to move the point and window to their
|
||||
original locations.
|
||||
original locations. (thanks to Jim Pudar)
|
||||
**** PHP
|
||||
- Key bindings:
|
||||
- Added =phpunit= test key bindings (thanks to duianto):
|
||||
|
@ -2633,10 +2701,12 @@ Other:
|
|||
- Fixed php-company autocompletion (thanks to Dela Anthonio)
|
||||
- Added LSP support, which can be used by enabling the =lsp= layer and setting
|
||||
the =php= layer's =php-backend= variable to =lsp=
|
||||
(thanks to Daniel Richtmann)
|
||||
**** PlantUML
|
||||
- Added a missing prefix: =compile=
|
||||
- Added a missing prefix: =compile= (thanks to Seong Yong-ju)
|
||||
- Added instructions for compiling the image locally by setting
|
||||
=plantuml-default-exec-mode= to =jar= (thanks to Daniel Caixinha)
|
||||
- Updated link to Reference Guide (thanks to Matthew Boston)
|
||||
**** Platinum
|
||||
- Added the =.plum= extension to the platinum modes (thanks to Sylvain Benner)
|
||||
- Remove automatic indentation on paste (thanks to Sylvain Benner)
|
||||
|
@ -2663,7 +2733,8 @@ Other:
|
|||
- Made =python-execute-file= use =python-shell-interpreter=
|
||||
(thanks to Swaroop C H)
|
||||
- Trim output from pyenv command (thanks to Eivind Fonn)
|
||||
- Set VIRTUAL_ENV environment variable when switching to new pyenv (thanks to James Gough)
|
||||
- Set VIRTUAL_ENV environment variable when switching to new pyenv
|
||||
(thanks to James Gough)
|
||||
- Use Python executable from active virtual env to compile files
|
||||
(thanks to Swaroop C H)
|
||||
- Fixed arguments to =python-setup-hy= (thanks to Eivind Fonn)
|
||||
|
@ -2731,7 +2802,9 @@ Other:
|
|||
- Fix lazy loading of =lsp-python-ms= (thanks to lsp-ableton)
|
||||
- Fix =Ipython= path on windows (thanks to Daniel K)
|
||||
- Make =inferior-python-mode= do not use tabs (thanks to tsoernes)
|
||||
- Automatic use the =lsp= as =python-formater= when =lsp= is enabled (thanks sunlin7)
|
||||
- Automatic use the =lsp= as =python-formater= when =lsp= is enabled
|
||||
(thanks sunlin7)
|
||||
- Fixed directory selection for self compiled mspyls (thanks Jee Lee)
|
||||
**** Racket
|
||||
- Restore smart closing paren behavior in racket-mode (thanks to Don March)
|
||||
- Updated racket logo (thanks to Vityou)
|
||||
|
@ -2840,9 +2913,11 @@ Other:
|
|||
- Added =lsp= and =dap= support (thanks to Billy Kaplan)
|
||||
- Fixed lazy loading of =ruby-test-mode= (thanks to Michael Franz Aigner)
|
||||
- Removed stray =test.rb= file (thanks to Michael Hauser-Raspe)
|
||||
- Added missing key bindings for =counsel-gtags= in =enh=ruby-mode= (thanks to Seong Yong-ju)
|
||||
- Added missing key bindings for =counsel-gtags= in =enh=ruby-mode=
|
||||
(thanks to Seong Yong-ju)
|
||||
- Added =dap= support for =enh-ruby-mode= (thanks to Seong Yong-ju)
|
||||
- Added missing prefix =seeing-is-believing= for ~SPC m @~ (thanks to Seong Yong-ju)
|
||||
- Added missing prefix =seeing-is-believing= for ~SPC m @~
|
||||
(thanks to Seong Yong-ju)
|
||||
**** Ruby on Rails
|
||||
- Changed leader keys to be configured for the =projectile-rails-mode= minor
|
||||
mode instead of =ruby-mode= and =enh-ruby-mode= so that the key bindings will
|
||||
|
@ -2953,6 +3028,8 @@ Other:
|
|||
- Enabled mouse based pasting into term shells (thanks to Sheng Yang)
|
||||
- Set =term-char-mode-point-at-process-mark= to =nil= to allow evil normal-mode
|
||||
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)
|
||||
**** Shell Scripts
|
||||
- Added new company-shell environment variable backend
|
||||
(thanks to Alexander-Miller)
|
||||
|
@ -3082,7 +3159,8 @@ Other:
|
|||
- Added =eziam-theme= and =kaolin-themes= (thanks to Sylvain Benner)
|
||||
- Added =doom-themes= (thanks to Codruț Constantin Gușoi)
|
||||
- Added =chocolate-theme= (thanks to Henrique Jung)
|
||||
- Updated =doom-themes= list to reflect upstream (thanks to Dominic Pearson)
|
||||
- Updated =doom-themes= list to reflect upstream
|
||||
(thanks to Dominic Pearson, Muneeb Shaikh)
|
||||
**** Tmux
|
||||
- Prevent =tmux-command= at GUI mode (thanks to Isaac Zeng)
|
||||
- Fixed regression in tmux by setting keybindings using =use-package=
|
||||
|
@ -3103,6 +3181,10 @@ Other:
|
|||
be controlled by directly setting =treemacs-collapse-dirs=.
|
||||
- Fixed "width (un)locked" message appearing when treemacs is loaded.
|
||||
- Add =persp-mode= integration (thanks to Seong Yong-ju)
|
||||
- Fixed default sort order (thanks to Michael Peyton Jones)
|
||||
- Deleted default values to track upstream behavior
|
||||
(thanks to Michael Peyton Jones)
|
||||
- Removed obsolete options (thanks to Michael Peyton Jones)
|
||||
**** Typescript
|
||||
- Call tsfmt with extension of current buffer for TSX formatting
|
||||
(thanks to Victor Andrée)
|
||||
|
@ -3227,38 +3309,39 @@ Other:
|
|||
Renner, Adam Frey, Adam Kruszewski, ahanwadi, Aleksandr Argunov, Alexander
|
||||
Dalshov, Alexander Eberspächer, Alexander Iljin, Alexander Kjeldaas,
|
||||
Alexandros Kotzias, Andrew Grangaard, Andrew Vit, Andriy Senyshyn, Anton
|
||||
Latukha, Antonio Miranda, Anurag Sharma, Archenoth, Arjan Singh, Ather Sharif,
|
||||
Artur Juraszek, Benjamin Reynolds, Bernhard Schommer, Billy Wade, Brian
|
||||
Wignall, bmag, Boris Buliga, Boris Wong, Carl Lange, Cazim Hysi, Chase Adams,
|
||||
Christian Bäuerlein, Cibin Mathew, CL123123, Codruț Constantin Gușoi,
|
||||
Compro-Prasad, cormacc, Daniel Hodson, Daniel Le, Daniel Molina, Darkhan,
|
||||
David Florness, David Parrish, David Vo, davidpham87, Deepu Mohan Puthrote,
|
||||
Dela Anthonio, Diego Alvarez, Diego Berrocal, Dietrich Daroch, Dinesh Bhosale,
|
||||
Dominik Schrempf, Doug Beardsley, dubnde, duianto, eldios, EMayej, Eugene
|
||||
Yaremenko, Evan Klitzke, Evan Niessen-Derry, firemiles, Florian Bruhin, Fuqiao
|
||||
Xue, Gabriel Arrillaga, Garrett Johnson, Grant Shangreaux, Guido Kraemer,
|
||||
Henrique Jung, Henry Hirsch, Henry Marshall, hornuda, Hong Xu, Ilia Kurenkov,
|
||||
Ivan Fedorov, Ivan Kryvoruchko, J. Patrick Lanigan, Jaremy Creechley, Jason
|
||||
Axelson, Jesse Cooke, Jethro Shuwen Sun, JI Xiang, Jim Deville, Jody
|
||||
Frankowski, Joe Hillenbrand, John Eismeier, John Wood, Jon Tippens, Jonas
|
||||
Strømsodd, Jonathan Arnett, Jonathan Chen, Jonathan Gillett, Josh Greenwood,
|
||||
Joshua Santos, Justin Stone, Kainalu Hagiwara, Kalle Lindqvist, Kechao Cai,
|
||||
Keith Simmons, Keith Wygant, Kenji Miyazaki ,Kevin Ji, Kristoffer Haugsbakk,
|
||||
lawrsp, Leo Joseph Buchignani III, liuchong, Lucius Hu, Luke Winship, Luke
|
||||
Worth, Marco Ieni, Marco Zucconelli, Max Beutelspacher, Max Deineko, Max
|
||||
Nordlund, Maximilian Wolff, Miciah Dashiel Butler Masters, mjkramer, Mikhail
|
||||
Yakutovich, Miloš Mošić, milserk, Muneeb Shaikh, Nasser Alshammari, Niko
|
||||
Felger, Nikolai Myllymäki, nikolaiam, Nicolas Forgerit, Oguz Serbetci, Olivier
|
||||
Verdier, Pancho Horrillo, Paul Milla, Paulo Schneider, Pawan Dubey, Paweł
|
||||
Siudak, Phil Pirozhkov, Philippe Bourdages, Piotr Grzesik, Rafi Khan,
|
||||
Rand01ph, rakyi, Raymond Wanyoike, Reverend Homer, Robby O'Connor, Rhommel
|
||||
Lamas, Sam Pablo Kuper, Saulius Menkevičius, sduthil, Serghei Iakovlev, Sergio
|
||||
Ugalde, Shane Kilkelly, Sid Kapur, Som Poddar, Somelauw, Soobin Rho, sorawee,
|
||||
SteveJobzniak, 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)
|
||||
Latukha, Antonio Miranda, Anurag Sharma, Apromixately, Archenoth, Arjan Singh,
|
||||
Ather Sharif, Artur Juraszek, Benjamin Reynolds, Bernhard Schommer, Billy
|
||||
Wade, Brian Wignall, bmag, Boris Buliga, Boris Wong, Carl Lange, Cazim Hysi,
|
||||
Chase Adams, Christian Bäuerlein, Cibin Mathew, CL123123, Codruț Constantin
|
||||
Gușoi, Compro-Prasad, cormacc, Daniel Hodson, Daniel Le, Daniel Molina,
|
||||
Darkhan, David Florness, David Parrish, David Vo, davidpham87, Deepu Mohan
|
||||
Puthrote, Dela Anthonio, Diego Alvarez, Diego Berrocal, Dietrich Daroch,
|
||||
Dinesh Bhosale, Dominik Schrempf, Doug Beardsley, dubnde, duianto, eldios,
|
||||
EMayej, Eugene Yaremenko, Evan Klitzke, Evan Niessen-Derry, firemiles, Florian
|
||||
Bruhin, Fuqiao Xue, Gabriel Arrillaga, Garrett Johnson, Grant Shangreaux,
|
||||
Guido Kraemer, Henrique Jung, Henry Hirsch, Henry Marshall, hornuda, Hong Xu,
|
||||
Ilia Kurenkov, Ivan Fedorov, Ivan Kryvoruchko, J. Patrick Lanigan, Jaremy
|
||||
Creechley, Jason Axelson, Jesse Cooke, Jethro Shuwen Sun, JI Xiang, Jim
|
||||
Deville, Jody Frankowski, Joe Hillenbrand, John Eismeier, John Wood, Jon
|
||||
Tippens, Jonas Strømsodd, Jonathan Arnett, Jonathan Chen, Jonathan Gillett,
|
||||
Josh Greenwood, Joshua Santos, Justin Stone, Kainalu Hagiwara, Kalle
|
||||
Lindqvist, Kechao Cai, Keith Simmons, Keith Wygant, Kenji Miyazaki ,Kevin Ji,
|
||||
Kristoffer Haugsbakk, lawrsp, Leo Joseph Buchignani III, liuchong, Lucius Hu,
|
||||
Luke Winship, Luke Worth, Marco Ieni, Marco Zucconelli, Max Beutelspacher, Max
|
||||
Deineko, Max Nordlund, Maximilian Wolff, Miciah Dashiel Butler Masters,
|
||||
mjkramer, Mikhail Yakutovich, Miloš Mošić, milserk, Muneeb Shaikh, Nasser
|
||||
Alshammari, Niko Felger, Nikolai Myllymäki, nikolaiam, Nicolas Forgerit, Oguz
|
||||
Serbetci, Olivier Verdier, Pancho Horrillo, Paul Milla, Paulo Schneider, Pawan
|
||||
Dubey, Paweł Siudak, Phil Pirozhkov, Philippe Bourdages, Piotr Grzesik, Rafi
|
||||
Khan, Rand01ph, rakyi, Raymond Wanyoike, Reverend Homer, Robby O'Connor,
|
||||
Rhommel Lamas, Sam Pablo Kuper, Saulius Menkevičius, sduthil, Serghei
|
||||
Iakovlev, Sergio Ugalde, Shane Kilkelly, Sid Kapur, Som Poddar, Somelauw,
|
||||
Soobin Rho, sorawee, SteveJobzniak, 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)
|
||||
**** Documentation and website
|
||||
- DOCUMENTATION.org:
|
||||
- Fixed the example for how to change the separator style
|
||||
|
|
|
@ -296,7 +296,7 @@ be transferred using http, use at your own risk.
|
|||
git clone https://github.com/syl20bnr/spacemacs /path/to/your/.emacs.d
|
||||
```
|
||||
|
||||
3. Install the default fonts
|
||||
3. (Optional) Install the default fonts
|
||||
|
||||
It's recommended to install [Source Code Pro][] by Adobe, as the default
|
||||
font. It ensures that, for example the symbols on the modeline (bottom bar)
|
||||
|
@ -315,7 +315,19 @@ be transferred using http, use at your own risk.
|
|||
If you're running in a terminal then you'll also need to change the terminals
|
||||
font settings.
|
||||
|
||||
4. Launch Emacs, and answer the questions in the Dotfile wizard installer. If
|
||||
4. Launch Emacs. Spacemacs will automatically install the packages it requires.
|
||||
There is a well-known issue with some GPG keys having expired end of 2019.
|
||||
This can be fixed by upgrading to Emacs 26.3 or above or by manually adding
|
||||
the new keys using something like:
|
||||
```sh
|
||||
gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40
|
||||
```
|
||||
If you have a restrictive firewall it may help to manually specify the keyserver:
|
||||
```sh
|
||||
gpg --keyserver keyserver.ubuntu.com --homedir ~/.emacs.d/elpa/gnupg/ --receive-keys 066DAFCB81E42C40
|
||||
```
|
||||
|
||||
5. Launch Emacs, and answer the questions in the Dotfile wizard installer. If
|
||||
you are new to Emacs and Spacemacs, then it's fine to just accept the default
|
||||
choices. It's easy to try the other choices later, without having to
|
||||
reinstall Spacemacs. They can be changed in the dotfile `~/.spacemacs`.
|
||||
|
@ -325,16 +337,16 @@ be transferred using http, use at your own risk.
|
|||
Restart Emacs to complete the installation.
|
||||
|
||||
**Notes:**
|
||||
If you get an error regarding package downloads, then you can try to
|
||||
disable the HTTPS protocol by starting Emacs with the `--insecure` argument:
|
||||
|
||||
If you are behind a firewall or similar and you get an error regarding package
|
||||
downloads then you may try to disable the HTTPS protocol by starting Emacs with
|
||||
```sh
|
||||
emacs --insecure
|
||||
```
|
||||
but this should be a last resort because of the security implications.
|
||||
|
||||
Or you can set the `dotspacemacs-elpa-https` variable to `nil` in your
|
||||
dotfile `~/.spacemacs`. That will remove the need to start Emacs with the
|
||||
`--insecure` argument. You may also want to clear out your `.emacs.d/elpa`
|
||||
You can set the `dotspacemacs-elpa-https` variable to `nil` in your
|
||||
dotfile `~/.spacemacs` but this has the same security implications as the
|
||||
insecure flag. You may also want to clear out your `.emacs.d/elpa`
|
||||
directory before doing this, so that any corrupted packages you may have
|
||||
downloaded will be re-installed.
|
||||
|
||||
|
|
|
@ -1496,7 +1496,7 @@ whether the declared layer is an used one or not."
|
|||
(setq configuration-layer--used-layers nil)
|
||||
(let ((configuration-layer--declared-layers-usedp t))
|
||||
(unless configuration-layer-exclude-all-layers
|
||||
(dolist (layer-specs layers-specs)
|
||||
(dolist (layer-specs (remove nil layers-specs))
|
||||
(let* ((layer-name (if (listp layer-specs)
|
||||
(car layer-specs)
|
||||
layer-specs))
|
||||
|
@ -1827,27 +1827,35 @@ RNAME is the name symbol of another existing layer."
|
|||
"to add a recipe for it in alist %S.")
|
||||
pkg-name recipes-var))))
|
||||
|
||||
(defun configuration-layer//filter-packages-with-deps
|
||||
(defun configuration-layer//filter-packages-with-deps-recur
|
||||
(pkg-names filter &optional use-archive)
|
||||
"Return a filtered PKG-NAMES list where each elements satisfies FILTER."
|
||||
(when pkg-names
|
||||
(let (result)
|
||||
(dolist (pkg-name pkg-names)
|
||||
;; recursively check dependencies
|
||||
(let* ((deps
|
||||
(if use-archive
|
||||
(configuration-layer//get-package-deps-from-archive
|
||||
pkg-name)
|
||||
(configuration-layer//get-package-deps-from-alist pkg-name)))
|
||||
(install-deps
|
||||
(when deps (configuration-layer//filter-packages-with-deps
|
||||
(mapcar 'car deps) filter))))
|
||||
(when install-deps
|
||||
(setq result (append install-deps result))))
|
||||
(when (funcall filter pkg-name)
|
||||
(add-to-list 'result pkg-name t)))
|
||||
(when (not (memq pkg-name checked-packages))
|
||||
(push pkg-name checked-packages)
|
||||
;; recursively check dependencies
|
||||
(let* ((deps
|
||||
(if use-archive
|
||||
(configuration-layer//get-package-deps-from-archive
|
||||
pkg-name)
|
||||
(configuration-layer//get-package-deps-from-alist pkg-name)))
|
||||
(install-deps
|
||||
(when deps (configuration-layer//filter-packages-with-deps-recur
|
||||
(mapcar 'car deps) filter))))
|
||||
(when install-deps
|
||||
(setq result (append install-deps result))))
|
||||
(when (funcall filter pkg-name)
|
||||
(add-to-list 'result pkg-name t))))
|
||||
(delete-dups result))))
|
||||
|
||||
(defun configuration-layer//filter-packages-with-deps
|
||||
(pkg-names filter &optional use-archive)
|
||||
"Return a filtered PKG-NAMES list where each elements satisfies FILTER."
|
||||
(let ((checked-packages))
|
||||
(configuration-layer//filter-packages-with-deps-recur pkg-names filter use-archive)))
|
||||
|
||||
(defun configuration-layer//get-uninstalled-packages (pkg-names)
|
||||
"Return a filtered list of PKG-NAMES to install."
|
||||
(configuration-layer//filter-packages-with-deps
|
||||
|
|
|
@ -323,7 +323,7 @@ current window.
|
|||
If `spacemacs-layouts-restrict-spc-tab' is `t' then this only switches between
|
||||
the current layouts buffers."
|
||||
(interactive)
|
||||
(destructuring-bind (buf start pos)
|
||||
(cl-destructuring-bind (buf start pos)
|
||||
(if (bound-and-true-p spacemacs-layouts-restrict-spc-tab)
|
||||
(let ((buffer-list (persp-buffer-list))
|
||||
(my-buffer (window-buffer window)))
|
||||
|
|
|
@ -1008,7 +1008,9 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
|
|||
|
||||
(defun spacemacs-buffer/goto-buffer (&optional refresh)
|
||||
"Create the special buffer for `spacemacs-buffer-mode' and switch to it.
|
||||
REFRESH if the buffer should be redrawn."
|
||||
REFRESH if the buffer should be redrawn.
|
||||
|
||||
If a prefix argument is given, switch to it in an other, possibly new window."
|
||||
(interactive)
|
||||
(let ((buffer-exists (buffer-live-p (get-buffer spacemacs-buffer-name)))
|
||||
(save-line nil))
|
||||
|
@ -1045,7 +1047,9 @@ REFRESH if the buffer should be redrawn."
|
|||
(forward-line (1- save-line))
|
||||
(forward-to-indentation 0))
|
||||
(spacemacs-buffer/goto-link-line)))
|
||||
(switch-to-buffer spacemacs-buffer-name)
|
||||
(if current-prefix-arg
|
||||
(switch-to-buffer-other-window spacemacs-buffer-name)
|
||||
(switch-to-buffer spacemacs-buffer-name))
|
||||
(spacemacs//redisplay))))
|
||||
|
||||
(add-hook 'window-setup-hook
|
||||
|
|
|
@ -175,17 +175,24 @@
|
|||
(sanityinc-tomorrow-eighties . color-theme-sanityinc-tomorrow)
|
||||
(sanityinc-tomorrow-night . color-theme-sanityinc-tomorrow)
|
||||
(doom-Iosvkem . doom-themes)
|
||||
(doom-acario-dark . doom-themes)
|
||||
(doom-acario-light . doom-themes)
|
||||
(doom-challenger-deep . doom-themes)
|
||||
(doom-city-lights . doom-themes)
|
||||
(doom-dark+ . doom-themes)
|
||||
(doom-dracula . doom-themes)
|
||||
(doom-fairy-floss . doom-themes)
|
||||
(doom-gruvbox . doom-themes)
|
||||
(doom-horizon . doom-themes)
|
||||
(doom-laserwave . doom-themes)
|
||||
(doom-manegarm . doom-themes)
|
||||
(doom-material . doom-themes)
|
||||
(doom-molokai . doom-themes)
|
||||
(doom-moonlight . doom-themes)
|
||||
(doom-nord . doom-themes)
|
||||
(doom-nord-light . doom-themes)
|
||||
(doom-nova . doom-themes)
|
||||
(doom-oceanic-next . doom-themes)
|
||||
(doom-one . doom-themes)
|
||||
(doom-one-light . doom-themes)
|
||||
(doom-opera . doom-themes)
|
||||
|
|
|
@ -194,6 +194,7 @@
|
|||
- [[#lisp-state-key-bindings][Lisp state key bindings]]
|
||||
- [[#emacs-lisp-specific-key-bindings][Emacs lisp specific key bindings]]
|
||||
- [[#mouse-usage][Mouse usage]]
|
||||
- [[#comparing-diff][Comparing (diff)]]
|
||||
- [[#managing-projects][Managing projects]]
|
||||
- [[#registers][Registers]]
|
||||
- [[#errors-handling][Errors handling]]
|
||||
|
@ -2957,6 +2958,7 @@ Text related commands (start with ~x~):
|
|||
| ~SPC x a m~ | align region at arithmetic operators (+-*/) |
|
||||
| ~SPC x a ¦~ | align region at ¦ |
|
||||
| ~SPC x c~ | count the number of chars/words/lines in the selection region |
|
||||
| ~SPC x d l~ | delete blank lines but one or the single blank line |
|
||||
| ~SPC x d w~ | delete trailing whitespaces |
|
||||
| ~SPC x d SPC~ | Delete all spaces and tabs around point, leaving one space |
|
||||
| ~SPC x g l~ | set languages used by translate commands |
|
||||
|
@ -3395,6 +3397,42 @@ There are some added mouse features set for the line number margin (if shown):
|
|||
- drag across line number margin visually selects the region
|
||||
- double click in line number margin visually select the current code block
|
||||
|
||||
** Comparing (diff)
|
||||
To compare buffers, files, directories or even windows use the prefix ~SPC D~.
|
||||
Spacemacs uses the powerful embedded =ediff= to do comparisons, help for =ediff=
|
||||
can be opened using ~SPC D h~.
|
||||
|
||||
All =ediff= commands starts with D:
|
||||
|
||||
| Key binding | Description |
|
||||
|---------------+-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ~SPC D b 3~ | ask for 3 opened buffers and start an ediff session with them |
|
||||
| ~SPC D b b~ | ask for 2 opened buffers and start an ediff session with them |
|
||||
| ~SPC D b p~ | ask for a buffer or file that contains a patch to apply to a buffer and start an ediff session with the result |
|
||||
| ~SPC D B~ | ask for a file and run ediff with its backup file |
|
||||
| ~SPC D d 3~ | ask for 3 directories and run ediff on them comparing files that have the same name in all of them |
|
||||
| ~SPC D d d~ | ask for 2 directories and run ediff on them comparing files that have the same name in both |
|
||||
| ~SPC D d r~ | run ediff on a directory comparing its files with their revisions if under version control |
|
||||
| ~SPC D f .~ | start an ediff session between your =.spacemacs= and its default template in Spacemacs =core= |
|
||||
| ~SPC D f 3~ | ask for 3 files and start an ediff session with them |
|
||||
| ~SPC D f f~ | ask for 2 files and start an ediff session with them |
|
||||
| ~SPC D f p~ | ask for a buffer or file that contains a patch to apply to a file and start an ediff session with the result |
|
||||
| ~SPC D h~ | open ediff documentation within Emacs |
|
||||
| ~SPC D m b 3~ | start an ediff merge session between 2 buffers and their ancestor |
|
||||
| ~SPC D m b b~ | start an ediff merge session between 2 buffers |
|
||||
| ~SPC D m d 3~ | start an ediff merge session between files with the same name in 2 directories and with a 3rd directory containing their ancestor |
|
||||
| ~SPC D m d d~ | start an ediff merge session between files with the same name in 2 directories |
|
||||
| ~SPC D m f 3~ | start an ediff merge session between 2 files and their ancestor |
|
||||
| ~SPC D m f f~ | start an ediff merge session between 2 files |
|
||||
| ~SPC D m r 3~ | start an ediff merge session between two revisions of a file with a common ancestor |
|
||||
| ~SPC D m r r~ | start an ediff merge session between two revisions of a file |
|
||||
| ~SPC D r l~ | start an ediff session between two regions to perform a linewise diff (use this for large regions) |
|
||||
| ~SPC D r w~ | start an ediff session between two regions to perform a wordwise diff (use this for small regions) |
|
||||
| ~SPC D s~ | display ediff registries |
|
||||
| ~SPC D v~ | start ediff between versions of a file |
|
||||
| ~SPC D w l~ | compare linewise the portions of visible text of 2 windows which are selected by clicking |
|
||||
| ~SPC D w w~ | compare wordwise the portions of visible text of 2 windows which are selected by clicking |
|
||||
|
||||
** Managing projects
|
||||
Projects in Spacemacs are managed with [[https://github.com/bbatsov/projectile][projectile]]. In =projectile= projects
|
||||
are defined implicitly, for instance the root of a project is found when a
|
||||
|
|
|
@ -120,9 +120,9 @@ This doesn't support the chanserv auth method. "
|
|||
|
||||
(defun spacemacs//znc-auth-source-fetch-password (server)
|
||||
"Given a server with at least :host :port :login, return the :password"
|
||||
(destructuring-bind (&key host auth &allow-other-keys)
|
||||
(cl-destructuring-bind (&key host auth &allow-other-keys)
|
||||
(cdr server)
|
||||
(destructuring-bind (&key secret &allow-other-keys)
|
||||
(cl-destructuring-bind (&key secret &allow-other-keys)
|
||||
(car (auth-source-search :host host
|
||||
:port "irc"
|
||||
:user auth
|
||||
|
@ -150,7 +150,7 @@ This doesn't support the chanserv auth method. "
|
|||
(cl-loop
|
||||
for s in rcirc-server-alist
|
||||
collect
|
||||
(destructuring-bind (&key host
|
||||
(cl-destructuring-bind (&key host
|
||||
(port rcirc-default-port)
|
||||
(nick rcirc-default-nick)
|
||||
(user-name rcirc-default-user-name)
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
- [[#layer][Layer]]
|
||||
- [[#enablingdisabling-tooltips][Enabling/Disabling tooltips]]
|
||||
- [[#disabling-by-default][Disabling by default]]
|
||||
- [[#enable-flycheck-globally][Enable flycheck globally]]
|
||||
- [[#bitmaps][Bitmaps]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
|
||||
|
@ -54,6 +55,21 @@ If you want more fine-grained control, you can configure the variable
|
|||
=flycheck-global-modes= instead. Note that this variable should be manipulated
|
||||
in =dotspacemacs/user-config=.
|
||||
|
||||
** Enable flycheck globally
|
||||
Normally Spacemacs goes a long mile to enable syntax checking only where it
|
||||
makes sense. If syntax checking support is missing it is normally only a
|
||||
matter of declaring it in the layer. The best approach in this case is
|
||||
to open an issue and ask for syntax checking support.
|
||||
|
||||
Some guides on the web suggest to enable flycheck globally by setting
|
||||
=(global-flycheck-mode)= in your =dotspacemacs/user-config=.
|
||||
This is neither necessary nor is it good for the layer system.
|
||||
In the contrary by doing so the layer system cannot longer decide for
|
||||
which modes activating flycheck would bring any useful outcome.
|
||||
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.
|
||||
|
||||
** Bitmaps
|
||||
If the original flycheck fringe bitmaps are more to your liking, you can set the
|
||||
variable =syntax-checking-use-original-bitmaps= to =t=:
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
- [[#show-snippets-in-auto-completion-popup][Show snippets in auto-completion popup]]
|
||||
- [[#tooltips][Tooltips]]
|
||||
- [[#sort-results-by-usage][Sort results by usage]]
|
||||
- [[#enable-company-or-auto-complete-globally][Enable company or auto-complete globally]]
|
||||
- [[#disable-auto-completion-in-specific-layers][Disable auto-completion in specific layers]]
|
||||
- [[#enable-company-globally][Enable company globally]]
|
||||
- [[#replacing-company-by-auto-complete][Replacing company by auto-complete]]
|
||||
- [[#add-auto-completion-in-a-layer][Add auto-completion in a layer]]
|
||||
- [[#completion-back-ends][Completion back ends]]
|
||||
|
@ -141,19 +142,17 @@ is used. The variable has no effect when =auto-complete= is used.
|
|||
auto-completion-enable-sort-by-usage t)))
|
||||
#+END_SRC
|
||||
|
||||
** Enable company or auto-complete globally
|
||||
By default Spacemacs enables auto-completion explicitly for each supported
|
||||
major-mode, it means that =company= and =auto-complete= are not enabled
|
||||
globally, it allows more flexibility to choose an auto-completion engine
|
||||
for a given mode.
|
||||
** Disable auto-completion in specific layers
|
||||
See general documentation on how to [[https://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#disabling-layer-services-in-other-layers][disable a layer for specific layers]].
|
||||
|
||||
You may want to enable company globally to get auto-completion
|
||||
everywhere even in the modes which are not configured by Spacemacs. To do
|
||||
so, you just have to add =(global-company-mode)= in the
|
||||
=dotspacemacs/user-config= function of your dotfile.
|
||||
** Enable company globally
|
||||
It can be done by adding =(global-company-mode)= in the
|
||||
=dotspacemacs/user-config= function of your dotfile. But it is not recommended
|
||||
to do so, you should instead open an issue to ask for auto-completion support
|
||||
for the major-modes where it is missing.
|
||||
|
||||
Note that if you want to enable =auto-complete= globally you will have to
|
||||
disable =company= first, see the next section to do so.
|
||||
If you choose to use =(global-company-mode)= then you loose some advantages
|
||||
provided by the layer system like [[https://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#disabling-layer-services-in-other-layers][disabling auto-completion for specific layers]].
|
||||
|
||||
** Replacing company by auto-complete
|
||||
You can disable =company= by adding it to the =dotspacemacs-excluded-packages=
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(company-box :toggle auto-completion-use-company-box)
|
||||
(all-the-icons :toggle auto-completion-use-company-box)
|
||||
(company-quickhelp :toggle auto-completion-enable-help-tooltip)
|
||||
company-statistics
|
||||
(company-statistics :toggle auto-completion-enable-sort-by-usage)
|
||||
counsel
|
||||
fuzzy
|
||||
(helm-company :requires helm)
|
||||
|
@ -124,7 +124,6 @@
|
|||
|
||||
(defun auto-completion/init-company-statistics ()
|
||||
(use-package company-statistics
|
||||
:if auto-completion-enable-sort-by-usage
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
|
|
|
@ -148,29 +148,29 @@ around point as the initial input. If DIR is non nil start in
|
|||
that directory."
|
||||
(interactive)
|
||||
(require 'counsel)
|
||||
(letf* ((initial-input (if use-initial-input
|
||||
(if (region-active-p)
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning) (region-end))
|
||||
(thing-at-point 'symbol t))
|
||||
""))
|
||||
(tool (catch 'tool
|
||||
(dolist (tool tools)
|
||||
(when (and (assoc-string tool spacemacs--counsel-commands)
|
||||
(executable-find tool))
|
||||
(throw 'tool tool)))
|
||||
(throw 'tool "grep")))
|
||||
(default-directory
|
||||
(or initial-directory (read-directory-name "Start from directory: ")))
|
||||
(display-directory
|
||||
(if (< (length default-directory)
|
||||
spacemacs--counsel-search-max-path-length)
|
||||
default-directory
|
||||
(concat
|
||||
"..." (substring default-directory
|
||||
(- (length default-directory)
|
||||
spacemacs--counsel-search-max-path-length)
|
||||
(length default-directory))))))
|
||||
(cl-letf* ((initial-input (if use-initial-input
|
||||
(if (region-active-p)
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning) (region-end))
|
||||
(thing-at-point 'symbol t))
|
||||
""))
|
||||
(tool (catch 'tool
|
||||
(dolist (tool tools)
|
||||
(when (and (assoc-string tool spacemacs--counsel-commands)
|
||||
(executable-find tool))
|
||||
(throw 'tool tool)))
|
||||
(throw 'tool "grep")))
|
||||
(default-directory
|
||||
(or initial-directory (read-directory-name "Start from directory: ")))
|
||||
(display-directory
|
||||
(if (< (length default-directory)
|
||||
spacemacs--counsel-search-max-path-length)
|
||||
default-directory
|
||||
(concat
|
||||
"..." (substring default-directory
|
||||
(- (length default-directory)
|
||||
spacemacs--counsel-search-max-path-length)
|
||||
(length default-directory))))))
|
||||
(cond ((string= tool "ag")
|
||||
(counsel-ag initial-input default-directory nil
|
||||
(format "ag from [%s]: " display-directory)))
|
||||
|
|
|
@ -228,7 +228,7 @@ Will work on both org-mode and any mode that accepts plain html."
|
|||
"Tt" 'org-show-todo-tree
|
||||
"TT" 'org-todo
|
||||
"TV" 'space-doc-mode
|
||||
"Tx" 'org-toggle-latex-fragment
|
||||
"Tx" 'org-latex-preview
|
||||
|
||||
;; More cycling options (timestamps, headlines, items, properties)
|
||||
"L" 'org-shiftright
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- [[#follow-mode][Follow mode]]
|
||||
- [[#file-watch][File watch]]
|
||||
- [[#git-mode][Git mode]]
|
||||
- [[#flattening-directories][Flattening directories]]
|
||||
- [[#flattening-of-directories][Flattening of directories]]
|
||||
- [[#locking-width][Locking width]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#global][Global]]
|
||||
|
@ -22,28 +22,28 @@
|
|||
This layer sets up a file navigation and project explorer side-window via [[https://github.com/Alexander-Miller/treemacs][Treemacs]].
|
||||
|
||||
** Features:
|
||||
An detailed overview over Treemacs' available features is available in [[https://github.com/Alexander-Miller/treemacs#detailed-feature-list][its
|
||||
readme]]. In a short summary Treemacs offers the following:
|
||||
A detailed overview of the features of Treemacs is available in [[https://github.com/Alexander-Miller/treemacs#detailed-feature-list][the Treemacs
|
||||
readme]]. In short, Treemacs offers:
|
||||
- Simple and powerful navigation and ability to detail exactly how and where a
|
||||
file should be opened
|
||||
- Good looking png icons.
|
||||
file should be opened.
|
||||
- Good looking icons.
|
||||
- Display of multiple file trees organized as projects residing in a workspace.
|
||||
- Ability to show tags contained in files. Tags are provided by imenu, so
|
||||
nearly every filetype is supported.
|
||||
- Mouse interface for single and double left clicks in line with modern GUI standards.
|
||||
(Clicking on an icon will also display a file's tags)
|
||||
- Locational awareness: commands like ~find-file~ or ~magit-status~ will use the location
|
||||
of the node at point (with $HOME as fallback)
|
||||
- Optionally fontifying files based on their git status.
|
||||
- Optionally collapsing single-dir-child directories into one.
|
||||
- Ability to show tags contained in files. Tags are provided by [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Imenu.html][Imenu]], so nearly
|
||||
every filetype is supported.
|
||||
- Mouse interface for single and double left clicks in line with modern GUI
|
||||
standards (clicking on an icon will also display the file's tags).
|
||||
- Location awareness: commands like ~find-file~ or ~magit-status~ will use the
|
||||
location of the node at point (with =$HOME= as fallback).
|
||||
- Optional fontifying of files based on their git status.
|
||||
- Optional collapsing of /single-dir-child/ directories into one.
|
||||
- Doing both asynchronously for an imperceptible performance cost.
|
||||
- Optional =follow-mode= to automatically focus the currently selected file or tag.
|
||||
- Optional =filewatch-mode= to automatically refresh the view after (and only
|
||||
after) changes to the shown filesystem.
|
||||
|
||||
* Install
|
||||
To use this layer, add =treemacs= to the existing
|
||||
=dotspacemacs-configuration-layers= in your =dotspacemacs= file.
|
||||
To use this layer, add =treemacs= to =dotspacemacs-configuration-layers= in your
|
||||
=dotspacemacs= file.
|
||||
|
||||
* Configuration
|
||||
** Follow mode
|
||||
|
@ -71,9 +71,9 @@ part of the file system shown by treemacs set the layer variable
|
|||
Default is =t=.
|
||||
|
||||
** Git mode
|
||||
To enable Treemacs to check for files' and directories' git status information
|
||||
To enable Treemacs to check for the git status information of files and directories
|
||||
and highlight them accordingly, set the layer variable =treemacs-use-git-mode=
|
||||
to =simple=, =extended=, or =deferred=. See the [[https://github.com/Alexander-Miller/treemacs#git-mode][Treemacs doc]] for a more detailed
|
||||
to =simple=, =extended=, or =deferred=. See the [[https://github.com/Alexander-Miller/treemacs#git-mode][Treemacs documentation]] for a more detailed
|
||||
explanation.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -83,8 +83,8 @@ explanation.
|
|||
|
||||
Default is =nil=.
|
||||
|
||||
** Flattening directories
|
||||
*This feature requires python to be installed*.
|
||||
** Flattening of directories
|
||||
*This feature requires Python to be installed*.
|
||||
|
||||
Treemacs tries to flatten empty directory names into one name. It is possible
|
||||
to control how deep Treemacs will search for empty directories by settings the
|
||||
|
@ -95,10 +95,10 @@ layer variable =treemacs-collapse-dirs= to a positive number.
|
|||
(treemacs :variables treemacs-collapse-dirs 3)))
|
||||
#+END_SRC
|
||||
|
||||
Default is 3 (or 0 when python is not installed).
|
||||
Default is 3 (or 0 when Python is not installed).
|
||||
|
||||
** Locking width
|
||||
To have the width of the treemacs window locked by default, meaning not manually
|
||||
To have the width of the treemacs window locked by default, so that it is not manually
|
||||
resizable, set the variable =treemacs-lock-width= to non-nil. It will still be
|
||||
resizable through Treemacs commands and key bindings.
|
||||
|
||||
|
|
|
@ -36,17 +36,7 @@
|
|||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(setq treemacs-follow-after-init t
|
||||
treemacs-width 35
|
||||
treemacs-position 'left
|
||||
treemacs-is-never-other-window nil
|
||||
treemacs-silent-refresh nil
|
||||
treemacs-indentation 2
|
||||
treemacs-change-root-without-asking nil
|
||||
treemacs-sorting 'alphabetic-desc
|
||||
treemacs-show-hidden-files t
|
||||
treemacs-never-persist nil
|
||||
treemacs-goto-tag-strategy 'refetch-index)
|
||||
(setq treemacs-follow-after-init t)
|
||||
(add-hook 'treemacs-mode-hook
|
||||
#'spacemacs/treemacs-setup-width-lock)
|
||||
(spacemacs/set-leader-keys
|
||||
|
|
|
@ -7,29 +7,38 @@
|
|||
* Table of Contents :TOC_5_gh:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#features][Features:]]
|
||||
- [[#related-layers][Related layers]]
|
||||
- [[#other-optional-features][Other optional features]]
|
||||
- [[#references][References]]
|
||||
- [[#install][Install]]
|
||||
- [[#layer][Layer]]
|
||||
- [[#add-the-clojure-layer-manually][Add the Clojure Layer manually]]
|
||||
- [[#pretty-symbols][Pretty Symbols]]
|
||||
- [[#enabling-sayid-or-clj-refactor][Enabling sayid or clj-refactor]]
|
||||
- [[#enabling-automatic-linting][Enabling Automatic Linting]]
|
||||
- [[#enable-clj-kondo-linter][Enable clj-kondo linter]]
|
||||
- [[#enable-joker-linter][Enable joker linter]]
|
||||
- [[#enable-squiggly-linter][Enable Squiggly linter]]
|
||||
- [[#enable-multiple-linters][Enable multiple linters]]
|
||||
- [[#starting-clojure-manually-outside-of-emacs][Starting Clojure manually (outside of Emacs)]]
|
||||
- [[#enable-clojure-fancify-symbols][Enable Clojure fancify Symbols]]
|
||||
- [[#enabling-sayid-or-clj-refactor][Enabling sayid or clj-refactor]]
|
||||
- [[#usage][Usage]]
|
||||
- [[#starting-a-repl-from-spacemacs][Starting a REPL from Spacemacs]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
- [[#connecting-to-a-clojure-repl-outside-of-emacs][Connecting to a Clojure REPL outside of Emacs]]
|
||||
- [[#quick-start-with-boot][Quick Start with boot]]
|
||||
- [[#quick-start-with-lein][Quick Start with lein]]
|
||||
- [[#more-details][More details]]
|
||||
- [[#usage][Usage]]
|
||||
- [[#managing-repl-connections][Managing REPL connections]]
|
||||
- [[#cheatsheet][Cheatsheet]]
|
||||
- [[#structuraly-safe-editing][Structuraly safe editing]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#working-with-clojure-files-barfage-slurpage--more][Working with clojure files (barfage, slurpage & more)]]
|
||||
- [[#leader][Leader]]
|
||||
- [[#shortcuts][Shortcuts]]
|
||||
- [[#managing-repl-connections-1][Managing REPL connections]]
|
||||
- [[#documentation][Documentation]]
|
||||
- [[#evaluation][Evaluation]]
|
||||
- [[#goto][Goto]]
|
||||
- [[#repl][REPL]]
|
||||
- [[#send-code-to-repl][Send code to REPL]]
|
||||
- [[#tests][Tests]]
|
||||
- [[#toggles][Toggles]]
|
||||
- [[#debugging][Debugging]]
|
||||
|
@ -49,7 +58,8 @@
|
|||
- [[#indentation][Indentation]]
|
||||
|
||||
* Description
|
||||
This layer adds support for [[https://clojure.org/][Clojure]] language using [[https://github.com/clojure-emacs/cider][CIDER]].
|
||||
This layer adds support for [[https://clojure.org/][Clojure]] language using [[https://github.com/clojure-emacs/cider][CIDER]], providing Clojure REPL management
|
||||
and a full suite of tooling for Clojure development.
|
||||
|
||||
** Features:
|
||||
- REPL via [[https://github.com/clojure-emacs/cider][CIDER]]
|
||||
|
@ -60,12 +70,29 @@ This layer adds support for [[https://clojure.org/][Clojure]] language using [[h
|
|||
- Debugging with [[https://github.com/clojure-emacs/sayid][sayid]]
|
||||
- Clojure cheatsheet
|
||||
- Structuraly safe editing using optional [[https://github.com/luxbock/evil-cleverparens][evil-cleverparens]]
|
||||
- Linting via [[https://github.com/borkdude/clj-kondo][clj-kondo]] ([[https://github.com/candid82/joker][joker]] and [[https://github.com/clojure-emacs/squiggly-clojure][squiggly-clojure]] also available)
|
||||
|
||||
*** Related layers
|
||||
The following Spacemacs layers should also be added for a complete experience.
|
||||
- auto-completion
|
||||
- syntax-checking (provides flycheck for linter support)
|
||||
|
||||
*** Other optional features
|
||||
- Refactoring via [[https://github.com/clojure-emacs/clj-refactor.el][clj-refactor]]
|
||||
- Debugging with [[https://github.com/clojure-emacs/sayid][sayid]] (beta)
|
||||
|
||||
*** References
|
||||
- [[https://docs.cider.mx/cider/][CIDER documentation]]
|
||||
- [[https://practicalli.github.io/spacemacs][Practicalli Spacemacs]]
|
||||
|
||||
* Install
|
||||
** Layer
|
||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
add =clojure= to the existing =dotspacemacs-configuration-layers= list in this
|
||||
file.
|
||||
Spacemacs will prompt to install the Clojure layer automatically when opening a file ending in =.clj=
|
||||
=.cljs=, =.cljc= or =.edn=. Replying ~y~ will download all the packages for the Clojure layer.
|
||||
Restarting Spacemacs, ~SPC q r~, is recommended to ensure all changes are loaded.
|
||||
|
||||
** Add the Clojure Layer manually
|
||||
Edit the =~/.spacemacs= file and add the word =clojure= to the existing
|
||||
=dotspacemacs-configuration-layers= list.
|
||||
|
||||
** Pretty Symbols
|
||||
Pretty symbols for anonymous functions, set literals and partial, like =(λ [a]
|
||||
|
@ -85,33 +112,6 @@ Or set this variable when loading the configuration layer:
|
|||
'((clojure :variables clojure-enable-fancify-symbols t)))
|
||||
#+END_SRC
|
||||
|
||||
** Enabling sayid or clj-refactor
|
||||
The packages sayid (Clojure debugger) and clj-refactor (automatic refactorings)
|
||||
are disabled by default. To enable them, add a =:variables= option when enabling
|
||||
the =clojure= layer, specifying =clojure-enable-sayid=, or
|
||||
=clojure-enable-clj-refactor=, or both.
|
||||
|
||||
In your Spacemacs configuration:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; before
|
||||
dotspacemacs-configuration-layers
|
||||
'(...
|
||||
clojure
|
||||
)
|
||||
|
||||
;; after
|
||||
dotspacemacs-configuration-layers
|
||||
'(...
|
||||
(clojure :variables
|
||||
clojure-enable-sayid t
|
||||
clojure-enable-clj-refactor t)
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
Enabling either of these packages will cause extra nREPL middleware to be
|
||||
injected when jacking in CIDER.
|
||||
|
||||
** Enabling Automatic Linting
|
||||
[[https://github.com/borkdude/clj-kondo][clj-kondo]], [[https://github.com/candid82/joker][joker]] and [[https://github.com/clojure-emacs/squiggly-clojure][squiggly-clojure]] provide automated linting via =flycheck=.
|
||||
These packages are disabled by default as they require the relevant linter binaries
|
||||
|
@ -224,11 +224,107 @@ Once all the linters you want to enable are installed, you simply need to specif
|
|||
)
|
||||
#+END_SRC
|
||||
|
||||
** Starting Clojure manually (outside of Emacs)
|
||||
CIDER communicates with your Clojure process through nREPL, and for CIDER to
|
||||
function correctly extra nREPL middleware needs to be present
|
||||
(cider/cider-nrepl). The same is true for clj-refactor (refactor-nrepl), and for
|
||||
sayid (com.billpiel/sayid).
|
||||
*** Enable Clojure fancify Symbols
|
||||
Fancify symbols re-writes your code and displays symbols for:
|
||||
- function definitions with fn =(λ [a] (+ a 5))= and its syntax shortcut =ƒ(+ % 5)=
|
||||
- set literals =∈{2 4 6}=
|
||||
- partial functions =Ƥ=.
|
||||
|
||||
To enable this feature, add the following snippet to the
|
||||
=dotspacemacs/user-config= section of your =~/.spacemacs= file:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq clojure-enable-fancify-symbols t)
|
||||
#+END_SRC
|
||||
|
||||
Or set this variable when loading the configuration layer:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers
|
||||
'((clojure :variables clojure-enable-fancify-symbols t)))
|
||||
#+END_SRC
|
||||
|
||||
*** Enabling sayid or clj-refactor
|
||||
|
||||
The packages sayid (Clojure debugger) and clj-refactor (automatic refactorings)
|
||||
are disabled by default. These packages are less active that the CIDER project
|
||||
and may cause issues when running CIDER.
|
||||
|
||||
To enable them, add a =:variables= option when enabling the =clojure= layer,
|
||||
specifying =clojure-enable-sayid=, or =clojure-enable-clj-refactor=, or both.
|
||||
|
||||
In your Spacemacs configuration:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; before
|
||||
dotspacemacs-configuration-layers
|
||||
'(...
|
||||
clojure
|
||||
)
|
||||
|
||||
;; after
|
||||
dotspacemacs-configuration-layers
|
||||
'(...
|
||||
(clojure :variables
|
||||
clojure-enable-sayid t
|
||||
clojure-enable-clj-refactor t)
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
Enabling either of these packages will cause extra nREPL middleware to be
|
||||
injected when jacking in CIDER.
|
||||
|
||||
If you are experiencing issues when running a REPL, try disabling these
|
||||
packages first and restart Spacemacs to see if the error persists.
|
||||
|
||||
* Usage
|
||||
Read the keybindings section to see all the functionality available, or simply
|
||||
use the ~,~ or ~SPC m~ to open the which-key menu for the Clojure layer.
|
||||
|
||||
** Starting a REPL from Spacemacs
|
||||
Open a Clojure file (=.clj=, =.cljs=, =.cljc=, =.edn=) and start a Clojure REPL,
|
||||
choosing the REPL session type (Clojure, ClojureScript or both Clojure & ClojureScript).
|
||||
|
||||
~, '~ and ~, s i~ calls the ~sesman-start~ command, a wrapper for all the
|
||||
~jack-in~ and ~connect~ commands. A prompt appears allowing you to choose the
|
||||
type of REPL session required.
|
||||
|
||||
~, s j~ opens the cider-jack-in menu, providing commands to start specific REPL sessions,
|
||||
it is the same as using the ~sesman-start~ command described previously.
|
||||
|
||||
Using the universal constant, ~SPC u~ before any of the previous commands enables editing
|
||||
of the command that starts the REPL. This is useful if you want to add a =deps.edn= alias
|
||||
or add your own dependencies to inject. The command is edited in the mini-buffer
|
||||
|
||||
Once the REPL starts, a confirmation message is displayed in the mini-buffer.
|
||||
|
||||
The REPL buffer does not open automatically (Clojure is typically evaluated in
|
||||
the source code buffer). ~, s a~ will switch between REPL and source code buffers,
|
||||
opening the REPL buffer if not already shown.
|
||||
|
||||
*** Troubleshooting
|
||||
If the REPL does not start, ~SPC b m~ opens the message buffer and should show errors.
|
||||
Also check the REPL buffer, ~, s a~ for error messages.
|
||||
|
||||
Remove optional features from the Clojure layer, specifically sayid and clj-refactor.
|
||||
Restart Emacs and confirm the issue still occurs.
|
||||
|
||||
Visit [[https://clojurians.slack.com/messages/cider][#cider channel on Clojurians Slack community]] for help with CIDER,
|
||||
and [[https://clojurians.slack.com/messages/spacemacs][#spacemacs channel]] for Spacemacs specific help
|
||||
|
||||
** Connecting to a Clojure REPL outside of Emacs
|
||||
Start a REPL outside of Emacs that includes an nREPL server. The IP address and port
|
||||
the nREPL runs on should be printed.
|
||||
|
||||
~, '_~ or ~SPC m s i~ displays the sesman prompt, select the connect command relevant
|
||||
to the type of REPL you wish to start.
|
||||
|
||||
~, s c~ opens the cider-connect menu, providing key bindings for connecting too the
|
||||
different REPL session types.
|
||||
|
||||
CIDER communicates with your Clojure process through nREPL and for CIDER to
|
||||
function correctly extra nREPL middleware is needed (cider/cider-nrepl).
|
||||
The same is true for clj-refactor (refactor-nrepl), and for sayid (com.billpiel/sayid).
|
||||
|
||||
When starting the Clojure process through cider (=cider-jack-in= and friends)
|
||||
this will be handled automatically, and so most users should be able to just run
|
||||
|
@ -294,7 +390,16 @@ More info regarding installation of nREPL middleware can be found here:
|
|||
- CIDER: [[https://cider.readthedocs.io/en/latest/installation/][CIDER installation (official docs)]]
|
||||
- clj-refactor: [[https://github.com/clojure-emacs/refactor-nrepl][refactor-nrepl]]
|
||||
|
||||
* Usage
|
||||
** Managing REPL connections
|
||||
Sesman is used for [[https://docs.cider.mx/cider/usage/managing_connections.html][managing REPL connections]] when working simultaneously on
|
||||
multiple projects or have multiple connections opened for the same project
|
||||
|
||||
~SPC m m i~ provides information about the current REPL.
|
||||
~SPC m m b~ shows information about all REPLs currently active.
|
||||
~SPC m m l~ menu links files, directories and projects to an existing session.
|
||||
|
||||
See REPL connections in the key bindings section for all the commands.
|
||||
|
||||
** Cheatsheet
|
||||
This layers installs the [[https://github.com/clojure-emacs/clojure-cheatsheet][clojure-cheatsheet]] package which embeds this useful
|
||||
[[https://clojure.org/api/cheatsheet][cheatsheet]] into Emacs.
|
||||
|
@ -304,26 +409,25 @@ separated) to narrow down the list. For example, try typing in sort map to see
|
|||
some functions that deal with sorting maps.
|
||||
|
||||
** Structuraly safe editing
|
||||
This layer adds support for =evil-cleverparens= which allows to safely edit
|
||||
The Clojure layer adds support for =evil-cleverparens= which allows to safely edit
|
||||
lisp code by keeping the s-expressions balanced.
|
||||
|
||||
By default this mode is not activated. You can turn it on locally on the active
|
||||
buffer with ~SPC m T s~ (=s= for safe).
|
||||
~SPC m T s~ will toggle safe structured editing, off by default.
|
||||
|
||||
To turn it on automatically for all =clojure= buffers call the following
|
||||
function in your =dotspacemacs/user-config= function:
|
||||
Enable safe structural editing for all =clojure= buffers using the following
|
||||
in the =dotspacemacs/user-config= function of your .spacemacs file
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode)
|
||||
#+END_SRC
|
||||
|
||||
or to enable it for all supported modes:
|
||||
Or enable safe structural editing for all supported modes:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks)
|
||||
#+END_SRC
|
||||
|
||||
When enabled the symbol =🆂= should be displayed in the mode-line.
|
||||
When enabled the symbol =🆂= will display in the mode-line.
|
||||
|
||||
* Key bindings
|
||||
** Working with clojure files (barfage, slurpage & more)
|
||||
|
@ -335,6 +439,32 @@ As this state works the same for all files, the documentation is in global
|
|||
[[https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#lisp-key-bindings][DOCUMENTATION.org]]. In general, use ~SPC k~ to interact with the lisp-state.
|
||||
|
||||
** Leader
|
||||
*** Shortcuts
|
||||
Shortcut keybindings for regularly used commands.
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+----------------------------------------------------------|
|
||||
| ~SPC m '~ | start a REPL - prompted for REPL type (sesman-start) |
|
||||
| ~SPC m ,~ | command menu in REPL buffer (cider-repl-handle-shortcut) |
|
||||
|
||||
*** Managing REPL connections
|
||||
Managing CIDER REPL connections and sessions
|
||||
|
||||
| Key binding | Description |
|
||||
|---------------+------------------------------------------------------------------|
|
||||
| ~SPC m m b~ | browse all REPL session (sesman-browser) |
|
||||
| ~SPC m m i~ | current REPL information, ~SPC u~ for all sessions (sesman-info) |
|
||||
| ~SPC m m g~ | go to most relevant REPL session (sesman-goto) |
|
||||
| ~SPC m m l b~ | link buffer to REPL session (sesman-link-with-buffer) |
|
||||
| ~SPC m m l d~ | link directory to REPL session (sesman-link-with-directory) |
|
||||
| ~SPC m m l p~ | link project to REPL session (sesman-link-with-project) |
|
||||
| ~SPC m m l u~ | unlink from REPL session (sesman-unlink) |
|
||||
| ~SPC m m S j~ | connect as sibling to existing Clojure REPL |
|
||||
| ~SPC m m S s~ | connect as sibling to existing ClojureScript REPL |
|
||||
| ~SPC m m s~ | start a REPL - prompted for REPL type (sesman-start) |
|
||||
| ~SPC m m q q~ | quit REPL session (sesman-quit) |
|
||||
| ~SPC m m q r~ | restart REPL (sesman-restart) |
|
||||
|
||||
*** Documentation
|
||||
|
||||
| Key binding | Description |
|
||||
|
@ -348,22 +478,25 @@ As this state works the same for all files, the documentation is in global
|
|||
| ~SPC m h N~ | cider browse all namespaces |
|
||||
|
||||
*** Evaluation
|
||||
Evaluate Clojure code in the source code buffer
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+-----------------------------------------------------------|
|
||||
| ~SPC m e ;~ | eval sexp and show result as comment |
|
||||
| ~SPC m e b~ | eval buffer |
|
||||
| ~SPC m e e~ | eval last sexp |
|
||||
| ~SPC m e f~ | eval function at point |
|
||||
| ~SPC m e i~ | interrupt the current evaluation |
|
||||
| ~SPC m e r~ | eval region |
|
||||
| ~SPC m e m~ | cider macroexpand 1 |
|
||||
| ~SPC m e M~ | cider macroexpand all |
|
||||
| ~SPC m e p~ | print last sexp (clojure interaction mode only) |
|
||||
| ~SPC m e P~ | eval last sexp and pretty print result in separate buffer |
|
||||
| ~SPC m e u~ | Undefine a symbol from the current namespace |
|
||||
| ~SPC m e v~ | eval sexp around point |
|
||||
| ~SPC m e w~ | eval last sexp and replace with result |
|
||||
| Key binding | Description |
|
||||
|-------------+--------------------------------------------------------------------|
|
||||
| ~SPC m e ;~ | eval sexp and show result as comment |
|
||||
| ~SPC m e b~ | eval buffer |
|
||||
| ~SPC m e e~ | eval last sexp |
|
||||
| ~SPC m e f~ | eval function at point |
|
||||
| ~SPC m e i~ | interrupt the current evaluation |
|
||||
| ~SPC m e m~ | cider macroexpand 1 |
|
||||
| ~SPC m e M~ | cider macroexpand all |
|
||||
| ~SPC m e n~ | refresh namespace (cider-ns-refresh) |
|
||||
| ~SPC m e N~ | reload namespace (cider-ns-reload), ~SPC u~ (cider-ns-reload-all) |
|
||||
| ~SPC m e p~ | eval top-level sexp, pretty print result in separate buffer |
|
||||
| ~SPC m e P~ | eval last sexp, pretty print result in separate buffer |
|
||||
| ~SPC m e r~ | eval region |
|
||||
| ~SPC m e u~ | Undefine a symbol from the current namespace |
|
||||
| ~SPC m e v~ | eval sexp around point |
|
||||
| ~SPC m e w~ | eval last sexp and replace with result |
|
||||
|
||||
*** Goto
|
||||
|
||||
|
@ -378,32 +511,39 @@ As this state works the same for all files, the documentation is in global
|
|||
| ~SPC m g s~ | browse spec |
|
||||
| ~SPC m g S~ | browse all specs |
|
||||
|
||||
*** REPL
|
||||
*** Send code to REPL
|
||||
Use these keybindings when working directly with a REPL buffer.
|
||||
Use the Evaluation keybindings when evaluating in source code buffer.
|
||||
|
||||
| Key binding | Description |
|
||||
|---------------+--------------------------------------------------------------------------------|
|
||||
| ~SPC m ,~ | handle shortcut (cider-repl-handle-shortcut) |
|
||||
| ~SPC m s b~ | send and eval buffer in REPL |
|
||||
| ~SPC m s B~ | send and eval buffer and switch to REPL in =insert state= |
|
||||
| ~SPC m s c~ | connect to REPL (cider-connect) or clear repl buffer (cider-repl-clear-buffer) |
|
||||
| ~SPC m s C~ | clear REPL (cider-find-and-clear-repl-output) |
|
||||
| ~SPC m s e~ | send and eval last sexp in REPL |
|
||||
| ~SPC m s E~ | send and eval last sexp and switch to REPL in =insert state= |
|
||||
| ~SPC m s f~ | send and eval function in REPL |
|
||||
| ~SPC m s F~ | send and eval function and switch to REPL in =insert state= |
|
||||
| ~SPC m s j c~ | start Clojure REPL (=cider-jack-in-clj=) |
|
||||
| ~SPC m s j f~ | start Clojure REPL (=cider-jack-in-clj&cljs=) |
|
||||
| ~SPC m s j s~ | start ClojureScript REPL (=cider-jack-in-cljs=) |
|
||||
| ~SPC m s n~ | send and eval ns form in REPL |
|
||||
| ~SPC m s N~ | send and eval ns form and switch to REPL in =insert state= |
|
||||
| ~SPC m s q~ | kill REPL (cider-quit) |
|
||||
| ~SPC m s o~ | switch to other repl instance (cider-repl-switch-to-other) |
|
||||
| ~SPC m s r~ | send and eval region in REPL |
|
||||
| ~SPC m s R~ | send and eval region and switch to REPL in =insert state= |
|
||||
| ~SPC m s s~ | switch to REPL or jump to last file or last clj buffer from repl (cider-repl) |
|
||||
| ~SPC m s u~ | require Clojure utils into current namespace - i.e. functions =doc= =source= |
|
||||
| ~SPC m s x~ | refresh REPL |
|
||||
| ~SPC m s X~ | restart REPL |
|
||||
| Key binding | Description |
|
||||
|---------------+----------------------------------------------------------------------------|
|
||||
| ~SPC m s a~ | switch between REPL and last Clojure source code buffer (cider-repl) |
|
||||
| ~SPC m s b~ | send and eval buffer in REPL |
|
||||
| ~SPC m s B~ | send and eval buffer and switch to REPL in =insert state= |
|
||||
| ~SPC m s c j~ | connect to a running Clojure REPL (cider-connect-clj) |
|
||||
| ~SPC m s c m~ | connect to a running Clojure & ClojureScript REPL (cider-connect-clj&cljs) |
|
||||
| ~SPC m s c s~ | connect to a running ClojureScript REPL (cider-connect-cljs) |
|
||||
| ~SPC m s e~ | send and eval last sexp in REPL |
|
||||
| ~SPC m s E~ | send and eval last sexp and switch to REPL in =insert state= |
|
||||
| ~SPC m s f~ | send and eval function in REPL |
|
||||
| ~SPC m s F~ | send and eval function and switch to REPL in =insert state= |
|
||||
| ~SPC m s i~ | start a REPL - prompt for REPL type (sesman-start) |
|
||||
| ~SPC m s j j~ | start Clojure REPL (=cider-jack-in-clj=) |
|
||||
| ~SPC m s j m~ | start Clojure REPL (=cider-jack-in-clj&cljs=) |
|
||||
| ~SPC m s j s~ | start ClojureScript REPL (=cider-jack-in-cljs=) |
|
||||
| ~SPC m l~ | clear REPL buffer (cider-repl-clear-buffer) |
|
||||
| ~SPC m L~ | clear and switch to REPL buffer (cider-find-and-clear-repl-output) |
|
||||
| ~SPC m s n~ | send and eval ns form in REPL |
|
||||
| ~SPC m s N~ | send and eval ns form and switch to REPL in =insert state= |
|
||||
| ~SPC m s o~ | switch to other repl instance (cider-repl-switch-to-other) |
|
||||
| ~SPC m s q n~ | reload namespace in REPL (cider-ns-reload) |
|
||||
| ~SPC m s q N~ | reload all namespace in REPL (cider-ns-reload-all) |
|
||||
| ~SPC m s q q~ | quit REPL (cider-quit) |
|
||||
| ~SPC m s q r~ | restart REPL (cider-restart) |
|
||||
| ~SPC m s r~ | send and eval region in REPL |
|
||||
| ~SPC m s R~ | send and eval region and switch to REPL in =insert state= |
|
||||
| ~SPC m e u~ | require Clojure utils into current namespace - i.e. =doc= =source= |
|
||||
| ~SPC m s p~ | print last sexp (clojure interaction mode only) |
|
||||
|
||||
*** Tests
|
||||
|
||||
|
@ -424,6 +564,7 @@ As this state works the same for all files, the documentation is in global
|
|||
| ~SPC m T t~ | toggle auto test mode |
|
||||
|
||||
*** Debugging
|
||||
TODO: separate clojure-mode and sayid keybindings
|
||||
|
||||
| Key binding | Description |
|
||||
|---------------+----------------------------------------------------|
|
||||
|
@ -513,11 +654,15 @@ The following refactorings require cljr-refactor to be enabled and generally dep
|
|||
|
||||
*** Reformatting
|
||||
|
||||
| Key binding | Description |
|
||||
|--------------------------+-------------------------|
|
||||
| ~SPC m f b~ or ~SPC m =~ | reformat current buffer |
|
||||
| ~SPC m f l~ | realign current form |
|
||||
| | |
|
||||
| Key binding | Description |
|
||||
|---------------+-------------------------|
|
||||
| ~SPC m = =~ | reformat current buffer |
|
||||
| ~SPC m = e b~ | reformat edn buffer |
|
||||
| ~SPC m = e e~ | reformat edn last sexp |
|
||||
| ~SPC m = e r~ | reformat edn region |
|
||||
| ~SPC m = f~ | reformat current sexp |
|
||||
| ~SPC m = l~ | realign current form |
|
||||
| ~SPC m = r~ | realign current region |
|
||||
|
||||
*** Profiling
|
||||
|
||||
|
|
|
@ -63,14 +63,21 @@
|
|||
;; TODO: having this work for cider-macroexpansion-mode would be nice,
|
||||
;; but the problem is that it uses clojure-mode as its major-mode
|
||||
(let ((cider--key-binding-prefixes
|
||||
'(("md" . "debug")
|
||||
'(("m=" . "format")
|
||||
("m=e" . "edn")
|
||||
("md" . "debug")
|
||||
("me" . "evaluation")
|
||||
("mf" . "format")
|
||||
("mg" . "goto")
|
||||
("mh" . "documentation")
|
||||
("mm" . "manage repls")
|
||||
("mml" . "link session")
|
||||
("mmS" . "sibling sessions")
|
||||
("mmq" . "quit/restart")
|
||||
("mp" . "profile")
|
||||
("ms" . "repl")
|
||||
("ms" . "send to repl")
|
||||
("msc" . "connect external repl")
|
||||
("msj" . "jack-in")
|
||||
("msq" . "quit/restart repl")
|
||||
("mt" . "test")
|
||||
("mT" . "toggle")
|
||||
)))
|
||||
|
@ -80,6 +87,11 @@
|
|||
cider--key-binding-prefixes)
|
||||
|
||||
(spacemacs/set-leader-keys-for-major-mode m
|
||||
|
||||
;; shortcuts
|
||||
"'" 'sesman-start
|
||||
|
||||
;; help / documentation
|
||||
"ha" 'cider-apropos
|
||||
"hc" 'cider-cheatsheet
|
||||
"hd" 'cider-clojuredocs
|
||||
|
@ -88,6 +100,7 @@
|
|||
"hn" 'cider-browse-ns
|
||||
"hN" 'cider-browse-ns-all
|
||||
|
||||
;; evaluate in source code buffer
|
||||
"e;" 'cider-eval-defun-to-comment
|
||||
"eb" 'cider-eval-buffer
|
||||
"ee" 'cider-eval-last-sexp
|
||||
|
@ -95,15 +108,25 @@
|
|||
"ei" 'cider-interrupt
|
||||
"em" 'cider-macroexpand-1
|
||||
"eM" 'cider-macroexpand-all
|
||||
"en" 'cider-ns-refresh
|
||||
"eN" 'cider-ns-reload ;; SPC u for cider-ns-reload-all
|
||||
"ep" 'cider-pprint-eval-defun-at-point
|
||||
"eP" 'cider-pprint-eval-last-sexp
|
||||
"er" 'cider-eval-region
|
||||
"eu" 'cider-undef
|
||||
"ev" 'cider-eval-sexp-at-point
|
||||
"eV" 'cider-eval-sexp-up-to-point
|
||||
"ew" 'cider-eval-last-sexp-and-replace
|
||||
|
||||
"=" 'cider-format-buffer
|
||||
"fb" 'cider-format-buffer
|
||||
;; format code style
|
||||
"==" 'cider-format-buffer
|
||||
"=eb" 'cider-format-edn-buffer
|
||||
"=ee" 'cider-format-edn-last-sexp
|
||||
"=er" 'cider-format-edn-region
|
||||
"=f" 'cider-format-defun
|
||||
"=r" 'cider-format-region
|
||||
|
||||
;; goto
|
||||
"gb" 'cider-pop-back
|
||||
"gc" 'cider-classpath
|
||||
"gg" 'spacemacs/clj-find-var
|
||||
|
@ -113,41 +136,57 @@
|
|||
"gs" 'cider-browse-spec
|
||||
"gS" 'cider-browse-spec-all
|
||||
|
||||
"'" 'cider-jack-in-clj
|
||||
"\"" 'cider-jack-in-cljs
|
||||
"\&" 'cider-jack-in-clj&cljs
|
||||
;; manage cider connections / sesman
|
||||
"mb" 'sesman-browser
|
||||
"mi" 'sesman-info
|
||||
"mg" 'sesman-goto
|
||||
"mlb" 'sesman-link-with-buffer
|
||||
"mld" 'sesman-link-with-directory
|
||||
"mlu" 'sesman-unlink
|
||||
"mqq" 'sesman-quit
|
||||
"mqr" 'sesman-restart
|
||||
"mlp" 'sesman-link-with-project
|
||||
"mSj" 'cider-connect-sibling-clj
|
||||
"mSs" 'cider-connect-sibling-cljs
|
||||
"ms" 'sesman-start
|
||||
|
||||
;; send code - spacemacs convention
|
||||
"sa" (if (eq m 'cider-repl-mode)
|
||||
'cider-switch-to-last-clojure-buffer
|
||||
'cider-switch-to-repl-buffer)
|
||||
"sb" 'cider-load-buffer
|
||||
"sB" 'spacemacs/cider-send-buffer-in-repl-and-focus
|
||||
"sc" (if (eq m 'cider-repl-mode)
|
||||
'cider-repl-clear-buffer
|
||||
'cider-connect)
|
||||
"sC" 'cider-find-and-clear-repl-output
|
||||
"scj" 'cider-connect-clj
|
||||
"scm" 'cider-connect-clj&cljs
|
||||
"scs" 'cider-connect-cljs
|
||||
"se" 'spacemacs/cider-send-last-sexp-to-repl
|
||||
"sE" 'spacemacs/cider-send-last-sexp-to-repl-focus
|
||||
"sf" 'spacemacs/cider-send-function-to-repl
|
||||
"sF" 'spacemacs/cider-send-function-to-repl-focus
|
||||
"si" 'cider-jack-in-clj
|
||||
"sjc" 'cider-jack-in-clj
|
||||
"sjf" 'cider-jack-in-clj&cljs
|
||||
"si" 'sesman-start
|
||||
"sjj" 'cider-jack-in-clj
|
||||
"sjm" 'cider-jack-in-clj&cljs
|
||||
"sjs" 'cider-jack-in-cljs
|
||||
"sl" 'cider-repl-clear-buffer
|
||||
"sL" 'cider-find-and-clear-repl-output
|
||||
"sn" 'spacemacs/cider-send-ns-form-to-repl
|
||||
"sN" 'spacemacs/cider-send-ns-form-to-repl-focus
|
||||
"so" 'cider-repl-switch-to-other
|
||||
"sq" 'cider-quit
|
||||
"sqq" 'cider-quit
|
||||
"sqr" 'cider-restart
|
||||
"sqn" 'cider-ns-reload
|
||||
"sqN" 'cider-ns-reload-all
|
||||
"sr" 'spacemacs/cider-send-region-to-repl
|
||||
"sR" 'spacemacs/cider-send-region-to-repl-focus
|
||||
"ss" (if (eq m 'cider-repl-mode)
|
||||
'cider-switch-to-last-clojure-buffer
|
||||
'cider-switch-to-repl-buffer)
|
||||
"su" 'cider-repl-require-repl-utils
|
||||
"sx" 'cider-ns-refresh
|
||||
"sX" 'cider-restart
|
||||
|
||||
;; toggle options
|
||||
"Te" 'cider-enlighten-mode
|
||||
"Tf" 'spacemacs/cider-toggle-repl-font-locking
|
||||
"Tp" 'spacemacs/cider-toggle-repl-pretty-printing
|
||||
"Tt" 'cider-auto-test-mode
|
||||
|
||||
;; cider-tests
|
||||
"ta" 'spacemacs/cider-test-run-all-tests
|
||||
"tb" 'cider-test-show-report
|
||||
"tl" 'spacemacs/cider-test-run-loaded-tests
|
||||
|
@ -156,6 +195,7 @@
|
|||
"tr" 'spacemacs/cider-test-rerun-failed-tests
|
||||
"tt" 'spacemacs/cider-test-run-focused-test
|
||||
|
||||
;; cider-debug
|
||||
"db" 'cider-debug-defun-at-point
|
||||
"de" 'spacemacs/cider-display-error-buffer
|
||||
"dv" 'cider-inspect
|
||||
|
@ -303,7 +343,7 @@
|
|||
m (car x) (cdr x)))
|
||||
clj-refactor--key-binding-prefixes)
|
||||
(spacemacs/set-leader-keys-for-major-mode m
|
||||
"fl" 'clojure-align
|
||||
"=l" 'clojure-align
|
||||
"rci" 'clojure-cycle-if
|
||||
"rcp" 'clojure-cycle-privacy
|
||||
"rc#" 'clojure-convert-collection-to-set
|
||||
|
|
|
@ -127,3 +127,9 @@ Note the last two are regular =company-coq= bindings, left alone since they are
|
|||
most useful in insert mode. The full =company-coq= tutorial showcasing all
|
||||
available =company-coq= key bindings can be accessed at any time using =SPC SPC
|
||||
company-coq-tutorial=.
|
||||
|
||||
** Options
|
||||
|
||||
| Key binding | Description |
|
||||
|-----------------+-----------------------------|
|
||||
| ~SPC m T e~ | Toggle electric terminator. |
|
||||
|
|
|
@ -104,7 +104,9 @@
|
|||
"ir" 'coq-insert-requires
|
||||
"is" 'coq-insert-section-or-module
|
||||
"it" 'coq-insert-tactic
|
||||
"iT" 'coq-insert-tactical))))
|
||||
"iT" 'coq-insert-tactical
|
||||
;; Options
|
||||
"Te" 'proof-electric-terminator-toggle))))
|
||||
|
||||
(defun coq/post-init-smartparens ()
|
||||
(spacemacs/add-to-hooks (if dotspacemacs-smartparens-strict-mode
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
- [[#description][Description]]
|
||||
- [[#features][Features:]]
|
||||
- [[#install][Install]]
|
||||
- [[#layer][Layer]]
|
||||
- [[#linting][Linting]]
|
||||
- [[#lsp][LSP]]
|
||||
- [[#options][Options]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#inferior-repl-process][Inferior REPL process]]
|
||||
|
@ -15,7 +18,6 @@
|
|||
- [[#more-interaction-with-the-repl][More interaction with the REPL]]
|
||||
- [[#r-devtools][R devtools]]
|
||||
- [[#debugging][Debugging]]
|
||||
- [[#editing-markdown][Editing Markdown]]
|
||||
|
||||
* Description
|
||||
This layer adds support for statistical programming languages to Spacemacs.
|
||||
|
@ -32,17 +34,36 @@ This layer adds support for statistical programming languages to Spacemacs.
|
|||
- Much more via the [[https://ess.r-project.org/Manual/ess.html#Current-Features][ESS Project]]
|
||||
|
||||
* Install
|
||||
** Layer
|
||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
add =ess= to the existing =dotspacemacs-configuration-layers= list in this
|
||||
file.
|
||||
|
||||
Also install [[https://github.com/jimhester/lintr][lintr]] library via the R terminal to enable syntax checking.
|
||||
** Linting
|
||||
Install [[https://github.com/jimhester/lintr][lintr]] library via the R terminal to enable syntax checking.
|
||||
To do so start the R terminal and type below code.
|
||||
|
||||
#+BEGIN_SRC R
|
||||
install.packages("lintr")
|
||||
#+END_SRC
|
||||
|
||||
** LSP
|
||||
This backend uses an external server to provide the various IDE integrations
|
||||
and a more modern UI integration in =spacemacs=.
|
||||
|
||||
It requires installing the external server via:
|
||||
|
||||
#+BEGIN_SRC R
|
||||
install.packages('languageserver')
|
||||
#+END_SRC
|
||||
|
||||
Enable the =lsp= layer to activate this backend as well as setting the layer
|
||||
variable =ess-r-backend=:
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(ess :variables ess-r-backend 'lsp)
|
||||
#+END_SRC
|
||||
|
||||
* Options
|
||||
Use a key binding to insert =<-=:
|
||||
|
||||
|
@ -99,32 +120,32 @@ Helpers that provide further interaction with the REPL.
|
|||
|
||||
| Key binding | Description |
|
||||
|---------------+-------------------------------------------------------|
|
||||
| ~SPC m r /~ | set working directory |
|
||||
| ~SPC m r TAB~ | install package |
|
||||
| ~SPC m r d~ | edit object source or dump() object into a new buffer |
|
||||
| ~SPC m r e~ | execute a command in the ESS process |
|
||||
| ~SPC m r i~ | install package |
|
||||
| ~SPC m r l~ | load installed package |
|
||||
| ~SPC m r r~ | reload ESS process |
|
||||
| ~SPC m r s~ | set source style |
|
||||
| ~SPC m r t~ | build tags for directory |
|
||||
| ~SPC m r w~ | set "width" option |
|
||||
| ~SPC m E /~ | set working directory |
|
||||
| ~SPC m E TAB~ | install package |
|
||||
| ~SPC m E d~ | edit object source or dump() object into a new buffer |
|
||||
| ~SPC m E e~ | execute a command in the ESS process |
|
||||
| ~SPC m E i~ | install package |
|
||||
| ~SPC m E l~ | load installed package |
|
||||
| ~SPC m E r~ | reload ESS process |
|
||||
| ~SPC m E s~ | set source style |
|
||||
| ~SPC m E t~ | build tags for directory |
|
||||
| ~SPC m E w~ | set "width" option |
|
||||
|
||||
** R devtools
|
||||
Interaction with the =R= =devtools= package.
|
||||
|
||||
| Key binding | Description |
|
||||
|---------------+------------------------------------------|
|
||||
| ~SPC m w TAB~ | interface for =devtools::install()= |
|
||||
| ~SPC m w a~ | ask for a devtools command and runs it |
|
||||
| ~SPC m w c~ | interface for =devtools::check()= |
|
||||
| ~SPC m w d~ | interface for =devtools::document()= |
|
||||
| ~SPC m w i~ | interface for =devtools::install()= |
|
||||
| ~SPC m w l~ | interface for =devtools::load_all()= |
|
||||
| ~SPC m w r~ | interface for =devtools::revdep_check()= |
|
||||
| ~SPC m w s~ | set a package for ESS r-package commands |
|
||||
| ~SPC m w t~ | interface for =devtools::tests()= |
|
||||
| ~SPC m w u~ | interface for =devtools::unload()= |
|
||||
| ~SPC m D TAB~ | interface for =devtools::install()= |
|
||||
| ~SPC m D a~ | ask for a devtools command and runs it |
|
||||
| ~SPC m D c~ | interface for =devtools::check()= |
|
||||
| ~SPC m D d~ | interface for =devtools::document()= |
|
||||
| ~SPC m D i~ | interface for =devtools::install()= |
|
||||
| ~SPC m D l~ | interface for =devtools::load_all()= |
|
||||
| ~SPC m D r~ | interface for =devtools::revdep_check()= |
|
||||
| ~SPC m D s~ | set a package for ESS r-package commands |
|
||||
| ~SPC m D t~ | interface for =devtools::tests()= |
|
||||
| ~SPC m D u~ | interface for =devtools::unload()= |
|
||||
|
||||
** Debugging
|
||||
Tools for debugging
|
||||
|
@ -150,15 +171,3 @@ Tools for debugging
|
|||
| ~SPC m d t~ | toggle tracebug |
|
||||
| ~SPC m d u~ | unflag function for debug |
|
||||
| ~SPC m d w~ | trigger ESS watch mode |
|
||||
|
||||
** Editing Markdown
|
||||
Edit Markdown files
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+-----------------------------------------------------------|
|
||||
| ~SPC m c C~ | send knitr/sweave chunk and switch to REPL in insert mode |
|
||||
| ~SPC m c c~ | send knitr/sweave chunk and keep buffer focused |
|
||||
| ~SPC m c d~ | send knitr/sweave chunk and step to next chunk |
|
||||
| ~SPC m c m~ | mark knitr/sweave chunk around point |
|
||||
| ~SPC m c n~ | next knitr/sweave chunk |
|
||||
| ~SPC m c N~ | previous knitr/sweave chunk |
|
||||
|
|
|
@ -9,7 +9,12 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(spacemacs|define-jump-handlers ess-r-mode)
|
||||
|
||||
;; Variables
|
||||
|
||||
(defvar ess-r-backend 'nil
|
||||
"The backend to use for IDE features. Possible values are `ess' and `lsp'.")
|
||||
|
||||
(defvar ess-assign-key nil
|
||||
"Call `ess-insert-assign'.")
|
||||
|
|
|
@ -9,6 +9,91 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
|
||||
;; R
|
||||
|
||||
(defun spacemacs//ess-r-backend ()
|
||||
"Returns selected backend."
|
||||
(if ess-r-backend
|
||||
ess-r-backend
|
||||
(cond ((configuration-layer/layer-used-p 'lsp) 'lsp)
|
||||
(t 'ess))))
|
||||
|
||||
(defun spacemacs//ess-may-setup-r-lsp ()
|
||||
"Conditionally setup LSP based on backend."
|
||||
(when (eq (spacemacs//ess-r-backend) 'lsp)
|
||||
(spacemacs//ess-setup-r-lsp)))
|
||||
|
||||
(defun spacemacs//ess-setup-r-lsp ()
|
||||
"Setup LSP backend."
|
||||
(if (configuration-layer/layer-used-p 'lsp)
|
||||
(lsp)
|
||||
(message "`lsp' layer is not installed, please add `lsp' layer to your dotfile.")))
|
||||
|
||||
|
||||
;; Key Bindings
|
||||
|
||||
(defun spacemacs//ess-bind-keys-for-mode (mode)
|
||||
"Bind the keys in MODE."
|
||||
(spacemacs/declare-prefix-for-mode mode "md" "debug")
|
||||
(spacemacs/declare-prefix-for-mode mode "mD" "devtools")
|
||||
(spacemacs/declare-prefix-for-mode mode "mDc" "check")
|
||||
(spacemacs/declare-prefix-for-mode mode "mE" "extra")
|
||||
(spacemacs/declare-prefix-for-mode mode "mh" "help")
|
||||
(spacemacs/set-leader-keys-for-major-mode mode
|
||||
"h" 'ess-doc-map ;; help
|
||||
"d" 'ess-dev-map ;; debug
|
||||
"D" 'ess-r-package-dev-map ;; devtools
|
||||
"E" 'ess-extra-map ;; extra
|
||||
))
|
||||
|
||||
(defun spacemacs//ess-bind-repl-keys-for-mode (mode)
|
||||
"Set the REPL keys in MODE."
|
||||
(spacemacs/declare-prefix-for-mode mode "ms" "repl")
|
||||
(spacemacs/set-leader-keys-for-major-mode mode
|
||||
"," #'ess-eval-region-or-function-or-paragraph-and-step
|
||||
"'" #'spacemacs/ess-start-repl
|
||||
"si" #'spacemacs/ess-start-repl
|
||||
"ss" #'ess-switch-to-inferior-or-script-buffer
|
||||
"sS" #'ess-switch-process
|
||||
"sB" #'ess-eval-buffer-and-go
|
||||
"sb" #'ess-eval-buffer
|
||||
"sd" #'ess-eval-region-or-line-and-step
|
||||
"sD" #'ess-eval-function-or-paragraph-and-step
|
||||
"sL" #'ess-eval-line-and-go
|
||||
"sl" #'ess-eval-line
|
||||
"sR" #'ess-eval-region-and-go
|
||||
"sr" #'ess-eval-region
|
||||
"sF" #'ess-eval-function-and-go
|
||||
"sf" #'ess-eval-function))
|
||||
|
||||
(defun spacemacs/ess-bind-keys-for-julia ()
|
||||
(spacemacs//ess-bind-keys-for-mode 'ess-julia-mode)
|
||||
(spacemacs//ess-bind-repl-keys-for-mode 'ess-julia-mode))
|
||||
|
||||
(defun spacemacs/ess-bind-keys-for-r ()
|
||||
(when ess-assign-key
|
||||
(define-key ess-r-mode-map ess-assign-key #'ess-insert-assign))
|
||||
|
||||
(spacemacs//ess-bind-keys-for-mode 'ess-r-mode)
|
||||
(spacemacs//ess-bind-repl-keys-for-mode 'ess-r-mode))
|
||||
|
||||
(defun spacemacs/ess-bind-keys-for-inferior ()
|
||||
(define-key inferior-ess-mode-map (kbd "C-j") #'comint-next-input)
|
||||
(define-key inferior-ess-mode-map (kbd "C-k") #'comint-previous-input)
|
||||
(when ess-assign-key
|
||||
(define-key inferior-ess-r-mode-map ess-assign-key #'ess-insert-assign))
|
||||
|
||||
(spacemacs/declare-prefix-for-mode 'inferior-ess-mode "ms" "repl")
|
||||
(spacemacs/declare-prefix-for-mode 'inferior-ess-mode "me" "eval")
|
||||
(spacemacs/declare-prefix-for-mode 'inferior-ess-mode "mg" "xref")
|
||||
(spacemacs/set-leader-keys-for-major-mode 'inferior-ess-mode
|
||||
"," #'ess-smart-comma
|
||||
"ss" #'ess-switch-to-inferior-or-script-buffer))
|
||||
|
||||
|
||||
;; REPL
|
||||
|
||||
(defun spacemacs/ess-start-repl ()
|
||||
"Start a REPL corresponding to the ess-language of the current buffer."
|
||||
(interactive)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
;;; layers.el --- ESS Layer declarations File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2019 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Seong Yong-ju <sei40kr@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(when (and (boundp 'ess-r-backend) (eq ess-r-backend 'lsp))
|
||||
(configuration-layer/declare-layer-dependencies '(lsp)))
|
|
@ -9,13 +9,36 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq ess-packages
|
||||
'(
|
||||
ess
|
||||
ess-R-data-view
|
||||
golden-ratio
|
||||
org
|
||||
))
|
||||
(defconst ess-packages
|
||||
'(
|
||||
company
|
||||
flycheck
|
||||
ess
|
||||
ess-R-data-view
|
||||
golden-ratio
|
||||
org))
|
||||
|
||||
(defun ess/post-init-company ()
|
||||
;; Julia
|
||||
(spacemacs|add-company-backends
|
||||
:backends company-ess-julia-objects
|
||||
:modes ess-julia-mode inferior-ess-julia-mode)
|
||||
;; R
|
||||
(spacemacs|add-company-backends
|
||||
:backends (company-R-library company-R-args company-R-objects :separate)
|
||||
:modes inferior-ess-r-mode)
|
||||
|
||||
;; Set R company to lsp manually to include file completion
|
||||
(if (eq (spacemacs//ess-r-backend) 'lsp)
|
||||
(spacemacs|add-company-backends
|
||||
:backends company-lsp
|
||||
:modes ess-r-mode)
|
||||
(spacemacs|add-company-backends
|
||||
:backends (company-R-library company-R-args company-R-objects :separate)
|
||||
:modes ess-r-mode)))
|
||||
|
||||
(defun ess/post-init-flycheck ()
|
||||
(spacemacs/enable-flycheck 'ess-r-mode))
|
||||
|
||||
(defun ess/init-ess ()
|
||||
(use-package ess-site
|
||||
|
@ -49,103 +72,46 @@
|
|||
:commands (R stata julia SAS ess-julia-mode)
|
||||
:init
|
||||
(progn
|
||||
(spacemacs/register-repl 'ess-site 'julia)
|
||||
(spacemacs/register-repl 'ess-site 'R)
|
||||
(spacemacs/register-repl 'ess-site 'SAS)
|
||||
(spacemacs/register-repl 'ess-site 'stata)
|
||||
(setq ess-use-company nil
|
||||
;; Follow Hadley Wickham's R style guide
|
||||
ess-first-continued-statement-offset 2
|
||||
ess-continued-statement-offset 0
|
||||
ess-expression-offset 2
|
||||
ess-nuke-trailing-whitespace-p t
|
||||
ess-default-style 'DEFAULT)
|
||||
|
||||
;; add support for evil states
|
||||
(evil-set-initial-state 'ess-help-mode 'motion)
|
||||
|
||||
(spacemacs/register-repl 'ess-site #'spacemacs/ess-start-repl)
|
||||
|
||||
(add-hook 'ess-r-mode-hook #'spacemacs//ess-may-setup-r-lsp)
|
||||
(add-hook 'inferior-ess-mode-hook
|
||||
'spacemacs//ess-fix-read-only-inferior-ess-mode)
|
||||
(when (configuration-layer/package-used-p 'company)
|
||||
(add-hook 'ess-r-mode-hook 'company-mode))))
|
||||
|
||||
;; R --------------------------------------------------------------------------
|
||||
(setq spacemacs/ess-config
|
||||
'(progn
|
||||
;; Follow Hadley Wickham's R style guide
|
||||
(setq ess-first-continued-statement-offset 2
|
||||
ess-continued-statement-offset 0
|
||||
ess-expression-offset 2
|
||||
ess-nuke-trailing-whitespace-p t
|
||||
ess-default-style 'DEFAULT)
|
||||
|
||||
;; add support for evil states
|
||||
(evil-set-initial-state 'ess-help-mode 'motion)
|
||||
|
||||
(define-key ess-doc-map "h" 'ess-display-help-on-object)
|
||||
(define-key ess-doc-map "p" 'ess-R-dv-pprint)
|
||||
(define-key ess-doc-map "t" 'ess-R-dv-ctable)
|
||||
(dolist (mode '(ess-julia-mode ess-r-mode))
|
||||
(spacemacs/declare-prefix-for-mode mode "ms" "repl")
|
||||
(spacemacs/declare-prefix-for-mode mode "mh" "help")
|
||||
(spacemacs/declare-prefix-for-mode mode "mr" "extra")
|
||||
(spacemacs/declare-prefix-for-mode mode "mw" "pkg")
|
||||
(spacemacs/declare-prefix-for-mode mode "md" "dev")
|
||||
(spacemacs/declare-prefix-for-mode mode "mc" "noweb")
|
||||
(spacemacs/set-leader-keys-for-major-mode
|
||||
mode
|
||||
"," 'ess-eval-region-or-function-or-paragraph-and-step
|
||||
"'" 'spacemacs/ess-start-repl
|
||||
"si" 'spacemacs/ess-start-repl
|
||||
"ss" 'ess-switch-to-inferior-or-script-buffer
|
||||
"sS" 'ess-switch-process
|
||||
;; REPL
|
||||
"sB" 'ess-eval-buffer-and-go
|
||||
"sb" 'ess-eval-buffer
|
||||
"sd" 'ess-eval-region-or-line-and-step
|
||||
"sD" 'ess-eval-function-or-paragraph-and-step
|
||||
"sL" 'ess-eval-line-and-go
|
||||
"sl" 'ess-eval-line
|
||||
"sR" 'ess-eval-region-and-go
|
||||
"sr" 'ess-eval-region
|
||||
"sF" 'ess-eval-function-and-go
|
||||
"sf" 'ess-eval-function
|
||||
;; predefined keymaps
|
||||
"h" 'ess-doc-map
|
||||
"r" 'ess-extra-map
|
||||
"w" 'ess-r-package-dev-map
|
||||
"d" 'ess-dev-map
|
||||
;; noweb
|
||||
"cC" 'ess-eval-chunk-and-go
|
||||
"cc" 'ess-eval-chunk
|
||||
"cd" 'ess-eval-chunk-and-step
|
||||
"cm" 'ess-noweb-mark-chunk
|
||||
"cN" 'ess-noweb-previous-chunk
|
||||
"cn" 'ess-noweb-next-chunk))
|
||||
(dolist (mode '(inferior-ess-mode))
|
||||
(spacemacs/declare-prefix-for-mode mode "ms" "repl")
|
||||
(spacemacs/declare-prefix-for-mode mode "me" "eval")
|
||||
(spacemacs/declare-prefix-for-mode mode "mg" "xref")
|
||||
(spacemacs/declare-prefix-for-mode mode "mh" "help")
|
||||
(spacemacs/declare-prefix-for-mode mode "mr" "extra")
|
||||
(spacemacs/declare-prefix-for-mode mode "mw" "pkg")
|
||||
(spacemacs/declare-prefix-for-mode mode "md" "dev")
|
||||
(spacemacs/set-leader-keys-for-major-mode
|
||||
mode
|
||||
"," 'ess-smart-comma
|
||||
"ss" 'ess-switch-to-inferior-or-script-buffer
|
||||
;; predefined keymaps
|
||||
"h" 'ess-doc-map
|
||||
"r" 'ess-extra-map
|
||||
"w" 'ess-r-package-dev-map
|
||||
"d" 'ess-dev-map))
|
||||
(define-key ess-mode-map (kbd "<s-return>") 'ess-eval-line)
|
||||
(define-key inferior-ess-mode-map (kbd "C-j") 'comint-next-input)
|
||||
(define-key inferior-ess-mode-map (kbd "C-k") 'comint-previous-input)
|
||||
|
||||
(when ess-assign-key
|
||||
(define-key ess-r-mode-map ess-assign-key #'ess-insert-assign)
|
||||
(define-key inferior-ess-r-mode-map ess-assign-key #'ess-insert-assign))))
|
||||
|
||||
(eval-after-load "ess-r-mode" spacemacs/ess-config)
|
||||
(eval-after-load "ess-julia" spacemacs/ess-config)
|
||||
(with-eval-after-load 'ess-julia
|
||||
(spacemacs/ess-bind-keys-for-julia))
|
||||
(with-eval-after-load 'ess-r-mode
|
||||
(spacemacs/ess-bind-keys-for-r)
|
||||
(unless (eq (spacemacs//ess-r-backend) 'lsp)
|
||||
(spacemacs/declare-prefix-for-mode 'ess-r-mode "mg" "goto")
|
||||
(define-key ess-doc-map "h" #'ess-display-help-on-object)))
|
||||
(with-eval-after-load 'ess-inf-mode
|
||||
(spacemacs/ess-bind-keys-for-inferior)))
|
||||
:config
|
||||
(define-key ess-mode-map (kbd "<s-return>") #'ess-eval-line))
|
||||
|
||||
;; xref integration added with #96ef5a6
|
||||
(spacemacs|define-jump-handlers ess-mode 'xref-find-definitions))
|
||||
|
||||
(defun ess/init-ess-help ()
|
||||
(evilified-state-evilify-map ess-help-mode-map))
|
||||
|
||||
(defun ess/init-ess-R-data-view ())
|
||||
(defun ess/init-ess-R-data-view ()
|
||||
(use-package ess-R-data-view
|
||||
:defer t
|
||||
:config
|
||||
(dolist (mode '(ess-julia-mode ess-r-mode inferior-ess-mode))
|
||||
(spacemacs/set-leader-keys-for-major-mode mode
|
||||
"hp" #'ess-R-dv-pprint
|
||||
"ht" #'ess-R-dv-ctable))))
|
||||
|
||||
(defun ess/pre-init-golden-ratio ()
|
||||
(spacemacs|use-package-add-hook golden-ratio
|
||||
|
|
|
@ -81,7 +81,6 @@ This layer requires some [[https://www.haskell.org/cabal/][cabal]] packages:
|
|||
- =hoogle= (optional for =haskell-mode= and =helm-hoogle=)
|
||||
- =ghc-mod= (optional for completion)
|
||||
- =intero= (optional for completion)
|
||||
- =hie= (optional for completion)
|
||||
|
||||
To install them, use the following command (or the =stack= equivalent):
|
||||
|
||||
|
@ -169,8 +168,11 @@ build =ghc-mod=. You can check which version was used by calling
|
|||
=ghc-mod --version=.
|
||||
|
||||
*** =lsp=
|
||||
=lsp= requires an appropriate installation of =hie= to provide the Haskell language server.
|
||||
=hie= is built on =ghc-mod=, so many of the same considerations apply.
|
||||
=lsp= requires an appropriate installation of =hie= the official Haskell language server to work properly.
|
||||
=hie= is like an improved version of =ghc-mod= it is best installed by building it locally as it requires
|
||||
that the same GHC version has been used to compile your code as has been used for =hie=.
|
||||
|
||||
To install it please refer to the official installation instructions [[https://github.com/haskell/haskell-ide-engine#installation][here]].
|
||||
|
||||
Enabling the =lsp= backend requires the =lsp= layer to be enabled, and provides access to
|
||||
all the additional =lsp-mode= key bindings. As such it is more of a full backend than just
|
||||
|
@ -449,7 +451,7 @@ workaround - just add the following snippet to your =dotspacemacs/user-config=
|
|||
function:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (configuration-layer/package-used-p 'haskell)
|
||||
(when (configuration-layer/layer-used-p 'haskell)
|
||||
(add-hook 'haskell-interactive-mode-hook
|
||||
(lambda ()
|
||||
(setq-local evil-move-cursor-back nil))))
|
||||
|
@ -463,7 +465,7 @@ Also, some users might want to start the REPL in insert mode. This is done by
|
|||
placing the following snippet in your =dotspacemacs/user-config= function:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (configuration-layer/package-used-p 'haskell)
|
||||
(when (configuration-layer/layer-used-p 'haskell)
|
||||
(defadvice haskell-interactive-switch (after spacemacs/haskell-interactive-switch-advice activate)
|
||||
(when (eq dotspacemacs-editing-style 'vim)
|
||||
(call-interactively 'evil-insert))))
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
- [[#node][Node]]
|
||||
- [[#node-modules][Node Modules]]
|
||||
- [[#node-externs][Node Externs]]
|
||||
- [[#flowtypescript][Flow/Typescript]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#js2-mode][js2-mode]]
|
||||
- [[#folding-js2-mode][Folding (js2-mode)]]
|
||||
|
@ -50,6 +51,7 @@ This layer adds support for the JavaScript language using [[https://github.com/m
|
|||
- Server based REPL with [[https://github.com/abicky/nodejs-repl.el][nodejs-repl]]
|
||||
- Formatting with [[https://github.com/yasuyk/web-beautify][web-beautify]] or [[https://github.com/prettier/prettier][prettier]]
|
||||
- Interactive debugger using [[https://github.com/emacs-lsp/dap-mode][dap-mode]]
|
||||
- Display Flow & Typescript type information
|
||||
|
||||
* Install
|
||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
|
@ -193,6 +195,9 @@ You have to install =flow-bin=.
|
|||
npm i -g flow-bin
|
||||
#+END_SRC
|
||||
|
||||
Or, if you'd rather use a locally-installed =flow-bin= from your project's
|
||||
node_modules directory, see the [[Node Modules][node-add-modules-path setting]].
|
||||
|
||||
*** Debugger (dap integration)
|
||||
To install the debug adapter you may run =M-x dap-firefox-setup= or
|
||||
=M-x dap-chrome-setup= if you are using Linux or download it manually from
|
||||
|
@ -275,6 +280,18 @@ variable to =t= in the =javascript= config section:
|
|||
'((javascript :variables js2-include-node-externs t)))
|
||||
#+END_SRC
|
||||
|
||||
** Flow/Typescript
|
||||
Enable the [[Language Server Protocol][lsp]] backend to view type information, jump to declarations, and more.
|
||||
|
||||
js2-mode is sometimes confused by the type syntax, so you may wish to disable their
|
||||
parse warnings:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(javascript :variables javascript-backend 'lsp
|
||||
js2-mode-show-strict-warnings nil
|
||||
js2-mode-show-parse-errors nil)
|
||||
#+END_SRC
|
||||
|
||||
* Key bindings
|
||||
** js2-mode
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ In order to use =orgtabl-mode=, add =org= layer to your =~/.spacemacs=.
|
|||
| ~SPC m x i~ | make region italic or insert italic |
|
||||
| ~SPC m x c~ | make region code or insert code |
|
||||
| ~SPC m x C~ | make region code or insert code (GitHub Flavored Markdown format) |
|
||||
| ~SPC m x k~ | make region <kbd> element or insert <kbd> element |
|
||||
| ~SPC m x q~ | make region blockquote or insert blockquote |
|
||||
| ~SPC m x Q~ | blockquote region |
|
||||
| ~SPC m x p~ | make region or insert pre |
|
||||
|
|
|
@ -137,6 +137,7 @@
|
|||
"xc" 'markdown-insert-code
|
||||
"xC" 'markdown-insert-gfm-code-block
|
||||
"xi" 'markdown-insert-italic
|
||||
"xk" 'markdown-insert-kbd
|
||||
"xp" 'markdown-insert-pre
|
||||
"xq" 'markdown-insert-blockquote
|
||||
"xs" 'markdown-insert-strike-through
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
This layer enables support for [[https://github.com/skuro/plantuml-mode][plantuml-mode]], which provides
|
||||
a major-mode for [[http://plantuml.com][plantuml]]. PlantUML is a tool to generate [[https://en.wikipedia.org/wiki/Unified_Modeling_Language][UML diagrams]] from plain-text.
|
||||
|
||||
For help with how to use plantuml, see the [[http://plantuml.com][plantuml website]] and the [[http://plantuml.com/PlantUML_Language_Reference_Guide.pdf][reference guide]].
|
||||
For help with how to use plantuml, see the [[http://plantuml.com][plantuml website]] and the [[http://plantuml.com/guide][reference guide]].
|
||||
|
||||
The official file extension supported by this layer is =.pum=. If you want something else,
|
||||
set it in your =user-config= function of your =~/.spacemacs= file.
|
||||
|
|
|
@ -443,6 +443,10 @@ fix this issue."
|
|||
(message "lsp-python-ms: Using version at `%s'" lsp-python-ms-dir)
|
||||
;; Use a precompiled exe
|
||||
(setq lsp-python-ms-executable (concat lsp-python-ms-dir
|
||||
(pcase system-type
|
||||
('gnu/linux "linux-x64/publish/")
|
||||
('darwin "osx-x64/publish/")
|
||||
('windows-nt "win-x64/publish/"))
|
||||
"Microsoft.Python.LanguageServer"
|
||||
(and (eq system-type 'windows-nt)
|
||||
".exe"))))))
|
||||
|
|
|
@ -70,8 +70,14 @@ Consult the installation command for the desired language server found at [[http
|
|||
|
||||
The default LSP server for Rust is [[https://github.com/rust-lang/rls][rls]], i.e. rust language server.
|
||||
To choose the experimental [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]], you need to set the layer variable =lsp-rust-server= of =lsp= layer:
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(lsp :variables lsp-rust-server 'rust-analyzer)
|
||||
(lsp :variables lsp-rust-server 'rust-analyzer)
|
||||
#+END_SRC
|
||||
|
||||
**** Switch to another LSP server
|
||||
If both =rls= and =rust-analyzer= server are installed, you can press ~SPC m s s~ to select
|
||||
another LSP server backend, and press ~SPC m b r~ to restart the LSP server to finish the switching.
|
||||
|
||||
**** Autocompletion
|
||||
To enable auto-completion, ensure that the =auto-completion= layer is enabled.
|
||||
|
@ -117,6 +123,7 @@ To enable automatic buffer formatting on save, set the variable =rust-format-on-
|
|||
| ~SPC m c v~ | check (verify) a project with Cargo |
|
||||
| ~SPC m g g~ | jump to definition |
|
||||
| ~SPC m h h~ | describe symbol at point |
|
||||
| ~SPC m s s~ | switch to other LSP server backend |
|
||||
| ~SPC m t~ | run tests with Cargo |
|
||||
|
||||
** debugger
|
||||
|
|
|
@ -44,7 +44,11 @@
|
|||
(defun spacemacs//rust-setup-lsp ()
|
||||
"Setup lsp backend"
|
||||
(if (configuration-layer/layer-used-p 'lsp)
|
||||
(lsp)
|
||||
(progn
|
||||
(lsp)
|
||||
(spacemacs/declare-prefix-for-mode 'rust-mode "ms" "switch")
|
||||
(spacemacs/set-leader-keys-for-major-mode 'rust-mode
|
||||
"ss" 'lsp-rust-switch-server))
|
||||
(spacemacs//lsp-layer-not-installed-message)))
|
||||
|
||||
(defun spacemacs//rust-setup-lsp-company ()
|
||||
|
|
|
@ -52,5 +52,6 @@
|
|||
(spacemacs/set-leader-keys "tr" 'spacemacs/nlinum-relative-toggle)))))
|
||||
|
||||
(defconst nlinum-packages nil)
|
||||
(spacemacs-buffer/warning (concat "nlinum layer is deprecated for Emacs 26.1 and above."
|
||||
" You can safely remove it from your dotfile.")))
|
||||
(when (configuration-layer/layer-usedp 'nlinum)
|
||||
(spacemacs-buffer/warning (concat "nlinum layer is deprecated for Emacs 26.1 and above."
|
||||
" You can safely remove it from your dotfile."))))
|
||||
|
|
|
@ -28,12 +28,8 @@ add =nixos= to the existing =dotspacemacs-configuration-layers= list in this
|
|||
file.
|
||||
|
||||
* Configuration
|
||||
Toggle whether =company-nixos-options= completion is enabled (defaults to =t=).
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers
|
||||
'((nixos :variables nixos-enable-company t)))
|
||||
#+END_SRC
|
||||
On some systems, =company-nixos-options= may be very slow. If this is the case,
|
||||
see the section on disabling the [[https://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#disabling-layer-services-in-other-layers][disabling auto-complete]] for the =nixos= layer.
|
||||
|
||||
* Key bindings
|
||||
** NixOS Options
|
||||
|
|
|
@ -10,26 +10,23 @@
|
|||
;;; License: GPLv3
|
||||
|
||||
(defconst nixos-packages
|
||||
'(company
|
||||
(company-nixos-options :requires company)
|
||||
flycheck
|
||||
(helm-nixos-options :requires helm)
|
||||
nix-mode
|
||||
nixos-options))
|
||||
'((company-nixos-options :requires company)
|
||||
flycheck
|
||||
(helm-nixos-options :requires helm)
|
||||
nix-mode
|
||||
nixos-options))
|
||||
|
||||
(defun nixos/post-init-company ()
|
||||
(when nixos-enable-company
|
||||
(let ((backends '(company-capf)))
|
||||
(when (configuration-layer/package-used-p 'company-nixos-options)
|
||||
(add-to-list 'backends 'company-nixos-options t))
|
||||
(eval `(spacemacs|add-company-backends
|
||||
:backends ,backends
|
||||
:modes nix-mode)))))
|
||||
(let ((backends '(company-capf)))
|
||||
(when (configuration-layer/package-used-p 'company-nixos-options)
|
||||
(add-to-list 'backends 'company-nixos-options t))
|
||||
(eval `(spacemacs|add-company-backends
|
||||
:backends ,backends
|
||||
:modes nix-mode))))
|
||||
|
||||
(defun nixos/init-company-nixos-options ()
|
||||
(use-package company-nixos-options
|
||||
:if nixos-enable-company
|
||||
:defer t))
|
||||
(use-package company-nixos-options
|
||||
:defer t))
|
||||
|
||||
(defun nixos/init-helm-nixos-options ()
|
||||
(use-package helm-nixos-options
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defconst osx-packages
|
||||
'(
|
||||
exec-path-from-shell
|
||||
helm
|
||||
launchctl
|
||||
(osx-dictionary :toggle osx-use-dictionary-app)
|
||||
osx-trash
|
||||
osx-clipboard
|
||||
reveal-in-osx-finder
|
||||
term
|
||||
))
|
||||
(setq osx-packages
|
||||
'(
|
||||
exec-path-from-shell
|
||||
helm
|
||||
launchctl
|
||||
(osx-dictionary :toggle osx-use-dictionary-app)
|
||||
osx-trash
|
||||
osx-clipboard
|
||||
reveal-in-osx-finder
|
||||
term
|
||||
))
|
||||
|
||||
(when (spacemacs/system-is-mac)
|
||||
;; Enable built-in trash support via finder API if available (only on Emacs
|
||||
|
@ -27,21 +27,16 @@
|
|||
(when (boundp 'mac-system-move-file-to-trash-use-finder)
|
||||
(setq mac-system-move-file-to-trash-use-finder t)))
|
||||
|
||||
(defun osx/init-exec-path-from-shell ()
|
||||
(use-package exec-path-from-shell
|
||||
:if (spacemacs/system-is-mac)
|
||||
:config
|
||||
(progn
|
||||
(exec-path-from-shell-initialize)
|
||||
(when (spacemacs/system-is-mac)
|
||||
;; 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'
|
||||
(let ((gls (executable-find "gls")))
|
||||
(when gls
|
||||
(setq insert-directory-program gls
|
||||
dired-listing-switches "-aBhl --group-directories-first")))))))
|
||||
(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")))))
|
||||
|
||||
(defun osx/pre-init-helm ()
|
||||
;; Use `mdfind' instead of `locate'.
|
||||
|
@ -116,13 +111,13 @@
|
|||
:init
|
||||
(progn
|
||||
(setq interprogram-cut-function '(lambda (text &rest ignore)
|
||||
(if (display-graphic-p)
|
||||
(gui-select-text text)
|
||||
(osx-clipboard-cut-function text)))
|
||||
(if (display-graphic-p)
|
||||
(gui-select-text text)
|
||||
(osx-clipboard-cut-function text)))
|
||||
interprogram-paste-function '(lambda ()
|
||||
(if (display-graphic-p)
|
||||
(gui-selection-value)
|
||||
(osx-clipboard-paste-function)))))))
|
||||
(if (display-graphic-p)
|
||||
(gui-selection-value)
|
||||
(osx-clipboard-paste-function)))))))
|
||||
|
||||
(defun osx/init-reveal-in-osx-finder ()
|
||||
(use-package reveal-in-osx-finder
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
- [[#features][Features:]]
|
||||
- [[#install][Install]]
|
||||
- [[#layer][Layer]]
|
||||
- [[#zetteldeft][Zetteldeft]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#zetteldeft-key-bindings][Zetteldeft key bindings]]
|
||||
- [[#global][Global]]
|
||||
- [[#org-mode][Org-mode]]
|
||||
|
||||
* Description
|
||||
This layer adds a search driven note taking system into Spacemacs.
|
||||
|
@ -17,6 +21,7 @@ This layer adds a search driven note taking system into Spacemacs.
|
|||
- Browsing and creating notes with a powerful search function via [[http://jblevins.org/projects/deft/][Deft]].
|
||||
- Integration of =org-mode= as note editor.
|
||||
- Configurable list of extensions to recognize as notes.
|
||||
- Zettelkasten system with [[https://github.com/EFLS/zetteldeft][zetteldeft]]
|
||||
|
||||
* Install
|
||||
** Layer
|
||||
|
@ -24,6 +29,13 @@ To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|||
add =deft= to the existing =dotspacemacs-configuration-layers= list in this
|
||||
file.
|
||||
|
||||
** Zetteldeft
|
||||
Zetteldeft support is included with the layer. To enable it, set the layer variable ~deft-zetteldeft~ to ~t~:
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(deft :variables deft-zetteldeft t)
|
||||
#+END_SRC
|
||||
|
||||
** Configuration
|
||||
By default deft tries to put notes in =~/.deft= but you can change
|
||||
this in your =dotspacemacs/user-config= function:
|
||||
|
@ -48,6 +60,7 @@ Just add or substitute your preferred extension.
|
|||
| Key binding | Description |
|
||||
|-------------+----------------------------------|
|
||||
| ~SPC a n~ | Open Deft (works globally) |
|
||||
| ~SPC C d~ | Create new file (works globally) |
|
||||
| ~SPC m c~ | Clear deft filter |
|
||||
| ~SPC m d~ | Delete selected note |
|
||||
| ~SPC m i~ | Toggle to regex search |
|
||||
|
@ -56,3 +69,33 @@ Just add or substitute your preferred extension.
|
|||
| ~SPC m o~ | Deft open file in other window |
|
||||
| ~SPC m r~ | Rename selected note |
|
||||
| ~SPC m q~ | quit deft window |
|
||||
|
||||
** Zetteldeft key bindings
|
||||
|
||||
Zetteldeft key bindings will appear in a few different places as follows:
|
||||
|
||||
*** Global
|
||||
|
||||
| Key binding | Description |
|
||||
|---------------------------+--------------------------------|
|
||||
| ~SPC C z~ / ~SPC a n z n~ | New zetteldeft file |
|
||||
| ~SPC a n n~ | Open deft (replaces ~SPC a n~) |
|
||||
| ~SPC a n z T~ | Show tag buffer |
|
||||
| ~SPC a n z s~ | Zetteldeft search-at-point |
|
||||
| ~SPC a n z o~ | Zetteldeft find file |
|
||||
|
||||
*** Org-mode
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+--------------------------------------------|
|
||||
| ~SPC m z c~ | Search for id of current file |
|
||||
| ~SPC m z f~ | Follow link |
|
||||
| ~SPC m z t~ | Tag search with avy |
|
||||
| ~SPC m z N~ | New file and insert link |
|
||||
| ~SPC m z r~ | Rename file |
|
||||
| ~SPC m z i~ | Find a file and insert link |
|
||||
| ~SPC m z I~ | Find a file and insert link with full name |
|
||||
| ~SPC m z s~ | Search at point |
|
||||
| ~SPC m z l~ | Link search with avy |
|
||||
| ~SPC m z F~ | File search with avy on window |
|
||||
| ~SPC m z o~ | Find file |
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
;;; config.el --- deft Layer config File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; Bruno Morais <brunosmmm@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
|
||||
(defvar deft-zetteldeft nil
|
||||
"Use zetteldeft if non nil")
|
|
@ -3,6 +3,7 @@
|
|||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; Bruno Morais <brunosmmm@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
@ -10,7 +11,46 @@
|
|||
;;; License: GPLv3
|
||||
|
||||
(setq deft-packages
|
||||
'(deft))
|
||||
'(
|
||||
deft
|
||||
(zetteldeft :toggle (eq deft-zetteldeft t))
|
||||
))
|
||||
|
||||
(defun deft/init-zetteldeft ()
|
||||
(use-package zetteldeft
|
||||
:if (eq deft-zetteldeft t)
|
||||
:init
|
||||
(progn
|
||||
(spacemacs/declare-prefix-for-mode 'deft-mode "mz" "zetteldeft")
|
||||
(spacemacs/declare-prefix-for-mode 'org-mode "mz" "zetteldeft")
|
||||
(spacemacs/declare-prefix "anz" "zetteldeft")
|
||||
;; zetteldeft actions in deft mode
|
||||
(spacemacs/set-leader-keys-for-major-mode 'deft-mode
|
||||
"zT" 'zetteldeft-tag-buffer
|
||||
"zn" 'zetteldeft-new-file
|
||||
)
|
||||
;; zetteldeft actions in org mode
|
||||
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
||||
"zc" 'zetteldeft-search-current-id
|
||||
"zf" 'zetteldeft-follow-link
|
||||
"zt" 'zetteldeft-avy-tag-search
|
||||
"zN" 'zetteldeft-new-file-and-link
|
||||
"zr" 'zetteldeft-file-rename
|
||||
"zi" 'zetteldeft-find-file-id-insert
|
||||
"zI" 'zetteldeft-find-file-full-title-insert
|
||||
"zs" 'zetteldeft-search-at-point
|
||||
"zl" 'zetteldeft-avy-link-search
|
||||
"zF" 'zetteldeft-avy-file-search-ace-window
|
||||
"zo" 'zetteldeft-find-file
|
||||
)
|
||||
;; new zetteldeft file under capture
|
||||
(spacemacs/set-leader-keys "Cz" 'zetteldeft-new-file)
|
||||
;; actions under applications/deft/zetteldeft
|
||||
(spacemacs/set-leader-keys "anzn" 'zetteldeft-new-file)
|
||||
(spacemacs/set-leader-keys "anzT" 'zetteldeft-tag-buffer)
|
||||
(spacemacs/set-leader-keys "anzs" 'zetteldeft-search-at-point)
|
||||
(spacemacs/set-leader-keys "anzo" 'zetteldeft-find-file)
|
||||
)))
|
||||
|
||||
(defun deft/init-deft ()
|
||||
(use-package deft
|
||||
|
@ -21,7 +61,14 @@
|
|||
deft-text-mode 'org-mode
|
||||
deft-use-filename-as-title t
|
||||
deft-use-filter-string-for-filename t)
|
||||
(spacemacs/set-leader-keys "an" 'spacemacs/deft)
|
||||
;; in applications prefix, NOTE: backward incompatible keybindings
|
||||
(if deft-zetteldeft
|
||||
(progn
|
||||
(spacemacs/declare-prefix "an" "deft")
|
||||
(spacemacs/set-leader-keys "ann" 'spacemacs/deft))
|
||||
(spacemacs/set-leader-keys "an" 'spacemacs/deft))
|
||||
;; put in capture prefix
|
||||
(spacemacs/set-leader-keys "Cd" 'deft-new-file)
|
||||
|
||||
(defun spacemacs/deft ()
|
||||
"Helper to call deft and then fix things so that it is nice and works"
|
||||
|
@ -33,11 +80,11 @@
|
|||
;; When opening it you always want to filter right away
|
||||
(evil-insert-state nil)))
|
||||
:config (spacemacs/set-leader-keys-for-major-mode 'deft-mode
|
||||
"c" 'deft-filter-clear
|
||||
"d" 'deft-delete-file
|
||||
"i" 'deft-toggle-incremental-search
|
||||
"n" 'deft-new-file
|
||||
"N" 'deft-new-file-named
|
||||
"q" 'quit-window
|
||||
"o" 'deft-open-file-other-window
|
||||
"r" 'deft-rename-file)))
|
||||
"c" 'deft-filter-clear
|
||||
"d" 'deft-delete-file
|
||||
"i" 'deft-toggle-incremental-search
|
||||
"n" 'deft-new-file
|
||||
"N" 'deft-new-file-named
|
||||
"q" 'quit-window
|
||||
"o" 'deft-open-file-other-window
|
||||
"r" 'deft-rename-file)))
|
||||
|
|
|
@ -28,18 +28,18 @@
|
|||
("c" "compile/comments")
|
||||
("C" "capture/colors")
|
||||
("d" "documentation")
|
||||
("D" "ediff")
|
||||
("Db" "buffers")
|
||||
("Dd" "directories")
|
||||
("Df" "files")
|
||||
("Dm" "merge")
|
||||
("Dmb" "buffers")
|
||||
("Dmd" "directories")
|
||||
("Dmf" "files")
|
||||
("Dmr" "revisions")
|
||||
("Dr" "regions")
|
||||
("Dw" "windows")
|
||||
("e" "errors")
|
||||
("E" "ediff")
|
||||
("Eb" "buffers")
|
||||
("Ed" "directories")
|
||||
("Ef" "files")
|
||||
("Em" "merge")
|
||||
("Emb" "buffers")
|
||||
("Emd" "directories")
|
||||
("Emf" "files")
|
||||
("Emr" "revisions")
|
||||
("Er" "regions")
|
||||
("Ew" "windows")
|
||||
("f" "files")
|
||||
("fC" "files/convert")
|
||||
("fe" "emacs(spacemacs)")
|
||||
|
@ -289,32 +289,32 @@
|
|||
:evil-leader "e.")
|
||||
;; ediff ----------------------------------------------------------------------
|
||||
(spacemacs/set-leader-keys
|
||||
"Eb3" 'ediff-buffers3
|
||||
"Ebb" 'ediff-buffers
|
||||
"Ebp" 'ediff-patch-buffer
|
||||
"EB" 'ediff-backup
|
||||
"Ed3" 'ediff-directories3
|
||||
"Edd" 'ediff-directories
|
||||
"Edr" 'ediff-directory-revisions
|
||||
"Ef." 'spacemacs/ediff-dotfile-and-template
|
||||
"Ef3" 'ediff-files3
|
||||
"Eff" 'ediff-files
|
||||
"Efp" 'ediff-patch-file
|
||||
"Eh" 'ediff-documentation
|
||||
"Emb3" 'ediff-merge-buffers-with-ancestor
|
||||
"Embb" 'ediff-merge-buffers
|
||||
"Emd3" 'ediff-merge-directories-with-ancestor
|
||||
"Emdd" 'ediff-merge-directories
|
||||
"Emf3" 'ediff-merge-files-with-ancestor
|
||||
"Emff" 'ediff-merge-files
|
||||
"Emr3" 'ediff-merge-revisions-with-ancestor
|
||||
"Emrr" 'ediff-merge-revisions
|
||||
"Erl" 'ediff-regions-linewise
|
||||
"Erw" 'ediff-regions-wordwise
|
||||
"Es" 'ediff-show-registry
|
||||
"Ev" 'ediff-revision
|
||||
"Ewl" 'ediff-windows-linewise
|
||||
"Eww" 'ediff-windows-wordwise)
|
||||
"Db3" 'ediff-buffers3
|
||||
"Dbb" 'ediff-buffers
|
||||
"Dbp" 'ediff-patch-buffer
|
||||
"DB" 'ediff-backup
|
||||
"Dd3" 'ediff-directories3
|
||||
"Ddd" 'ediff-directories
|
||||
"Ddr" 'ediff-directory-revisions
|
||||
"Df." 'spacemacs/ediff-dotfile-and-template
|
||||
"Df3" 'ediff-files3
|
||||
"Dff" 'ediff-files
|
||||
"Dfp" 'ediff-patch-file
|
||||
"Dh" 'ediff-documentation
|
||||
"Dmb3" 'ediff-merge-buffers-with-ancestor
|
||||
"Dmbb" 'ediff-merge-buffers
|
||||
"Dmd3" 'ediff-merge-directories-with-ancestor
|
||||
"Dmdd" 'ediff-merge-directories
|
||||
"Dmf3" 'ediff-merge-files-with-ancestor
|
||||
"Dmff" 'ediff-merge-files
|
||||
"Dmr3" 'ediff-merge-revisions-with-ancestor
|
||||
"Dmrr" 'ediff-merge-revisions
|
||||
"Drl" 'ediff-regions-linewise
|
||||
"Drw" 'ediff-regions-wordwise
|
||||
"Ds" 'ediff-show-registry
|
||||
"Dv" 'ediff-revision
|
||||
"Dwl" 'ediff-windows-linewise
|
||||
"Dww" 'ediff-windows-wordwise)
|
||||
;; file -----------------------------------------------------------------------
|
||||
(spacemacs/set-leader-keys
|
||||
"fA" 'spacemacs/find-file-and-replace-buffer
|
||||
|
@ -648,6 +648,7 @@ respond to this toggle."
|
|||
"xa|" 'spacemacs/align-repeat-bar
|
||||
"xc" 'count-region
|
||||
"xd SPC" 'cycle-spacing
|
||||
"xdl" 'delete-blank-lines
|
||||
"xdw" 'delete-trailing-whitespace
|
||||
"xjc" 'set-justification-center
|
||||
"xjf" 'set-justification-full
|
||||
|
|
|
@ -14,21 +14,21 @@
|
|||
(defun spacemacs/toggle-centered-buffer ()
|
||||
"Toggle visual centering of the current buffer."
|
||||
(interactive)
|
||||
(letf ((writeroom-maximize-window nil)
|
||||
(cl-letf ((writeroom-maximize-window nil)
|
||||
(writeroom-mode-line t))
|
||||
(call-interactively 'writeroom-mode)))
|
||||
|
||||
(defun spacemacs/toggle-distraction-free ()
|
||||
"Toggle visual distraction free mode."
|
||||
(interactive)
|
||||
(letf ((writeroom-maximize-window t)
|
||||
(cl-letf ((writeroom-maximize-window t)
|
||||
(writeroom-mode-line nil))
|
||||
(call-interactively 'writeroom-mode)))
|
||||
|
||||
(defun spacemacs/centered-buffer-transient-state ()
|
||||
"Center buffer and enable centering transient state."
|
||||
(interactive)
|
||||
(letf ((writeroom-maximize-window nil)
|
||||
(cl-letf ((writeroom-maximize-window nil)
|
||||
(writeroom-mode-line t))
|
||||
(writeroom-mode 1)
|
||||
(spacemacs/centered-buffer-mode-transient-state/body)))
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
(setq spacemacs-modeline-packages
|
||||
'(
|
||||
anzu
|
||||
doom-modeline
|
||||
(doom-modeline :toggle (eq (spacemacs/get-mode-line-theme-name) 'doom))
|
||||
fancy-battery
|
||||
;; dependency of spaceline-all-the-icons which came from
|
||||
;; the emacs wiki, we fetch it from Emacs Mirror for now.
|
||||
|
@ -34,7 +34,6 @@
|
|||
(defun spacemacs-modeline/init-doom-modeline ()
|
||||
(use-package doom-modeline
|
||||
:defer t
|
||||
:if (eq (spacemacs/get-mode-line-theme-name) 'doom)
|
||||
:init (doom-modeline-mode)))
|
||||
|
||||
(defun spacemacs-modeline/init-fancy-battery ()
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#+TITLE: elasticsearch layer
|
||||
|
||||
#+TAGS: dsl|layer|programming
|
||||
|
||||
[[file:img/elasticsearch.png]]
|
||||
|
||||
* Table of Contents :TOC_5_gh:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#features][Features:]]
|
||||
- [[#install][Install]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
|
||||
* Description
|
||||
This layer adds Elasticsearch query and monitoring support to Spacemacs.
|
||||
|
||||
** Features:
|
||||
- Autocompletion for Elasticsearch Query DSL
|
||||
- Support for Org-Babel
|
||||
- Support for an Elasticsearch Command Center to monitor a cluster
|
||||
|
||||
* Install
|
||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
add =elasticsearch= to the existing =dotspacemacs-configuration-layers= list in this
|
||||
file.
|
||||
|
||||
* Key bindings
|
||||
This layer makes use of [[https://github.com/dakrone/es-mode#keyboard-shortcuts][es-mode key bindings]]
|
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,29 @@
|
|||
;;; packages.el --- elasticsearch layer packages file for Spacemacs.
|
||||
;;
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Jean Rigotti <gmgotti@pm.me>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defconst elasticsearch-packages
|
||||
'(
|
||||
company
|
||||
org
|
||||
es-mode
|
||||
))
|
||||
|
||||
(defun elasticsearch/init-es-mode ()
|
||||
(use-package es-mode
|
||||
:defer t
|
||||
:mode ("\\.es\\'" . es-mode)))
|
||||
|
||||
(defun elasticsearch/post-init-company ()
|
||||
(spacemacs|add-company-backends :backends es-company-backend :modes es-mode))
|
||||
|
||||
(defun elasticsearch/pre-init-org ()
|
||||
(spacemacs|use-package-add-hook org
|
||||
:post-config (add-to-list 'org-babel-load-languages '(elasticsearch . t))))
|
|
@ -9,11 +9,9 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defun spacemacs//setup-lsp-jump-handler (&rest modes)
|
||||
(defun spacemacs//setup-lsp-jump-handler ()
|
||||
"Set jump handler for LSP with the given MODE."
|
||||
(dolist (m modes)
|
||||
(add-to-list (intern (format "spacemacs-jump-handlers-%S" m))
|
||||
'(lsp-ui-peek-find-definitions :async t))))
|
||||
(add-to-list 'spacemacs-jump-handlers '(lsp-ui-peek-find-definitions :async t)))
|
||||
|
||||
|
||||
;; Key bindings
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
(spacemacs/lsp-bind-keys)
|
||||
(add-hook 'lsp-after-open-hook (lambda ()
|
||||
"Setup xref jump handler and declare keybinding prefixes"
|
||||
(spacemacs//setup-lsp-jump-handler major-mode)
|
||||
(spacemacs//setup-lsp-jump-handler)
|
||||
(spacemacs//lsp-declare-prefixes-for-mode major-mode))))))
|
||||
|
||||
(defun lsp/init-lsp-ui ()
|
||||
|
|
|
@ -103,7 +103,7 @@ the user activate the completion manually."
|
|||
"Move point to end of current prompt when switching to insert state."
|
||||
(when (and (eq major-mode 'eshell-mode)
|
||||
;; Not on last line, we might want to edit within it.
|
||||
(not (eq (line-end-position) (point-max)))
|
||||
(not (>= (point) eshell-last-output-end))
|
||||
;; Not on the last sent command if we use smart-eshell so we can
|
||||
;; edit it.
|
||||
(not (and shell-enable-smart-eshell
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
- [[#programming-languages][Programming languages]]
|
||||
- [[#domain-specific-dsls][Domain-specific (DSLs)]]
|
||||
- [[#coq][Coq]]
|
||||
- [[#elasticsearch][Elasticsearch]]
|
||||
- [[#ess-r][Ess (r)]]
|
||||
- [[#extra-languages][Extra languages]]
|
||||
- [[#faust][Faust]]
|
||||
|
@ -113,7 +114,6 @@
|
|||
- [[#frameworks][Frameworks]]
|
||||
- [[#django][Django]]
|
||||
- [[#emberjs][Emberjs]]
|
||||
- [[#flow-type][Flow-type]]
|
||||
- [[#phoenix][Phoenix]]
|
||||
- [[#react][React]]
|
||||
- [[#ruby-on-rails][Ruby on rails]]
|
||||
|
@ -180,7 +180,7 @@
|
|||
- [[#speed-reading][Speed reading]]
|
||||
- [[#source-control][Source control]]
|
||||
- [[#git][Git]]
|
||||
- [[#github][GitHub]]
|
||||
- [[#github][Github]]
|
||||
- [[#perforce][Perforce]]
|
||||
- [[#version-control][Version-control]]
|
||||
- [[#spacemacs][Spacemacs]]
|
||||
|
@ -553,20 +553,20 @@ This layer sets up a file navigation and project explorer side-window via [[http
|
|||
|
||||
Features:
|
||||
|
||||
An detailed overview over Treemacs' available features is available in [[https://github.com/Alexander-Miller/treemacs#detailed-feature-list][its
|
||||
readme]]. In a short summary Treemacs offers the following:
|
||||
A detailed overview of the features of Treemacs is available in [[https://github.com/Alexander-Miller/treemacs#detailed-feature-list][the Treemacs
|
||||
readme]]. In short, Treemacs offers:
|
||||
- Simple and powerful navigation and ability to detail exactly how and where a
|
||||
file should be opened
|
||||
- Good looking png icons.
|
||||
file should be opened.
|
||||
- Good looking icons.
|
||||
- Display of multiple file trees organized as projects residing in a workspace.
|
||||
- Ability to show tags contained in files. Tags are provided by imenu, so
|
||||
nearly every filetype is supported.
|
||||
- Mouse interface for single and double left clicks in line with modern GUI standards.
|
||||
(Clicking on an icon will also display a file's tags)
|
||||
- Locational awareness: commands like ~find-file~ or ~magit-status~ will use the location
|
||||
of the node at point (with $HOME as fallback)
|
||||
- Optionally fontifying files based on their git status.
|
||||
- Optionally collapsing single-dir-child directories into one.
|
||||
- Ability to show tags contained in files. Tags are provided by [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Imenu.html][Imenu]], so nearly
|
||||
every filetype is supported.
|
||||
- Mouse interface for single and double left clicks in line with modern GUI
|
||||
standards (clicking on an icon will also display the file's tags).
|
||||
- Location awareness: commands like ~find-file~ or ~magit-status~ will use the
|
||||
location of the node at point (with =$HOME= as fallback).
|
||||
- Optional fontifying of files based on their git status.
|
||||
- Optional collapsing of /single-dir-child/ directories into one.
|
||||
- Doing both asynchronously for an imperceptible performance cost.
|
||||
- Optional =follow-mode= to automatically focus the currently selected file or tag.
|
||||
- Optional =filewatch-mode= to automatically refresh the view after (and only
|
||||
|
@ -1051,6 +1051,16 @@ Features:
|
|||
- Replacement of certain constants with the correct mathematical signs
|
||||
- Inserting of certain preconfigured proof elements
|
||||
|
||||
*** Elasticsearch
|
||||
[[file:+tools/elasticsearch/README.org][+tools/elasticsearch/README.org]]
|
||||
|
||||
This layer adds Elasticsearch query and monitoring support to Spacemacs.
|
||||
|
||||
Features:
|
||||
- Autocompletion for Elasticsearch Query DSL
|
||||
- Support for Org-Babel
|
||||
- Support for an Elasticsearch Command Center to monitor a cluster
|
||||
|
||||
*** Ess (r)
|
||||
[[file:+lang/ess/README.org][+lang/ess/README.org]]
|
||||
|
||||
|
@ -1559,19 +1569,6 @@ Features:
|
|||
- Key bindings for generators and also easily revert generator actions
|
||||
- Ability to build, start server, and run tests
|
||||
|
||||
*** Flow-type
|
||||
[[file:+lang/flow-type/README.org][+lang/flow-type/README.org]]
|
||||
|
||||
This layer adds support for static type checking in javascript based
|
||||
on the [[https://flowtype.org/][flow]] project to spacemacs.
|
||||
|
||||
Features:
|
||||
- Syntax highlighting
|
||||
- Linting
|
||||
- Code-completion
|
||||
- Eldoc integration for flow-types
|
||||
- Compilation
|
||||
|
||||
*** Phoenix
|
||||
[[file:+frameworks/phoenix/README.org][+frameworks/phoenix/README.org]]
|
||||
|
||||
|
@ -1975,9 +1972,9 @@ This layer adds support for the Python language.
|
|||
|
||||
Features:
|
||||
- Support for the following backends:
|
||||
- [[https://github.com/proofit404/anaconda-mode][anaconda]],
|
||||
- [[https://github.com/emacs-lsp/lsp-python][Language Server Protocol]]
|
||||
- python-language-server (default)
|
||||
- [[https://github.com/proofit404/anaconda-mode][anaconda]] (default),
|
||||
- [[https://github.com/emacs-lsp/lsp-python][Language Server Protocol]] (experimental - 2 implementations),
|
||||
- python-language-server
|
||||
- Microsoft python language server
|
||||
- Auto-completion
|
||||
- Code Navigation
|
||||
|
@ -2038,7 +2035,7 @@ Features:
|
|||
This layer supports [[https://www.rust-lang.org][Rust]] development in Spacemacs.
|
||||
|
||||
Features:
|
||||
- Auto-completion and navigation support through [[https://github.com/emacs-lsp/lsp-rust][lsp]] or [[https://github.com/phildawes/racer][Racer]]
|
||||
- Auto-completion and navigation support through [[https://github.com/emacs-lsp/lsp-mode][lsp-mode]] or [[https://github.com/phildawes/racer][Racer]]
|
||||
- Interactive debugger using [[https://github.com/emacs-lsp/dap-mode][dap-mode]]
|
||||
- support for the Rust package manager [[http://doc.crates.io/index.html][Cargo]]
|
||||
|
||||
|
@ -2345,7 +2342,7 @@ Features:
|
|||
|
||||
New to Magit? Checkout the [[https://magit.vc/about/][official intro]].
|
||||
|
||||
** GitHub
|
||||
** Github
|
||||
[[file:+source-control/github/README.org][+source-control/github/README.org]]
|
||||
|
||||
This layers adds support for [[http://github.com][GitHub]].
|
||||
|
|
Loading…
Reference in New Issue