Move coding productivity related packages from configuration.org to init.el
This commit is contained in:
parent
ae782630e5
commit
3d4e9a0ecf
@ -1,132 +1,3 @@
|
||||
* External packages to boost coding productivity
|
||||
|
||||
** ~electric-operator~ to automatically add spaces around operators
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package electric-operator
|
||||
:config
|
||||
;; Apply electric-operator-mode to vala-mode, too
|
||||
(apply #'electric-operator-add-rules-for-mode 'vala-mode
|
||||
(electric-operator-get-rules-for-mode 'prog-mode))
|
||||
:hook
|
||||
(c-mode-common . electric-operator-mode)
|
||||
(python-mode . electric-operator-mode))
|
||||
#+end_src
|
||||
|
||||
** ~rainbow-delimiters~
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package rainbow-delimiters
|
||||
:hook
|
||||
(prog-mode . rainbow-delimiters-mode))
|
||||
#+end_src
|
||||
|
||||
** ~rainbow-identifiers~
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package rainbow-identifiers)
|
||||
#+end_src
|
||||
|
||||
** ~auto-highlight-symbol~ to hightlight current symbol
|
||||
|
||||
Great help during refactoring.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package auto-highlight-symbol
|
||||
:config
|
||||
(global-auto-highlight-symbol-mode t))
|
||||
#+end_src
|
||||
|
||||
** ~glasses~, to make ReallyLongCamelCaseWords more readable
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package glasses
|
||||
:delight " 👓"
|
||||
:hook
|
||||
(prog-mode . glasses-mode))
|
||||
#+end_src
|
||||
|
||||
** ~hl-todo~ to highlight TODO comments
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package hl-todo
|
||||
:hook
|
||||
(prog-mode . hl-todo-mode))
|
||||
#+end_src
|
||||
|
||||
** ~bug-reference~ to turn bug/patch references to links
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defvar gpolonkai/bug-reference-url-bug-string "issues"
|
||||
"String to insert in a `bug-reference-url-format' for bug references.")
|
||||
|
||||
(put 'gpolonkai/bug-reference-url-bug-string 'safe-local-variable 'stringp)
|
||||
|
||||
(defvar gpolonkai/bug-reference-url-patch-string "merge_requests"
|
||||
"String to insert in a `bug-reference-url-format' for patch references.")
|
||||
|
||||
(defvar-local bug-reference-host "gitlab.com"
|
||||
"The hostname to use in `bug-reference-url-format'.")
|
||||
|
||||
(defvar-local bug-reference-group "gamesystems"
|
||||
"The group name or username to use in `bug-reference-url-format'.")
|
||||
|
||||
(defvar-local bug-reference-repository "game-app"
|
||||
"The repository name to use in `bug-reference-url-format'.")
|
||||
|
||||
(put 'gpolonkai/bug-reference-url-patch-string 'safe-local-variable 'stringp)
|
||||
|
||||
(defun gpolonkai/bug-reference-url ()
|
||||
"Return a GitLab issue or Merge Request URL.
|
||||
Intended as a value for `bug-referecne-url-format'."
|
||||
(format "https://%s/%s/%s/%s/%s"
|
||||
bug-reference-host
|
||||
bug-reference-group
|
||||
bug-reference-repository
|
||||
(if (string-suffix-p "!" (match-string-no-properties 1))
|
||||
gpolonkai/bug-reference-url-patch-string
|
||||
gpolonkai/bug-reference-url-bug-string)
|
||||
(match-string-no-properties 2)))
|
||||
|
||||
(use-package bug-reference
|
||||
:custom
|
||||
(bug-reference-bug-regexp (rx (group word-boundary
|
||||
(: (| (: (in ?B ?b) "ug" (? " ") (? ?#))
|
||||
(: (in ?P ?p) "atch" (? " ") ?#)
|
||||
(: "RFE" (? " ") ?#)
|
||||
(: "PR " (+ (any "a-z+-")) "/")
|
||||
(: "MR" (? " ") (? "!"))))
|
||||
(group (+ (any "0-9")) (opt (: ?# (+ (any "0-9"))))))))
|
||||
(bug-reference-url-format #'my-gitlab-url)
|
||||
:hook
|
||||
(text-mode . bug-reference-mode)
|
||||
(prog-mode . bug-reference-prog-mode))
|
||||
#+end_src
|
||||
|
||||
** ~highlight-indentation~ to highlight indentation levels
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package highlight-indentation
|
||||
:hook
|
||||
(python-mode . highlight-indentation-mode))
|
||||
#+end_src
|
||||
|
||||
** ~flycheck~
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flycheck
|
||||
:config
|
||||
(global-flycheck-mode)
|
||||
:custom
|
||||
(flycheck-python-pylint-executable "python3"))
|
||||
#+end_src
|
||||
|
||||
** ~flycheck-pkg-config~ to aid FlyCheck using ~pkg-config~
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flycheck-pkg-config)
|
||||
#+end_src
|
||||
|
||||
* Utilities
|
||||
|
||||
** ~kubernetes~, a kubernetes dashboard
|
||||
|
87
init.el
87
init.el
@ -1537,6 +1537,93 @@ order."
|
||||
(org-msg-greeting-fmt-mailto nil)
|
||||
(org-msg-signature "\n\nBest,\n\n,#+begin_signature\n-- *Gergely Polonkai* \\\\\n,#+end_signature"))
|
||||
|
||||
;; External packages to boost coding productivity
|
||||
|
||||
(use-package electric-operator
|
||||
:config
|
||||
;; Apply electric-operator-mode to vala-mode, too
|
||||
(apply #'electric-operator-add-rules-for-mode 'vala-mode
|
||||
(electric-operator-get-rules-for-mode 'prog-mode))
|
||||
:hook
|
||||
(c-mode-common . electric-operator-mode)
|
||||
(python-mode . electric-operator-mode))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:hook
|
||||
(prog-mode . rainbow-delimiters-mode))
|
||||
|
||||
(use-package rainbow-identifiers)
|
||||
|
||||
(use-package auto-highlight-symbol
|
||||
:config
|
||||
(global-auto-highlight-symbol-mode t))
|
||||
|
||||
(use-package glasses
|
||||
:delight " 👓"
|
||||
:hook
|
||||
(prog-mode . glasses-mode))
|
||||
|
||||
(use-package hl-todo
|
||||
:hook
|
||||
(prog-mode . hl-todo-mode))
|
||||
|
||||
(defvar gpolonkai/bug-reference-url-bug-string "issues"
|
||||
"String to insert in a `bug-reference-url-format' for bug references.")
|
||||
|
||||
(put 'gpolonkai/bug-reference-url-bug-string 'safe-local-variable 'stringp)
|
||||
|
||||
(defvar gpolonkai/bug-reference-url-patch-string "merge_requests"
|
||||
"String to insert in a `bug-reference-url-format' for patch references.")
|
||||
|
||||
(defvar-local bug-reference-host "gitlab.com"
|
||||
"The hostname to use in `bug-reference-url-format'.")
|
||||
|
||||
(defvar-local bug-reference-group "gamesystems"
|
||||
"The group name or username to use in `bug-reference-url-format'.")
|
||||
|
||||
(defvar-local bug-reference-repository "game-app"
|
||||
"The repository name to use in `bug-reference-url-format'.")
|
||||
|
||||
(put 'gpolonkai/bug-reference-url-patch-string 'safe-local-variable 'stringp)
|
||||
|
||||
(defun gpolonkai/bug-reference-url ()
|
||||
"Return a GitLab issue or Merge Request URL.
|
||||
Intended as a value for `bug-referecne-url-format'."
|
||||
(format "https://%s/%s/%s/%s/%s"
|
||||
bug-reference-host
|
||||
bug-reference-group
|
||||
bug-reference-repository
|
||||
(if (string-suffix-p "!" (match-string-no-properties 1))
|
||||
gpolonkai/bug-reference-url-patch-string
|
||||
gpolonkai/bug-reference-url-bug-string)
|
||||
(match-string-no-properties 2)))
|
||||
|
||||
(use-package bug-reference
|
||||
:custom
|
||||
(bug-reference-bug-regexp (rx (group word-boundary
|
||||
(: (| (: (in ?B ?b) "ug" (? " ") (? ?#))
|
||||
(: (in ?P ?p) "atch" (? " ") ?#)
|
||||
(: "RFE" (? " ") ?#)
|
||||
(: "PR " (+ (any "a-z+-")) "/")
|
||||
(: "MR" (? " ") (? "!"))))
|
||||
(group (+ (any "0-9")) (opt (: ?# (+ (any "0-9"))))))))
|
||||
(bug-reference-url-format #'my-gitlab-url)
|
||||
:hook
|
||||
(text-mode . bug-reference-mode)
|
||||
(prog-mode . bug-reference-prog-mode))
|
||||
|
||||
(use-package highlight-indentation
|
||||
:hook
|
||||
(python-mode . highlight-indentation-mode))
|
||||
|
||||
(use-package flycheck
|
||||
:config
|
||||
(global-flycheck-mode)
|
||||
:custom
|
||||
(flycheck-python-pylint-executable "python3"))
|
||||
|
||||
(use-package flycheck-pkg-config)
|
||||
|
||||
;; I started moving my configuration to this Org file. It’s easier to document this way.
|
||||
(org-babel-load-file (expand-file-name "configuration.org" user-emacs-directory))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user