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.
 
 
 

1.6 KiB

C/C++

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++1

Setup

Make sure all of the required components are installed, and the lsp and dap modules have loaded before loading this module.

RUN apt install -y gcc gdb ccls libstdc++

Config

Use the ccls2 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.

(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))))

Footnotes