Compare commits
14 Commits
dd3c5be63f
...
master
Author | SHA1 | Date | |
---|---|---|---|
27a4303ff3 | |||
af497c8391 | |||
6699148ed9 | |||
44cd5ef97b | |||
593ae9806c | |||
14ad96d4da | |||
74f18cbcab | |||
79be4334bd | |||
809dcf1f21 | |||
2651b91b21 | |||
6b908cb1dd | |||
5650593aa5 | |||
831033fded | |||
569919fa26 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,3 +12,6 @@ quelpa
|
|||||||
request
|
request
|
||||||
recentf~
|
recentf~
|
||||||
transient
|
transient
|
||||||
|
eln-cache
|
||||||
|
*.elc
|
||||||
|
session.*
|
||||||
|
4
init.el
4
init.el
@@ -21,11 +21,11 @@
|
|||||||
;;(require 'lib/bootstrap)
|
;;(require 'lib/bootstrap)
|
||||||
;;(require 'lib/apps)
|
;;(require 'lib/apps)
|
||||||
;;(require 'lib/introspection)
|
;;(require 'lib/introspection)
|
||||||
|
(require 'lib/with)
|
||||||
|
|
||||||
;; Load full configuration.
|
;; Load full configuration.
|
||||||
(require 'init-utilities)
|
(require 'init-utilities)
|
||||||
;;(require 'init-vcs)
|
(require 'init-vcs)
|
||||||
(require 'init-modes)
|
(require 'init-modes)
|
||||||
(require 'init-apps)
|
(require 'init-apps)
|
||||||
|
|
||||||
|
@@ -4,6 +4,27 @@
|
|||||||
|
|
||||||
;; https://github.com/skeeto/elfeed
|
;; https://github.com/skeeto/elfeed
|
||||||
;; An Emacs web feeds client
|
;; An Emacs web feeds client
|
||||||
|
|
||||||
|
(require 'elfeed)
|
||||||
|
|
||||||
|
;; From https://medium.com/emacs/using-elfeed-to-view-videos-6dfc798e51e6
|
||||||
|
(defun elfeed-v-mpv (url)
|
||||||
|
"Watch a video from URL in MPV."
|
||||||
|
(async-shell-command (format "mpv --cache=yes --cache-secs=60 %s" url)))
|
||||||
|
|
||||||
|
(defun elfeed-view-mpv (&optional use-generic-p)
|
||||||
|
"Youtube-feed link."
|
||||||
|
(interactive "P")
|
||||||
|
(let ((entries (elfeed-search-selected)))
|
||||||
|
(cl-loop for entry in entries
|
||||||
|
do (elfeed-untag entry 'unread)
|
||||||
|
when (elfeed-entry-link entry)
|
||||||
|
do (elfeed-v-mpv it))
|
||||||
|
(mapc #'elfeed-search-update-entry entries)
|
||||||
|
(unless (use-region-p) (forward-line))))
|
||||||
|
|
||||||
|
(define-key elfeed-search-mode-map (kbd "v") 'elfeed-view-mpv)
|
||||||
|
|
||||||
(use-package elfeed
|
(use-package elfeed
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands elfeed
|
:commands elfeed
|
||||||
@@ -15,9 +36,26 @@
|
|||||||
"https://blog.finxter.com/feed"
|
"https://blog.finxter.com/feed"
|
||||||
"https://planet.emacslife.com/atom.xml"
|
"https://planet.emacslife.com/atom.xml"
|
||||||
"https://planetpython.org/rss20.xml"
|
"https://planetpython.org/rss20.xml"
|
||||||
"http://www.reddit.com/r/emacs/.rss"
|
;; "http://www.reddit.com/r/emacs/.rss"
|
||||||
"http://linuxfr.org/journaux.atom"
|
"http://linuxfr.org/journaux.atom"
|
||||||
"https://xkcd.com/atom.xml"
|
"https://xkcd.com/atom.xml"
|
||||||
|
"https://medium.com/feed/tag/python"
|
||||||
|
"https://blog.devgenius.io/feed"
|
||||||
|
"https://mathspp.com/blog.atom"
|
||||||
|
"https://lwn.net/headlines/rss"
|
||||||
|
"https://nyxt.atlas.engineer/feed"
|
||||||
|
"https://pyvideo.org/feeds/all.rss.xml"
|
||||||
|
"https://toobnix.org/feeds/videos.xml?videoChannelId=154" ;; EmacsConf
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCWCFzEJd7PhVulMXwGjcYAA" ;; Pyjamas
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCVFkW-chclhuyYRbmmfwt6w" ;; Matrixdotorg
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCbn8O8WwMeoZsPRxgumfvAQ" ;; ENS
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ" ;; System Crafters
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCwuyodzTl_KdEKNuJmeo99A" ;; Emacs confs
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCe_eAP4ToqFLSxzvkTlNzUQ" ;; CommCon
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCfX55Sx5hEFjoC3cNs6mCUQ" ;; Linux foundation Org
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCwI-JbGNsojunnHbFAc0M4Q" ;; Arte
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCKPSmMfDsXTKrCZApukcJ7A" ;; Talk Python
|
||||||
|
"https://www.youtube.com/feeds/videos.xml?channel_id=UCK_eZkV9CYCxhdf9f0dEukA" ;; Python Bytes Podcast
|
||||||
)))
|
)))
|
||||||
|
|
||||||
(provide 'apps/elfeed)
|
(provide 'apps/elfeed)
|
||||||
|
9
lisp/init-vcs.el
Normal file
9
lisp/init-vcs.el
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
;;; init-vcs.el --- initializes version control systems -*- lexical-binding: t; -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(load-all-files-from-dir (path-join *user-emacs-lisp-directory* "vcs"))
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'init-vcs)
|
||||||
|
;;; init-vcs.el ends here
|
@@ -116,6 +116,15 @@ of FILE in the current directory, suitable for creation"
|
|||||||
)
|
)
|
||||||
|
|
||||||
;;; (Packages) ;;;
|
;;; (Packages) ;;;
|
||||||
|
|
||||||
|
(use-package gdb-mi
|
||||||
|
:quelpa (gdb-mi :fetcher git
|
||||||
|
:url "https://github.com/weirdNox/emacs-gdb.git"
|
||||||
|
:files ("*.el" "*.c" "*.h" "Makefile"))
|
||||||
|
:init
|
||||||
|
(fmakunbound 'gdb)
|
||||||
|
(fmakunbound 'gdb-enable-debug))
|
||||||
|
|
||||||
;; https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cc-vars.el
|
;; https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cc-vars.el
|
||||||
;; user customization variables for CC Mod
|
;; user customization variables for CC Mod
|
||||||
(use-package cc-vars
|
(use-package cc-vars
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'ob)
|
||||||
|
|
||||||
(defconst *user-org-data-directory*
|
(defconst *user-org-data-directory*
|
||||||
(path-join *user-data-directory* "org")
|
(path-join *user-data-directory* "org")
|
||||||
"Path to user's org data store.")
|
"Path to user's org data store.")
|
||||||
@@ -128,6 +130,17 @@
|
|||||||
;; (interactive)
|
;; (interactive)
|
||||||
;; (cancel-timer user/org-mobile-sync-timer))
|
;; (cancel-timer user/org-mobile-sync-timer))
|
||||||
|
|
||||||
|
;; From https://emacs.stackexchange.com/questions/44664/apply-ansi-color-escape-sequences-for-org-babel-results
|
||||||
|
(defun user--babel-ansi ()
|
||||||
|
"Add ANSI escaping commands."
|
||||||
|
(when-let ((beg (org-babel-where-is-src-block-result nil nil)))
|
||||||
|
(save-excursion
|
||||||
|
(goto-char beg)
|
||||||
|
(when (looking-at org-babel-result-regexp)
|
||||||
|
(let ((end (org-babel-result-end))
|
||||||
|
(ansi-color-context-region nil))
|
||||||
|
(ansi-color-apply-on-region beg end))))))
|
||||||
|
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:init
|
:init
|
||||||
@@ -336,6 +349,14 @@
|
|||||||
org-id-locations-file
|
org-id-locations-file
|
||||||
(path-join *user-org-data-directory* "org-id-locations")))
|
(path-join *user-org-data-directory* "org-id-locations")))
|
||||||
|
|
||||||
|
;; https://github.com/rougier/svg-tag-mode
|
||||||
|
;; A minor mode for Emacs that replace keywords with nice SVG labels
|
||||||
|
;; (use-package svg-tag-mode
|
||||||
|
;; :ensure t
|
||||||
|
;; :config
|
||||||
|
;; (setq svg-tag-tags '(("TODO" . ((lambda (tag) (svg-tag-make "TODO"))))))
|
||||||
|
;; )
|
||||||
|
|
||||||
;; https://github.com/grugrut/helm-books/tree/625aadec1541a5ca36951e4ce1301f4b6fe2bf3f
|
;; https://github.com/grugrut/helm-books/tree/625aadec1541a5ca36951e4ce1301f4b6fe2bf3f
|
||||||
;; Book search interface for emacs helm.
|
;; Book search interface for emacs helm.
|
||||||
(use-package helm-books
|
(use-package helm-books
|
||||||
@@ -347,18 +368,6 @@
|
|||||||
(file (concat org-directory "book.org"))
|
(file (concat org-directory "book.org"))
|
||||||
"* %(helm-books)")))
|
"* %(helm-books)")))
|
||||||
|
|
||||||
;; https://github.com/Chobbes/org-chef
|
|
||||||
;; A package for making a cookbook and managing recipes with org-mode.
|
|
||||||
(use-package org-chef
|
|
||||||
:disabled
|
|
||||||
:config
|
|
||||||
(add-to-list
|
|
||||||
'org-capture-templates
|
|
||||||
`("c" "Cookbook" entry
|
|
||||||
(file ,(path-join *user-org-data-directory* "cookbook.org"))
|
|
||||||
"%(org-chef-get-recipe-from-url)"
|
|
||||||
:empty-lines 1)))
|
|
||||||
|
|
||||||
;; https://github.com/waymondo/org-repo-todo
|
;; https://github.com/waymondo/org-repo-todo
|
||||||
;; Simple repository todo management with org-mode
|
;; Simple repository todo management with org-mode
|
||||||
(use-package org-repo-todo))
|
(use-package org-repo-todo))
|
||||||
@@ -367,10 +376,15 @@
|
|||||||
;; Working with Code Blocks
|
;; Working with Code Blocks
|
||||||
(use-package ob-core
|
(use-package ob-core
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
:hook
|
||||||
|
((org-babel-after-execute-hook . user--babel-ansi))
|
||||||
:config
|
:config
|
||||||
(validate-setq
|
(validate-setq
|
||||||
;; Don't ask for validation.
|
;; Don't ask for validation.
|
||||||
org-confirm-babel-evaluate nil)
|
org-confirm-babel-evaluate nil
|
||||||
|
;; Set the number of lines for block outputs from which it'll placed
|
||||||
|
;; in a #+begin_example...#+end_example block
|
||||||
|
org-babel-min-lines-for-block-output 100)
|
||||||
|
|
||||||
(add-many-to-list
|
(add-many-to-list
|
||||||
'org-babel-load-languages
|
'org-babel-load-languages
|
||||||
@@ -394,6 +408,8 @@
|
|||||||
(push '(latex . t) to-load))
|
(push '(latex . t) to-load))
|
||||||
(with-executable 'perl
|
(with-executable 'perl
|
||||||
(push '(perl . t) to-load))
|
(push '(perl . t) to-load))
|
||||||
|
(with-executable 'php
|
||||||
|
(push '(php . t) to-load))
|
||||||
(with-executable 'python
|
(with-executable 'python
|
||||||
(push '(python . t) to-load))
|
(push '(python . t) to-load))
|
||||||
(with-executable 'R
|
(with-executable 'R
|
||||||
@@ -643,10 +659,14 @@
|
|||||||
;; https://github.com/weirdNox/org-noter
|
;; https://github.com/weirdNox/org-noter
|
||||||
;; Emacs document annotator, using Org-mode
|
;; Emacs document annotator, using Org-mode
|
||||||
(use-package org-noter
|
(use-package org-noter
|
||||||
:disabled)
|
:ensure t)
|
||||||
;; https://github.com/louietan/anki-editor
|
;; https://github.com/louietan/anki-editor
|
||||||
;; Emacs minor mode for making Anki cards with Org
|
;; Emacs minor mode for making Anki cards with Org
|
||||||
(use-package anki-editor)
|
(use-package anki-editor
|
||||||
|
:ensure t
|
||||||
|
:after org-noter
|
||||||
|
)
|
||||||
|
|
||||||
;; https://github.com/dfeich/org-screenshot
|
;; https://github.com/dfeich/org-screenshot
|
||||||
;; screenshots integrated with emacs org mode attachments
|
;; screenshots integrated with emacs org mode attachments
|
||||||
(use-package org-attach-screenshot
|
(use-package org-attach-screenshot
|
||||||
@@ -654,7 +674,10 @@
|
|||||||
;; https://github.com/harrybournis/org-fancy-priorities
|
;; https://github.com/harrybournis/org-fancy-priorities
|
||||||
;; Display Org Mode priorities as custom strings
|
;; Display Org Mode priorities as custom strings
|
||||||
(use-package org-fancy-priorities
|
(use-package org-fancy-priorities
|
||||||
:hook (org-mode-hook . org-fancy-priorities-mode))
|
:hook
|
||||||
|
(org-mode-hook . org-fancy-priorities-mode)
|
||||||
|
:config
|
||||||
|
(setq org-fancy-priorities-list '("HIGH" "MID" "LOW" "OPTIONAL")))
|
||||||
;; https://github.com/calvinwyoung/org-autolist
|
;; https://github.com/calvinwyoung/org-autolist
|
||||||
;; Making it even easier to edit lists in org-mode!
|
;; Making it even easier to edit lists in org-mode!
|
||||||
(use-package org-autolist
|
(use-package org-autolist
|
||||||
|
10
lisp/modes/php.el
Normal file
10
lisp/modes/php.el
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
;;; php.el --- initializes PHP modes -*- lexical-binding: t; -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(use-package php-mode
|
||||||
|
:if (executable-find "php")
|
||||||
|
:defer)
|
||||||
|
|
||||||
|
(provide 'modes/php)
|
||||||
|
;;; php.el ends here
|
@@ -13,10 +13,21 @@
|
|||||||
;; lsp python customization
|
;; lsp python customization
|
||||||
(lsp-register-custom-settings
|
(lsp-register-custom-settings
|
||||||
'(("pylsp.plugins.pyls_mypy.enabled" t t)
|
'(("pylsp.plugins.pyls_mypy.enabled" t t)
|
||||||
("pylsp.plugins.flake8.maxLineLength" 100)
|
;; ("pylsp.plugins.flake8.maxLineLength" 100)
|
||||||
|
;; ("pylsp.plugins.pycodestyle.maxLineLength" 100)
|
||||||
("pylsp.plugins.yapf.enabled" t t)
|
("pylsp.plugins.yapf.enabled" t t)
|
||||||
("pylsp.plugins.pylint.enabled" t t)))
|
("pylsp.plugins.pylint.enabled" t t)))
|
||||||
|
|
||||||
|
;; locate the root pyproject.toml to force pylint rcfile
|
||||||
|
;; (let* ((filename "pyproject.toml")
|
||||||
|
(let* ((filename "setup.cfg")
|
||||||
|
(found (locate-dominating-file default-directory filename)))
|
||||||
|
(when found
|
||||||
|
(let ((pyproject (format "%s%s" (replace-regexp-in-string "~" (getenv "HOME") found) filename)))
|
||||||
|
(setq-local lsp-pylsp-plugins-pylint-args (vector (format "--rcfile=%s" pyproject))))))
|
||||||
|
|
||||||
|
(message (format "lsp-pylsp-plugins-pylint-args=%s" lsp-pylsp-plugins-pylint-args))
|
||||||
|
|
||||||
;; Enable virtualenv support.
|
;; Enable virtualenv support.
|
||||||
(when(feature-p 'pyvenv)
|
(when(feature-p 'pyvenv)
|
||||||
(pyvenv-mode t))
|
(pyvenv-mode t))
|
||||||
@@ -39,8 +50,8 @@
|
|||||||
:mode ("SCon\(struct\|script\)$" . python-mode)
|
:mode ("SCon\(struct\|script\)$" . python-mode)
|
||||||
:interpreter ("python[0-9.]*" . python-mode)
|
:interpreter ("python[0-9.]*" . python-mode)
|
||||||
:hook
|
:hook
|
||||||
(python-mode-hook . lsp)
|
|
||||||
(python-mode-hook . user--python-mode-hook)
|
(python-mode-hook . user--python-mode-hook)
|
||||||
|
(python-mode-hook . lsp-deferred)
|
||||||
(python-mode-hook . (lambda ()
|
(python-mode-hook . (lambda ()
|
||||||
(add-hook 'before-save-hook #'user--python-format-before-save nil t)))
|
(add-hook 'before-save-hook #'user--python-format-before-save nil t)))
|
||||||
|
|
||||||
@@ -56,8 +67,8 @@
|
|||||||
python-shell-interpreter-args ""
|
python-shell-interpreter-args ""
|
||||||
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
|
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
|
||||||
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
|
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
|
||||||
python-shell-completion-setup-code "from IPython.core.completerlib import module_completion"
|
python-shell-completion-setup-code "from IPython.core.completerlib import module_completion"))
|
||||||
python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
|
;; python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
|
||||||
|
|
||||||
(with-executable 'bpython
|
(with-executable 'bpython
|
||||||
(defun user/bpython-term()
|
(defun user/bpython-term()
|
||||||
@@ -72,6 +83,14 @@
|
|||||||
;; https://github.com/pythonic-emacs/anaconda-mode
|
;; https://github.com/pythonic-emacs/anaconda-mode
|
||||||
;; Code navigation, documentation lookup and completion for Python.
|
;; Code navigation, documentation lookup and completion for Python.
|
||||||
(use-package anaconda-mode)
|
(use-package anaconda-mode)
|
||||||
|
|
||||||
|
;; https://github.com/Wilfred/pip-requirements.el
|
||||||
|
;; Major mode for editing pip requirements files
|
||||||
|
;; TODO: Find why completion does not run.
|
||||||
|
(use-package pip-requirements
|
||||||
|
:ensure t
|
||||||
|
)
|
||||||
|
|
||||||
;; https://github.com/tsgates/pylookup
|
;; https://github.com/tsgates/pylookup
|
||||||
;; Emacs mode for searching python documents with convenience
|
;; Emacs mode for searching python documents with convenience
|
||||||
(use-package pylookup
|
(use-package pylookup
|
||||||
|
15
lisp/modes/yaml.el
Normal file
15
lisp/modes/yaml.el
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
;;; yaml.el --- Initializes YAML mode -*- lexical-binding: t; -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(use-package yaml-mode
|
||||||
|
:ensure t
|
||||||
|
:defer
|
||||||
|
:config
|
||||||
|
(use-package flycheck-yamllint
|
||||||
|
:if (executable-find "yamllint")
|
||||||
|
:config
|
||||||
|
(flycheck-yamllint-setup)))
|
||||||
|
|
||||||
|
(provide 'modes/yaml)
|
||||||
|
;;; yaml.el ends here
|
@@ -72,12 +72,26 @@
|
|||||||
:config
|
:config
|
||||||
;; Make sure flycheck-pos-tip is loaded.
|
;; Make sure flycheck-pos-tip is loaded.
|
||||||
(require 'flycheck-pos-tip nil t))
|
(require 'flycheck-pos-tip nil t))
|
||||||
|
|
||||||
;; https://github.com/gexplorer/flycheck-indicator
|
;; https://github.com/gexplorer/flycheck-indicator
|
||||||
;; An Emacs minor-mode to get a fancy mode line indicator for Flycheck.
|
;; An Emacs minor-mode to get a fancy mode line indicator for Flycheck.
|
||||||
|
|
||||||
(use-package flycheck-indicator
|
(use-package flycheck-indicator
|
||||||
:hook (flycheck-mode-hook . flycheck-indicator-mode))
|
:hook (flycheck-mode-hook . flycheck-indicator-mode))
|
||||||
;; https://github.com/yasuyk/helm-flycheck
|
;; https://github.com/yasuyk/helm-flycheck
|
||||||
;; Show flycheck errors with helm.
|
;; Show flycheck errors with helm.
|
||||||
|
|
||||||
|
;; https://github.com/abingham/flycheck-vale
|
||||||
|
;; Flycheck integration for the vale natural language linter.
|
||||||
|
(use-package flycheck-vale
|
||||||
|
:ensure t
|
||||||
|
:quelpa(flycheck-vale
|
||||||
|
:fetcher git
|
||||||
|
:url "http://git.adrien.run/Adrien/flycheck-vale.git")
|
||||||
|
:config
|
||||||
|
(setq flycheck-vale-config-file "~/dev/perso/vale-config/.vale.ini")
|
||||||
|
(flycheck-vale-setup))
|
||||||
|
|
||||||
(use-package helm-flycheck)
|
(use-package helm-flycheck)
|
||||||
|
|
||||||
(global-flycheck-mode t))
|
(global-flycheck-mode t))
|
||||||
|
@@ -2,15 +2,11 @@
|
|||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code: https://github.com/emacs-lsp/lsp-mode
|
;;; Code: https://github.com/emacs-lsp/lsp-mode
|
||||||
|
|
||||||
(defun user--lsp-mode-hook ()
|
|
||||||
"Mode hook for LSP minor modes."
|
|
||||||
(message "user--lsp-mode-hook"))
|
|
||||||
|
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
:pin "MELPA"
|
:pin "MELPA"
|
||||||
|
:defer
|
||||||
:commands lsp
|
:commands lsp
|
||||||
:hook ((lsp-after-open-hook . lsp-enable-imenu)
|
:hook ((lsp-after-open-hook . lsp-enable-imenu))
|
||||||
(lsp-mode-hook . user--lsp-mode-hook))
|
|
||||||
:config
|
:config
|
||||||
(validate-setq
|
(validate-setq
|
||||||
;; Automatically try to figure out project root.
|
;; Automatically try to figure out project root.
|
||||||
|
@@ -118,6 +118,10 @@
|
|||||||
(sp-with-modes '(sh-mode markdown-mode gfm-mode rts-mode python-mode cython-mode)
|
(sp-with-modes '(sh-mode markdown-mode gfm-mode rts-mode python-mode cython-mode)
|
||||||
(sp-local-pair "`" nil :unless '(sp-point-before-word-p sp-point-after-word-p sp-point-before-same-p)))
|
(sp-local-pair "`" nil :unless '(sp-point-before-word-p sp-point-after-word-p sp-point-before-same-p)))
|
||||||
|
|
||||||
|
(sp-with-modes '(python-mode)
|
||||||
|
(sp-local-pair "f\"" "\"")
|
||||||
|
(sp-local-pair "f'" "'"))
|
||||||
|
|
||||||
(sp-with-modes '(markdown-mode gfm-mode rst-mode)
|
(sp-with-modes '(markdown-mode gfm-mode rst-mode)
|
||||||
(sp-local-pair "*" "*" :wrap "C-*" :skip-match 'user--sp-gfm-skip-asterisk)
|
(sp-local-pair "*" "*" :wrap "C-*" :skip-match 'user--sp-gfm-skip-asterisk)
|
||||||
(sp-local-tag "2" "**" "**")
|
(sp-local-tag "2" "**" "**")
|
||||||
@@ -125,7 +129,6 @@
|
|||||||
|
|
||||||
(sp-with-modes '(tex-mode plain-tex-mode latex-mode)
|
(sp-with-modes '(tex-mode plain-tex-mode latex-mode)
|
||||||
(sp-local-tag "i" "\"<" "\">")
|
(sp-local-tag "i" "\"<" "\">")
|
||||||
(sp-local-pair "$" nil :unless '(sp-point-before-word-p))
|
|
||||||
(sp-local-pair "\\[" " \\]")
|
(sp-local-pair "\\[" " \\]")
|
||||||
(sp-local-pair "\\(" " \\)")
|
(sp-local-pair "\\(" " \\)")
|
||||||
(sp-local-pair "\\{" " \\}")
|
(sp-local-pair "\\{" " \\}")
|
||||||
|
27
lisp/vcs/git.el
Normal file
27
lisp/vcs/git.el
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
;;; git.el --- Git integration -*- lexical-binding: t; -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(defun user--git-config ()
|
||||||
|
"Initialize Git support."
|
||||||
|
(message "user--git-config")
|
||||||
|
|
||||||
|
(use-package magit
|
||||||
|
:ensure t
|
||||||
|
:defer
|
||||||
|
:config
|
||||||
|
|
||||||
|
;; https://github.com/dandavison/magit-delta
|
||||||
|
;; Use delta (https://github.com/dandavison/delta) when viewing diffs in Magit
|
||||||
|
(use-package magit-delta
|
||||||
|
:ensure t
|
||||||
|
:if (executable-find "delta")
|
||||||
|
:hook (magit-mode . magit-delta-mode))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(with-executable 'git
|
||||||
|
(user--git-config))
|
||||||
|
|
||||||
|
(provide 'vcs/git)
|
||||||
|
;;; git.el ends here
|
Reference in New Issue
Block a user