Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.6 KiB

  1. ;;; prelude-literate-programming.el --- Emacs Prelude: Literate Programming Support
  2. ;;
  3. ;; Author: Koustubh Sinkar
  4. ;; Version: 1.0.0
  5. ;; Keywords: literate programming
  6. ;; This file is not part of GNU Emacs.
  7. ;;; Commentary:
  8. ;; Prelude configuration for literate programming
  9. ;;; License:
  10. ;; This program is free software; you can redistribute it and/or
  11. ;; modify it under the terms of the GNU General Public License
  12. ;; as published by the Free Software Foundation; either version 3
  13. ;; of the License, or (at your option) any later version.
  14. ;;
  15. ;; This program is distributed in the hope that it will be useful,
  16. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ;; GNU General Public License for more details.
  19. ;;
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  22. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  23. ;; Boston, MA 02110-1301, USA.
  24. ;;; Code:
  25. (defvar prelude-ipynb-packages
  26. '(code-cells ; file mode for code-cells
  27. ein ; Emacs Ipython Notebook (Jupyter Client)
  28. elpy ; emacs python development environment
  29. ))
  30. (defvar prelude-ob-packages
  31. '(ob-async ; asynchronous execution of code-blocks
  32. ob-ipython ; for python and ipython
  33. ob-tmux ; for shell
  34. ob-deno ; for javascript
  35. ob-typescript
  36. ))
  37. (prelude-require-packages
  38. (append prelude-ipynb-packages prelude-ob-packages))
  39. (setq prelude-ob-loader-list
  40. '((python . t)
  41. (ipython . t)
  42. (shell . t)
  43. (js . t)
  44. (typescript . t)
  45. ;; Include other languages here...
  46. ))
  47. ;; Run/highlight code using babel in org-mode
  48. (org-babel-do-load-languages
  49. 'org-babel-load-languages prelude-ob-loader-list)
  50. ;; Syntax highlight in #+BEGIN_SRC blocks
  51. (setq org-src-fontify-natively t)
  52. ;; Don't prompt before running code in org
  53. (setq org-confirm-babel-evaluate nil)
  54. ;; Fix an incompatibility between the ob-async and ob-ipython packages
  55. (setq ob-async-no-async-languages-alist '("ipython"))
  56. (defvar org-babel-language-list
  57. '(ob-cfengine3
  58. ob-clojurescript
  59. ob-coffee
  60. ob-dao
  61. ob-diagrams
  62. ob-elixir
  63. ob-elm
  64. ob-go
  65. ob-graphql
  66. ob-http
  67. ob-ipython
  68. ob-julia-vterm
  69. ob-kotlin
  70. ob-mongo
  71. ob-prolog
  72. ob-restclient
  73. ob-rust
  74. ob-sml
  75. ob-sql-mode
  76. ob-translate
  77. ob-typescript
  78. ob-uart
  79. ))
  80. ;;; TODO Write a function to enable org-babel for each function
  81. (provide 'prelude-literate-programming)
  82. ;;; prelude-literate-programming.el ends here