I showed you my source code, pls respond
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.

109 lines
3.0 KiB

4 years ago
  1. #+TITLE: Projects
  2. #+AUTHOR: Christopher James Hayward
  3. #+EMAIL: chris@chrishayward.xyz
  4. #+PROPERTY: header-args:emacs-lisp :tangle projects.el :comments org
  5. #+PROPERTY: header-args:shell :tangle no
  6. #+PROPERTY: header-args :results silent :eval no-export :comments org
  7. #+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  8. #+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  9. #+ATTR_ORG: :width 420px
  10. #+ATTR_HTML: :width 420px
  11. #+ATTR_LATEX: :width 420px
  12. [[../docs/images/2021-02-13-example-ccls.gif]]
  13. An *IDE*[fn:1] like experience or better can be achieved within Emacs using two *Microsoft*[fn:2] open-source initiatives:
  14. + *Debug Adapter Protocol*[fn:3]
  15. + *Language Server Protocol*[fn:4]
  16. * Language servers
  17. Support for the *Language Server Protocol*[fn:4] is added to Emacs through the *Lsp mode*[fn:5] package.
  18. #+begin_src emacs-lisp
  19. (use-package lsp-mode
  20. :commands (lsp lsp-deferred)
  21. :custom (lsp-idle-delay (* 5 dotfiles/idle)))
  22. #+end_src
  23. ** UI integration
  24. *Lsp ui*[fn:6] provides user interface improvements for *Lsp mode*[fn:5].
  25. #+begin_src emacs-lisp
  26. (use-package lsp-ui
  27. :after lsp
  28. :custom (lsp-ui-doc-position 'at-point)
  29. (lsp-ui-doc-delay 0.500))
  30. #+end_src
  31. ** Code completion
  32. Text completion via *Company*[fn:10] =AKA= *Complete Anything*.
  33. #+begin_src emacs-lisp
  34. (use-package company
  35. :after lsp)
  36. #+end_src
  37. Integrate with *Lsp mode*[fn:5] to provide completion candidates through the *Language Server Protocol*[fn:4].
  38. #+begin_src emacs-lisp
  39. (use-package company-lsp
  40. :after (lsp company)
  41. :custom (company-backend 'company-lsp))
  42. #+end_src
  43. * Debug adapters
  44. *Dap mode*[fn:7] provides support for the *Debug Adapter Protocol*[fn:3] inside of Emacs.
  45. #+begin_src emacs-lisp
  46. (use-package dap-mode
  47. :commands (dap-debug))
  48. #+end_src
  49. * Docker containers
  50. Manage *Docker*[fn:8] containers with *Docker.el*[fn:9].
  51. #+begin_src emacs-lisp
  52. (use-package docker
  53. :commands (docker))
  54. #+end_src
  55. Open the container management screen with =SPC k=.
  56. #+begin_src emacs-lisp
  57. (dotfiles/leader
  58. "k" '(docker :which-key "Docker"))
  59. #+end_src
  60. * Project management
  61. 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.
  62. #+begin_src emacs-lisp
  63. (use-package projectile
  64. :custom (projectile-project-search-path '("~/.local/source"))
  65. :config (projectile-mode))
  66. #+end_src
  67. * Resources
  68. [fn:1] https://en.wikipedia.org/wiki/Integrated_development_environment
  69. [fn:2] https://en.wikipedia.org/wiki/Microsoft_and_open_source
  70. [fn:3] https://microsoft.github.io/debug-adapter-protocol
  71. [fn:4] https://microsoft.github.io/language-server-protocol
  72. [fn:5] https://emacs-lsp.github.io/lsp-mode/
  73. [fn:6] https://emacs-lsp.github.io/lsp-ui/
  74. [fn:7] https://emacs-lsp.github.io/dap-mode/
  75. [fn:8] https://docker.com
  76. [fn:9] https://github.com/Silex/docker.el
  77. [fn:10] https://company-mode.github.io/
  78. [fn:11] https://projectile.mx
  79. [fn:12] https://passwordstore.org
  80. [fn:13] https://git.zx2c4.com/password-store/tree/contrib/emacs