From b592d0fcf5de4b0eb34aadc01959a9de176bea91 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Sat, 6 Mar 2021 00:35:53 -0500 Subject: [PATCH] Separate project module step 1 --- README.org | 75 ------------------------------- modules/projects.org | 102 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 75 deletions(-) create mode 100644 modules/projects.org diff --git a/README.org b/README.org index cc5566c..c0b8245 100644 --- a/README.org +++ b/README.org @@ -131,81 +131,6 @@ Here's a complete list of all of the options configurable for each host, and the (org-babel-load-file mod-file)))) #+end_src -* Projects - :PROPERTIES: - :header-args: :tangle modules/projects.el - :END: - -An IDE like experience (or better) can be achieved in Emacs using two *Microsoft* open source initiatives. - -+ [[https://microsoft.github.io/language-server-protocol/][Language Server Protocol]] -+ [[https://microsoft.github.io/debug-adapter-protocol/][Debug Adapter Protocol]] - -Add support for language servers with [[https://emacs-lsp.github.io/lsp-mode/][lsp-mode]]. - -#+begin_src emacs-lisp -(use-package lsp-mode - :commands (lsp lsp-deferred) - :custom (lsp-idle-delay (* 5 dotfiles/idle))) -#+end_src - -[[https://emacs-lsp.github.io/lsp-ui/][lsp-ui]] provides UI improvements for =lsp-mode=. - -#+begin_src emacs-lisp -(use-package lsp-ui - :after lsp - :custom (lsp-ui-doc-position 'at-point) - (lsp-ui-doc-delay 0.500)) -#+end_src - -[[https://emacs-lsp.github.io/dap-mode/][Dap-mode]] adds support for the debug adapter protocol to Emacs. - -#+begin_src emacs-lisp -(use-package dap-mode - :commands (dap-debug)) -#+end_src - -** Containers - -Use ~docker~ for running containers. Download and install https://github.com/Silex/docker.el, allowing us to manage containers within Emacs. - -#+begin_src emacs-lisp -(use-package docker - :commands (docker)) -#+end_src - -Open the management screen with =SPC k=. - -#+begin_src emacs-lisp -(dotfiles/leader - "k" '(docker :which-key "Docker")) -#+end_src - -** Management - -Configure [[https://projectile.mx][projectile]], a project interaction library for Emacs. It provides a nice set of features for operating on a project level without introducing external dependencies. - -#+begin_src emacs-lisp -(use-package projectile - :custom (projectile-project-search-path '("~/.local/source")) - :config (projectile-mode)) -#+end_src - -** Completion - -Text completion framework via =company= aka *Complete Anything*. - -http://company-mode.github.io/ -+ Integrate with =lsp-mode= - -#+begin_src emacs-lisp -(use-package company - :after lsp) - -(use-package company-lsp - :after (lsp company) - :custom (company-backend 'company-lsp)) -#+end_src ** Passwords diff --git a/modules/projects.org b/modules/projects.org new file mode 100644 index 0000000..eef00de --- /dev/null +++ b/modules/projects.org @@ -0,0 +1,102 @@ +#+TITLE: Projects +#+AUTHOR: Christopher James Hayward +#+EMAIL: chris@chrishayward.xyz + +#+PROPERTY: header-args:emacs-lisp :tangle projects.el :comments org +#+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 + +An *IDE*[fn:1] like experience or better can be achieved within Emacs using two *Microsoft*[fn:2] open-source initiatives: + ++ *Debug Adapter Protocol*[fn:3] ++ *Language Server Protocol*[fn:4] + +* LSP + +Support for the *Language Server Protocol*[fn:4] is added to Emacs through the *Lsp mode*[fn:5] package. + +#+begin_src emacs-lisp +(use-package lsp-mode + :commands (lsp lsp-deferred) + :custom (lsp-idle-delay (* 5 dotfiles/idle))) +#+end_src + +** UI improvements + +*Lsp ui*[fn:6] provides user interface improvements for *Lsp mode*[fn:5]. + +#+begin_src emacs-lisp +(use-package lsp-ui + :after lsp + :custom (lsp-ui-doc-position 'at-point) + (lsp-ui-doc-delay 0.500)) +#+end_src + +** Code completion + +Text completion via *Company*[fn:10] =AKA= *Complete Anything*. + +#+begin_src emacs-lisp +(use-package company + :after lsp) +#+end_src + +Integrate with *Lsp mode*[fn:5] to provide completion candidates through the *Language Server Protocol*[fn:4]. + +#+begin_src emacs-lisp +(use-package company-lsp + :after (lsp company) + :custom (company-backend 'company-lsp)) +#+end_src + + +* DAP + +*Dap mode*[fn:7] provides support for the *Debug Adapter Protocol*[fn:3] inside of Emacs. + +#+begin_src emacs-lisp +(use-package dap-mode + :commands (dap-debug)) +#+end_src + +* Docker + +Manage *Docker*[fn:8] containers with *Docker.el*[fn:9]. + +#+begin_src emacs-lisp +(use-package docker + :commands (docker)) +#+end_src + +Open the container management screen with =SPC k=. + +#+begin_src emacs-lisp +(dotfiles/leader + "k" '(docker :which-key "Docker")) +#+end_src + +* Management + +Configure *Projectile*[fn:11], a project interaction library for Emacs. It provides a nice set of features for operating on a project level without introducing external dependencies. + +#+begin_src emacs-lisp +(use-package projectile + :custom (projectile-project-search-path '("~/.local/source")) + :config (projectile-mode)) +#+end_src + +* Resources + +[fn:1] https://en.wikipedia.org/wiki/Integrated_development_environment +[fn:2] https://en.wikipedia.org/wiki/Microsoft_and_open_source +[fn:3] https://microsoft.github.io/debug-adapter-protocol +[fn:4] https://microsoft.github.io/language-server-protocol +[fn:5] https://emacs-lsp.github.io/lsp-mode/ +[fn:6] https://emacs-lsp.github.io/lsp-ui/ +[fn:7] https://emacs-lsp.github.io/dap-mode/ +[fn:8] https://docker.com +[fn:9] https://github.com/Silex/docker.el +[fn:10] https://company-mode.github.io/ +[fn:11] https://projectile.mx