Browse Source

Fix structure templates C/C++

main
parent
commit
c621e115da
  1. 14
      README.org
  2. 5
      modules/projects.el

14
README.org

@ -1281,10 +1281,13 @@ Instead of the popular =restclient= package, I use [[https://github.com/zweifisc
#+ATTR_LATEX: :width 420px
[[./docs/images/2021-02-13-example-ccls.gif]]
Install the [[https://github.com/MaskRay/ccls][ccls]] language server, and create a new structure templates for C/C++:
Add support for C/C++ languages.
+ ~<cc~ for C
+ ~<cpp~ for C++
+ Configure the [[https://github.com/MaskRay/ccls][ccls]] language server
+ Load babel language modules for C/C++
+ Create a new structure templates for C/C++
- ~<cc~ for C
- ~<cpp~ for C++
#+begin_src emacs-lisp
(use-package ccls
@ -1292,8 +1295,9 @@ Install the [[https://github.com/MaskRay/ccls][ccls]] language server, and creat
(lambda ()
(require 'ccls)
(lsp-deferred)))
:config (add-to-list 'org-structure-template-alist '("cc" . "src cc"))
(add-to-list 'org-structure-template-alist '("cpp" . "src cpp")))
: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
**** Python

5
modules/projects.el

@ -63,8 +63,9 @@
(lambda ()
(require 'ccls)
(lsp-deferred)))
:config (add-to-list 'org-structure-template-alist '("cc" . "src cc"))
(add-to-list 'org-structure-template-alist '("cpp" . "src cpp")))
: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))))
(use-package python-mode
:hook (python-mode . lsp-deferred)

Loading…
Cancel
Save