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.

128 lines
3.2 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
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. * Debug adapters
  17. *Dap mode*[fn:5] provides support for the *Debug Adapter Protocol*[fn:3] inside of Emacs.
  18. #+begin_src emacs-lisp
  19. (use-package dap-mode
  20. :commands (dap-debug))
  21. #+end_src
  22. * Language servers
  23. Support for the *Language Server Protocol*[fn:4] is added to Emacs through the *Lsp mode*[fn:6] package.
  24. #+begin_src emacs-lisp
  25. (use-package lsp-mode
  26. :commands (lsp lsp-deferred)
  27. :custom (lsp-idle-delay (* 5 dotfiles/idle)))
  28. #+end_src
  29. ** UI integration
  30. *Lsp ui*[fn:7] provides user interface improvements for *Lsp mode*[fn:6].
  31. #+begin_src emacs-lisp
  32. (use-package lsp-ui
  33. :after lsp
  34. :custom (lsp-ui-doc-position 'at-point)
  35. (lsp-ui-doc-delay 0.500))
  36. #+end_src
  37. ** Code completion
  38. Text completion via *Company*[fn:8] =AKA= *Complete Anything*.
  39. #+begin_src emacs-lisp
  40. (use-package company
  41. :after lsp)
  42. #+end_src
  43. Integrate with *Lsp mode*[fn:6] to provide completion candidates through the *Language Server Protocol*[fn:4].
  44. + Specify the repository
  45. + Use asynchronous completion
  46. #+begin_src emacs-lisp
  47. (use-package company-lsp
  48. :after (lsp company)
  49. :custom (company-lsp-async t)
  50. (company-backend 'company-lsp)
  51. :straight (company-lsp :type git
  52. :host github
  53. :repo "tigersoldier/company-lsp"))
  54. #+end_src
  55. * Docker containers
  56. Manage *Docker*[fn:9] containers with *Docker.el*[fn:10].
  57. #+begin_src emacs-lisp
  58. (use-package docker
  59. :commands (docker))
  60. #+end_src
  61. Open the container management screen with =SPC k=.
  62. #+begin_src emacs-lisp
  63. (dotfiles/leader
  64. "k" '(docker :which-key "Docker"))
  65. #+end_src
  66. * Project management
  67. 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.
  68. #+begin_src emacs-lisp
  69. (use-package projectile
  70. :custom (projectile-project-search-path '("~/.local/source"))
  71. :config (projectile-mode))
  72. #+end_src
  73. * Footnotes
  74. [fn:1] https://en.wikipedia.org/wiki/Integrated_development_environment
  75. [fn:2] https://en.wikipedia.org/wiki/Microsoft_and_open_source
  76. [fn:3] https://microsoft.github.io/debug-adapter-protocol
  77. [fn:4] https://microsoft.github.io/language-server-protocol
  78. [fn:5] https://emacs-lsp.github.io/dap-mode/
  79. [fn:6] https://emacs-lsp.github.io/lsp-mode/
  80. [fn:7] https://emacs-lsp.github.io/lsp-ui/
  81. [fn:8] https://company-mode.github.io/
  82. [fn:9] https://docker.com
  83. [fn:10] https://github.com/Silex/docker.el
  84. [fn:11] https://projectile.mx
  85. [fn:12] https://git.zx2c4.com/password-store/tree/contrib/emacs
  86. [fn:13] https://passwordstore.org