This repository was archived by the owner on Jul 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
WIP: override-major-mode-keybindings #8
Open
vv111y
wants to merge
6
commits into
benneti:master
Choose a base branch
from
vv111y:override-major-keybindings
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
009ebad
broken, fix this
vv111y f707fbe
cleaner pop to buffer keybindings
vv111y 46bb8dc
cleanup code
vv111y d9d22d6
lose C-l keybinding conflicts with window navigation
vv111y b7af786
websocket & zmq init
vv111y d38864e
change jupyter remote repo to new
vv111y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,45 +32,71 @@ | |
| (defconst jupyter-packages | ||
| '( | ||
| company | ||
| jupyter | ||
| ;; (jupyter :location (recipe :fetcher file :path "~/.spacemacs.d/emacs-jupyter")) | ||
| ;; upate may 27, 2023 | ||
| (jupyter :Location (recipe :fetcher github :repo "emacs-jupyter/jupyter")) | ||
| ;; (jupyter :location local) | ||
| ;; jupyter | ||
| smartparens | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i.e. added here and then have an init-use-jupyter-repl...
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. like this (use-jupyter... :location local) |
||
| websocket | ||
| zmq | ||
| )) | ||
|
|
||
| (defun jupyter/init-jupyter () | ||
| (if (executable-find "jupyter") | ||
| (use-package jupyter | ||
| :defer t | ||
| :demand t | ||
| :init | ||
| (progn | ||
| (spacemacs/set-leader-keys | ||
| "aja" 'jupyter-repl-associate-buffer | ||
| "ajc" 'jupyter-connect-repl | ||
| "ajr" 'jupyter-run-repl | ||
| "ajs" 'jupyter-server-list-kernels | ||
| "ajt" 'use-jupyter-repl-mode | ||
| ) | ||
| "ajt" 'use-jupyter-repl) | ||
| (spacemacs/set-leader-keys-for-major-mode 'jupyter-repl-mode | ||
| "i" 'jupyter-inspect-at-point | ||
| "l" 'jupyter-load-file | ||
| "s" 'jupyter-repl-scratch-buffer | ||
| "I" 'jupyter-repl-interrupt-kernel | ||
| "R" 'jupyter-repl-restart-kernel)) | ||
| :config | ||
| (progn | ||
| "R" 'jupyter-repl-restart-kernel) | ||
| (spacemacs/set-leader-keys-for-minor-mode 'use-jupyter-repl-mode | ||
| "'" 'jupyter-run-repl | ||
| "cc" 'jupyter-load-file | ||
| "cC" '(lambda () (interactive) (use-jupyter-eval-pop 'jupyter-load-file)) | ||
| "sB" '(lambda () (interactive) (use-jupyter-eval-pop 'jupyter-eval-buffer)) | ||
| "sb" 'jupyter-eval-buffer | ||
| "sF" '(lambda () (interactive) (use-jupyter-eval-pop 'jupyter-eval-defun)) | ||
| "sf" 'jupyter-eval-defun | ||
| "si" 'jupyter-run-repl | ||
| "sR" '(lambda () (interactive) (use-jupyter-eval-pop 'jupyter-eval-line-or-region)) | ||
| "sr" 'jupyter-eval-line-or-region) | ||
| (when (eq dotspacemacs-editing-style 'vim) | ||
| (evil-define-key '(insert normal) jupyter-repl-mode-map | ||
| (kbd "C-j") 'jupyter-repl-history-next | ||
| (kbd "C-k") 'jupyter-repl-history-previous | ||
| (kbd "C-l") 'jupyter-repl-clear-cells | ||
| ;; (kbd "C-l") 'jupyter-repl-clear-cells | ||
| (kbd "M-j") 'jupyter-repl-forward-cell | ||
| (kbd "M-k") 'jupyter-repl-backward-cell | ||
| (kbd "C-s") 'jupyter-repl-scratch-buffer | ||
| (kbd "C-R") 'jupyter-repl-history-next-matching | ||
| (kbd "C-r") 'jupyter-repl-history-previous-matching)) | ||
| )) | ||
| (kbd "C-R") 'isearch-forward | ||
| (kbd "C-r") 'isearch-backward)))) | ||
|
|
||
| (message "jupyter was not found in your path, jupyter is not loaded"))) | ||
|
|
||
| (defun jupyter/post-init-company () | ||
| (spacemacs|add-company-backends :backends company-capf :modes jupyter-repl-mode)) | ||
|
|
||
| (defun jupyter/post-init-smartparens () | ||
| (add-hook 'jupyter-repl-mode-hook 'smartparens-mode)) | ||
|
|
||
| (defun jupyter/init-websocket () | ||
| (use-package websocket | ||
| :defer t)) | ||
|
|
||
| (defun jupyter/init-zmq () | ||
| (use-package zmq | ||
| :defer t)) | ||
|
|
||
| ;;; packages.el ends here | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a local package, i.e. a file and then loaded in packages.el, this might also fix needing to use the keybinging twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file should be in a subfolder local (see for example the +completion/helm layer with helm-spacemacs-help