From a62c529605ae8ec8929ec9caefd488c24edd01a0 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Mon, 3 May 2021 00:45:03 +0100 Subject: [PATCH] Add flycheck cube --- core/cubes/autocompletion.el | 11 +++++++++++ core/cubes/editor.el | 1 + core/fpkg.el | 6 ++---- dev.org | 5 +++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/core/cubes/autocompletion.el b/core/cubes/autocompletion.el index f9164c5..1b7be73 100644 --- a/core/cubes/autocompletion.el +++ b/core/cubes/autocompletion.el @@ -24,6 +24,17 @@ (require 'fpkg) (require 'fg42/cube) +(defcube fg42/flycheck-cube + (:docs "cubes/fg42/flycheck-cube.org") + (fpkg/use flycheck + :defer () + :init + (global-flycheck-mode))) + +(defcube fg42/yaml-cube + (:docs "cubes/fg42/prog-cubes.org") + (fpkg/use yaml-mode)) + (defcube fg42/lsp-cube (:docs "cubes/fg42/lsp-cube.org") diff --git a/core/cubes/editor.el b/core/cubes/editor.el index 9f3f426..7e234c8 100644 --- a/core/cubes/editor.el +++ b/core/cubes/editor.el @@ -75,6 +75,7 @@ :defer t :init (progn + (setq prescient-filter-method '(literal fuzzy regexp initialism)) (selectrum-prescient-mode +1) (prescient-persist-mode +1))) diff --git a/core/fpkg.el b/core/fpkg.el index 0ab1cff..5d28303 100644 --- a/core/fpkg.el +++ b/core/fpkg.el @@ -24,8 +24,6 @@ ;; Simple package manager for FG42 ;; ;;; Code: - - ;;(require 'use-package) @@ -35,6 +33,7 @@ args (append args '(:straight t)))) + (defun inject-defer (args) "Inject `:defer t' to ARGS it the key was missing." (if (member :defer args) @@ -43,13 +42,12 @@ (defmacro fpkg/use (pkg &rest details) - "Install the given package details PKG via use-package and straight." + "Install the given package DETAILS PKG via use-package and straight." (declare (indent defun)) (if (and (listp details) (< 0 (length details))) (let ((params (inject-straight (inject-defer details)))) (progn - (message ">>> %s %s" pkg details) `(use-package ,pkg ,@params))) `(use-package ,pkg :straight t :defer t))) diff --git a/dev.org b/dev.org index 6ab4f1d..8e8c5e9 100644 --- a/dev.org +++ b/dev.org @@ -41,6 +41,11 @@ On the first level, I should feel comfortable with it. ** TODO Create a macro similar to =with-ability= to run a block of code only if the given cube was active ** TODO Enable =straight= and =use-package= integration on compile time. Checout out =fpkg/core.el= ** TODO Check the =dracula= theme settings and configurations +** TODO Add support for MacOS by create a cube with the following content +#+BEGIN_SRC elisp +(package-install 'exec-path-from-shell) +(exec-path-from-shell-initialize) +#+END_SRC * Things that didn't work out - rbenv - helm