feat(emacs): add c and c++ language integration
This commit is contained in:
parent
05902b7461
commit
e8bbbae10a
4 changed files with 34 additions and 0 deletions
|
|
@ -55,6 +55,7 @@
|
||||||
(load-file (expand-file-name "src/lang/cue.el" user-emacs-directory))
|
(load-file (expand-file-name "src/lang/cue.el" user-emacs-directory))
|
||||||
(load-file (expand-file-name "src/lang/docker.el" user-emacs-directory))
|
(load-file (expand-file-name "src/lang/docker.el" user-emacs-directory))
|
||||||
(load-file (expand-file-name "src/lang/shell.el" user-emacs-directory))
|
(load-file (expand-file-name "src/lang/shell.el" user-emacs-directory))
|
||||||
|
(load-file (expand-file-name "src/lang/c.el" user-emacs-directory))
|
||||||
|
|
||||||
(use-package general
|
(use-package general
|
||||||
:config
|
:config
|
||||||
|
|
|
||||||
11
site-modules/core/files/emacs/snippets/c++-mode/once
Normal file
11
site-modules/core/files/emacs/snippets/c++-mode/once
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: #ifndef XXX; #define XXX; #endif
|
||||||
|
# key: once
|
||||||
|
# uuid: once
|
||||||
|
# --
|
||||||
|
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H}
|
||||||
|
#define $1
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
#endif /* $1 */
|
||||||
11
site-modules/core/files/emacs/snippets/c-mode/once
Normal file
11
site-modules/core/files/emacs/snippets/c-mode/once
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: #ifndef XXX; #define XXX; #endif
|
||||||
|
# key: once
|
||||||
|
# uuid: once
|
||||||
|
# --
|
||||||
|
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H}
|
||||||
|
#define $1
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
#endif /* $1 */
|
||||||
11
site-modules/core/files/emacs/src/lang/c.el
Normal file
11
site-modules/core/files/emacs/src/lang/c.el
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
;;; c.el --- AMACS -*- lexical-binding: t; -*-
|
||||||
|
;;
|
||||||
|
;; Copyright 2021 Practically.io All rights reserved
|
||||||
|
;;
|
||||||
|
;; Use of this source is governed by a BSD-style
|
||||||
|
;; licence that can be found in the LICENCE file or at
|
||||||
|
;; https://www.practically.io/copyright/
|
||||||
|
|
||||||
|
(add-hook 'c-mode-hook 'lsp)
|
||||||
|
(add-hook 'c++-mode-hook 'lsp)
|
||||||
|
(use-package cmake-mode)
|
||||||
Loading…
Reference in a new issue