From 695d45284598eabe8f6b0b53c0781471a4977559 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Mon, 27 Jun 2022 23:40:48 +0100 Subject: [PATCH] Move cpp cubes into theirown module --- core/cubes/autocompletion.el | 25 ----------------- core/cubes/cpp.el | 53 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 25 deletions(-) create mode 100644 core/cubes/cpp.el diff --git a/core/cubes/autocompletion.el b/core/cubes/autocompletion.el index c9421b1..dc9d4b2 100644 --- a/core/cubes/autocompletion.el +++ b/core/cubes/autocompletion.el @@ -62,31 +62,6 @@ (add-hook 'lsp-mode-hook 'lsp-ui-mode))) -(defcube fg42/cmake-cube - "Cmake cube" - (:title "CMake cube" - :flag-default t - :flag cmake) - - (fpkg/use cmake-mode) - (fpkg/use eldoc-cmake)) - - -(defcube fg42/c++-cube - "C++ cube" - (:title "C++ cube" - :no-flag t) - (fg42/cmake-cube) - (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode)) - (add-hook 'c++-mode-hook (lambda () - (lsp) - (require 'company-capf) - (require 'company-box) - (setq company-backends - '((company-capf - company-keywords)))))) - - (defcube fg42/company-cube "Auto complete using company mode" (:title "Company cube" diff --git a/core/cubes/cpp.el b/core/cubes/cpp.el new file mode 100644 index 0000000..69a6e8d --- /dev/null +++ b/core/cubes/cpp.el @@ -0,0 +1,53 @@ +;;; CPPCubes --- The C/C++ cubes for FG42 -*- lexical-binding: t; -*- +;; +;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors +;; +;; Author: Sameer Rahmani +;; URL: https://gitlab.com/FG42/FG42 +;; Version: 3.0.0 +;; +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . +;; +;;; Commentary: +;;; Code: +(require 'fpkg) +(require 'fg42/cube) +(require 'fg42/utils) + +(defcube fg42/cmake-cube + "This cube enable CMake integration with FG42" + (:title "CMake cube" + :flag-default t + :flag cmake) + + (fpkg/use cmake-mode) + (fpkg/use eldoc-cmake)) + + +(defcube fg42/c++-cube + "C++ cube" + (:title "C++ cube" + :no-flag t) + (fg42/cmake-cube) + (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode)) + (add-hook 'c++-mode-hook (lambda () + (lsp) + (require 'company-capf) + (require 'company-box) + (setq company-backends + '((company-capf + company-keywords)))))) + +(provide 'cubes/cpp) +;;; cpp.el ends here