Try to add emojify as an optional feature
This commit is contained in:
parent
906fe2fb8d
commit
7368622086
|
@ -21,29 +21,37 @@
|
||||||
# A list of default FG42 modules to build FG42 with.
|
# A list of default FG42 modules to build FG42 with.
|
||||||
{ lib, config, pkgs, makeFG42Drv, ... }:
|
{ lib, config, pkgs, makeFG42Drv, ... }:
|
||||||
let
|
let
|
||||||
deps = (with pkgs.emacsPackages; [
|
deps =
|
||||||
origami
|
(with pkgs.emacsPackages; [
|
||||||
which-key
|
origami
|
||||||
projectile
|
which-key
|
||||||
projectile-ripgrep
|
projectile
|
||||||
pkg-info
|
projectile-ripgrep
|
||||||
expand-region
|
pkg-info
|
||||||
helpful
|
expand-region
|
||||||
envrc
|
helpful
|
||||||
pinentry
|
envrc
|
||||||
discover
|
pinentry
|
||||||
exec-path-from-shell
|
discover
|
||||||
avy
|
exec-path-from-shell
|
||||||
ace-window
|
avy
|
||||||
yasnippet
|
ace-window
|
||||||
yasnippet-snippets
|
yasnippet
|
||||||
flycheck
|
yasnippet-snippets
|
||||||
vertico
|
flycheck
|
||||||
orderless
|
vertico
|
||||||
ctrlf
|
orderless
|
||||||
marginalia
|
ctrlf
|
||||||
base16-theme
|
marginalia
|
||||||
]);
|
magit
|
||||||
|
forge
|
||||||
|
diff-hl
|
||||||
|
svg-tag-mode
|
||||||
|
all-the-icons
|
||||||
|
|
||||||
|
base16-theme
|
||||||
|
] ++ lib.optional (config.fg42.emojify) [ emojify ]);
|
||||||
|
|
||||||
drv = makeFG42Drv {
|
drv = makeFG42Drv {
|
||||||
pname = "editor";
|
pname = "editor";
|
||||||
version = config.fg42.version;
|
version = config.fg42.version;
|
||||||
|
@ -54,21 +62,32 @@ let
|
||||||
dicts = pkgs.aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]);
|
dicts = pkgs.aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
fg42.elispPackages = [ drv ] ++ deps;
|
|
||||||
|
|
||||||
fg42.fonts = (with pkgs;[
|
options = (with lib; {
|
||||||
vazir-fonts
|
fg42.emojify = mkOption {
|
||||||
fira-code
|
type = types.bool;
|
||||||
fira-mono
|
default = true;
|
||||||
noto-fonts
|
description = "Whether or not to use the `emojify' package.";
|
||||||
]);
|
};
|
||||||
|
});
|
||||||
|
|
||||||
fg42.paths = (with pkgs;[
|
config = {
|
||||||
ripgrep
|
fg42.elispPackages = [ drv ] ++ deps;
|
||||||
dicts
|
|
||||||
]);
|
|
||||||
|
|
||||||
fg42.font = lib.mkDefault '''("Fira Mono" 11)'';
|
fg42.fonts = (with pkgs;[
|
||||||
fg42.theme = lib.mkDefault "base16-eighties";
|
vazir-fonts
|
||||||
fg42.theme-package-name = lib.mkDefault "base16-theme";
|
fira-code
|
||||||
|
fira-mono
|
||||||
|
noto-fonts
|
||||||
|
]);
|
||||||
|
|
||||||
|
fg42.paths = (with pkgs;[
|
||||||
|
ripgrep
|
||||||
|
dicts
|
||||||
|
]);
|
||||||
|
|
||||||
|
fg42.font = lib.mkDefault '''("Fira Mono" 11)'';
|
||||||
|
fg42.theme = lib.mkDefault "base16-eighties";
|
||||||
|
fg42.theme-package-name = lib.mkDefault "base16-theme";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,5 +36,13 @@
|
||||||
`,sym
|
`,sym
|
||||||
`,default)))
|
`,default)))
|
||||||
|
|
||||||
|
|
||||||
|
(defmacro with-config (name &rest body)
|
||||||
|
"Run the BODY only if the config NAME is set to t."
|
||||||
|
(declare (indent defun))
|
||||||
|
`(when (fg42/config-get-or ,name)
|
||||||
|
,@body))
|
||||||
|
|
||||||
|
|
||||||
(provide 'fg42/config)
|
(provide 'fg42/config)
|
||||||
;;; config.el ends here
|
;;; config.el ends here
|
||||||
|
|
|
@ -37,11 +37,11 @@
|
||||||
;; (require 'fg42/langs/elisp)
|
;; (require 'fg42/langs/elisp)
|
||||||
;; (require 'fg42/langs/nix)
|
;; (require 'fg42/langs/nix)
|
||||||
|
|
||||||
;; (require 'fg42/git)
|
(require 'fg42/git)
|
||||||
;; (require 'fg42/wm)
|
;; (require 'fg42/wm)
|
||||||
;; (require 'fg42/org)
|
(require 'fg42/org)
|
||||||
(require 'fg42/minibuffer)
|
(require 'fg42/minibuffer)
|
||||||
;; (require 'fg42/graphics)
|
(require 'fg42/graphics)
|
||||||
;; (require 'fg42/modeline)
|
;; (require 'fg42/modeline)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,11 @@
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'fpkg))
|
(require 'fpkg)
|
||||||
|
(require 'fg42/config))
|
||||||
|
|
||||||
(use! emojify
|
|
||||||
|
(use-with-config! emojify
|
||||||
"Adds support for emojis to `FG42'"
|
"Adds support for emojis to `FG42'"
|
||||||
:if (display-graphic-p)
|
:if (display-graphic-p)
|
||||||
:hook (emacs-startup . global-emojify-mode))
|
:hook (emacs-startup . global-emojify-mode))
|
||||||
|
@ -34,11 +36,6 @@
|
||||||
Emacs."
|
Emacs."
|
||||||
:if (display-graphic-p))
|
:if (display-graphic-p))
|
||||||
|
|
||||||
(use! nerd-icons
|
|
||||||
"A utility package to collect various Icon Fonts and propertize them within
|
|
||||||
Emacs."
|
|
||||||
:if (display-graphic-p))
|
|
||||||
|
|
||||||
|
|
||||||
(use! svg-tag-mode
|
(use! svg-tag-mode
|
||||||
"A minor mode to replace keywords or regular expression with SVG tags."
|
"A minor mode to replace keywords or regular expression with SVG tags."
|
|
@ -25,6 +25,8 @@
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(require 'map)
|
(require 'map)
|
||||||
|
(eval-when-compile
|
||||||
|
(require 'fg42-config))
|
||||||
|
|
||||||
(defvar package-names ())
|
(defvar package-names ())
|
||||||
|
|
||||||
|
@ -63,5 +65,14 @@ DOCS is the documentation of the package."
|
||||||
`(use-package ,pkg ,@details))))
|
`(use-package ,pkg ,@details))))
|
||||||
|
|
||||||
|
|
||||||
|
(defmacro use-with-config! (name docs &rest details)
|
||||||
|
"A wrapper around `use!' that only activates if a config NAME is set.
|
||||||
|
It passes NAME, DOCS, and DETAILS to `use!' only if a config with the
|
||||||
|
same NAME is set to t."
|
||||||
|
(declare (indent defun) (doc-string 2))
|
||||||
|
`(with-config ,name
|
||||||
|
(use! ,name ,docs ,@details)))
|
||||||
|
|
||||||
|
|
||||||
(provide 'fpkg)
|
(provide 'fpkg)
|
||||||
;;; fpkg.el ends here
|
;;; fpkg.el ends here
|
||||||
|
|
Loading…
Reference in New Issue