diff --git a/docs/archive.org.gpg b/docs/archive.org.gpg index aec2859..2de6ec9 100644 Binary files a/docs/archive.org.gpg and b/docs/archive.org.gpg differ diff --git a/elisp/options.el b/elisp/options.el index cba0501..400c8d3 100644 --- a/elisp/options.el +++ b/elisp/options.el @@ -4,8 +4,8 @@ gpg pass x11 exwm roam agenda spelling grammar reveal hugo capture projects docker lsp dap - development go python - fonts ivy themes modeline dashboard) + cc go uml conf python fonts ivy + themes modeline dashboard) "All of the available modules.") (defvar dotfiles/modules dotfiles/modules-p diff --git a/modules/cc.org b/modules/cc.org new file mode 100644 index 0000000..ab133f8 --- /dev/null +++ b/modules/cc.org @@ -0,0 +1,45 @@ +#+TITLE: C/C++ +#+AUTHOR: Christopher James Hayward +#+EMAIL: chris@chrishayward.xyz + +#+PROPERTY: header-args:emacs-lisp :tangle cc.el :comments org +#+PROPERTY: header-args:shell :tangle no +#+PROPERTY: header-args :results silent :eval no-export :comments org + +#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil +#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil + +#+begin_quote +The goal of C++ is productivity, this comes in many ways, but the language is designed to aid you as much as possible whiole hindering you as little as possible with arbitrary rules or requirements. + +-- Bruce Eckel, Thinking in C++[fn:1] +#+end_quote + +* Setup + +Make sure all of the required components are installed, and the ~lsp~ and ~dap~ modules have loaded before loading this module. + +#+begin_src shell +RUN apt install -y gcc gdb ccls libstdc++ +#+end_src + +* Config + +Use the ~ccls~[fn:2] language server, and the respective Emacs package to interact with the server inside of Emacs. Load the ~babel~ language module and add structure templates for creating C/C++ code blocks inside ~org-mode~. + +#+begin_src emacs-lisp +(use-package ccls + :hook ((c-mode c++-mode objc-mode cuda-mode) . + (lambda () + (require 'ccls) + (lsp-deferred))) + :config (add-to-list 'org-structure-template-alist '("cc" . "src C")) + (add-to-list 'org-structure-template-alist '("cpp" . "src C++")) + (org-babel-do-load-languages 'org-babel-load-languages '((C . t)))) +#+end_src + +* Footnotes + +[fn:1] https://chrishayward.xyz/notes/thinking-in-cpp/ + +[fn:2] https://github.com/MaskRay/ccls diff --git a/modules/conf.org b/modules/conf.org new file mode 100644 index 0000000..038d809 --- /dev/null +++ b/modules/conf.org @@ -0,0 +1,43 @@ +#+TITLE: Conf +#+AUTHOR: Christopher James Hayward +#+EMAIL: chris@chrishayward.xyz + +#+PROPERTY: header-args:emacs-lisp :tangle conf.el :comments org +#+PROPERTY: header-args:shell :tangle no +#+PROPERTY: header-args :results silent :eval no-export :comments org + +#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil +#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil + +Support for different configuration languages. + +* Config + +Add support for different configuration languages, or other modules that don't fit in their own module (yet). + +** HTTP + +Interact with ~HTTP~ endpoints using the ~ob-http~[fn:1] package. You can see how it works in my post here[fn:2]. It adds interactive ~HTTP~ blocks that can output their results in place, within an ~org-mode~ buffer. + +#+begin_src emacs-lisp +(use-package ob-http + :after org + :config (org-babel-do-load-languages + 'org-babel-load-languages '((http . t)))) +#+end_src + +** YAML + +Support for YAML[fn:3] files. + +#+begin_src emacs-lisp +(use-package yaml-mode) +#+end_src + +* Footnotes + +[fn:1] https://github.com/zweifisch/ob-http + +[fn:2] https://chrishayward.xyz/posts/kanye-as-a-service/ + +[fn:3] https://emacswiki.org/emacs/YamlMode diff --git a/modules/development.org b/modules/development.org deleted file mode 100644 index 7f5622b..0000000 --- a/modules/development.org +++ /dev/null @@ -1,102 +0,0 @@ -#+TITLE: Development -#+AUTHOR: Christopher James Hayward -#+EMAIL: chris@chrishayward.xyz - -#+PROPERTY: header-args:emacs-lisp :tangle development.el :comments org -#+PROPERTY: header-args:shell :tangle no -#+PROPERTY: header-args :results silent :eval no-export :comments org - -#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil -#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil - -Support for individual programming languages, has a hard dependency on the [[file:projects.org][Projects]] module for integration with *LSP*[fn:1] / *DAP*[fn:2] - -* HTTP - -Interactive with *HTTP* endpoints using the *ob-http*[fn:6] package. You can see how it works in my post [[file:../docs/posts/kanye-as-a-service.org.gpg][Kanye as a Service]]. Essentialy it adds interactive *HTTP* blocks that can output their results in place. - -#+begin_src emacs-lisp -(use-package ob-http - :after org - :config (org-babel-do-load-languages - 'org-babel-load-languages '((http . t)))) -#+end_src - -* YAML - -Support for YAML files. - -#+begin_src emacs-lisp -(use-package yaml-mode) -#+end_src - -* C/C++ - -Add support for the *C/C++* family of languages via the *CCLS*[fn:7] language server. - -+ Install requirements -+ Integrate with *LSP*[fn:2] -+ Integrate with *DAP*[fn:1] -+ Load babel language modules -+ Create new structure templates - * ~