diff --git a/README.md b/README.md index 3da3b25..dfd152e 100755 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ which each of the has different external dependencies. To gain more information dependencies ( If we failed to tell you inside the **FG42** ) just run the `describe-extension` command. +* aspell ## Install a pre built package Download one of the prebuilt packages and follow these instructions: diff --git a/config/fg42.user.v3.el b/config/fg42.user.v3.el index f48b521..2e930ad 100644 --- a/config/fg42.user.v3.el +++ b/config/fg42.user.v3.el @@ -1,6 +1,6 @@ ;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*- ;; -;; Copyright (c) 2010-2021 Sameer Rahmani +;; Copyright (c) 2010-2020 Sameer Rahmani ;; ;; Author: Sameer Rahmani ;; URL: https://gitlab.com/FG42/FG42 @@ -22,17 +22,121 @@ ;;; Commentary: ;;; Code: (setq debug-on-error t) -(require 'fg42/cube) + +(require 'fg42/flags) +(require 'cubes/editor) (require 'cubes/elisp) -(require 'cubes/org) - -(defsystem default-system () - (fg42/elisp-cube) - (fg42/org-cube)) +(require 'cubes/region-expansion) +(require 'cubes/wm) +(require 'cubes/modeline) +(require 'cubes/autocompletion) +(require 'cubes/golang) +(require 'cubes/project) +(require 'cubes/irc) +(require 'cubes/terminal) -(fg42/start! (default-system)) +;; ============== MY STUFF ============================== +(custom-set-faces + '(mini-modeline-mode-line + ((((background light)) + :background "#aa0000" :height 0.1 :box nil) + (t + :background "#bd93f9" :height 0.1 :box nil)))) +(defvar global-font-size 10) + + +(setq lsp-clients-clangd-executable "~/usr/lib/llvm-13/bin/clangd") +(defconst LLVM_DIR "/home/lxsameer/src/serene/llvm-project") +(defconst llvm-config-dir (concat LLVM_DIR "/llvm/utils/emacs/")) + +(add-hook 'c++-mode-hook (lambda () + (load (concat llvm-config-dir "emacs.el")) + (load (concat llvm-config-dir "llvm-mode.el")) + (load (concat llvm-config-dir "tablegen-mode.el")))) + + + + +;; =========== FG42 stuff =============================== +;; (use-flags wm font-icons cursor-type +;; exec-path-from-shell golang +;; rcirc pinentry vterm +;; company lsp flycheck smart-mode-line wm fg42/region-expansion-cube +;; selectrum window-navigation buffer-navigation font-icons) + +(use-flags + (fg42/merge-with-default-flags + wm + golang + rcirc + vterm + company + lsp + flycheck + fg42/region-expansion-cube)) + +;; ================== my stuff mixed with FG42 stuff =================== +(when-wm + (setq global-font-size 8) + (custom-set-faces + '(mini-modeline-mode-line + ((((background light)) + :background "#aa0000" :height 0.1 :box nil) + (t + :background "#6272a4" :height 0.1 :box nil)))) + (fg42/wm-cube :number-of-workspaces 9) + + (use-flags + (fg42/merge-with-default-flags + wm + -golang + rcirc + vterm + -company + -projectile + -lsp + -flycheck + fg42/region-expansion-cube))) + +;; =========== FG42 stuff =============================== + +;; Both are part of the editor cube but we want to override +;; their behavior + +(fg42/modeline-cube) +(fg42/cursor-cube :type 'bar :color "#bd93f9") +(fg42/font-cube :font-size global-font-size) +(fg42/editor-cube) + +(fg42/elisp-cube) +(fg42/region-expansion-cube) + +(fg42/company-cube) +(fg42/lsp-cube) +(fg42/c++-cube) +(fg42/yaml-cube) +(fg42/flycheck-cube) + +(fg42/golang-cube) +(fg42/projectile-cube) +(fg42/rcirc-cube :server '(("irc.freenode.net" :channels ("#fg42" "#5hit" "#serene-lang" "#technotux") :nick "lxsameer") + ("irc.oftc.net" :channels ("#llvm") :nick "lxsameer"))) + +(fg42/vterm-cube) + +;; Themes should be the last cube and anything that wants to manipulate a face +;; has to use either `fg42/before-initializing-theme-hook' or +;; `fg42/after-initializing-theme-hook' hooks. +(fg42/dracula-theme-cube) + +;;(global-set-key (kbd "C-t") 'forward-char) +;;(g lobal-set-key (kbd "C-n") 'backward-char) +;;(global-set-key (kbd "M-n") 'backward-word) +;;(global-set-key (kbd "M-t") 'forward-word) +;;(global-set-key (kbd "C-,") 'previous-line) +;;(global-set-key (kbd "C-.") 'next-line) (provide '.fg42) ;;; .fg42.v3.el ends here diff --git a/core/cubes/autocompletion.el b/core/cubes/autocompletion.el index 1e33702..7564870 100644 --- a/core/cubes/autocompletion.el +++ b/core/cubes/autocompletion.el @@ -78,9 +78,7 @@ ;; Use Company for completion (bind-key [remap completion-at-point] #'company-complete company-mode-map) - (setq company-tooltip-align-annotations t - ;; Easy navigation to candidates with M- - company-show-numbers t) + (setq company-tooltip-align-annotations t) (setq company-dabbrev-downcase nil))) ;; TODO: Move company box to a new cube diff --git a/core/cubes/fm.el b/core/cubes/fm.el new file mode 100644 index 0000000..e330ffd --- /dev/null +++ b/core/cubes/fm.el @@ -0,0 +1,67 @@ +;;; FMCubes --- The file manager 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) + + +;; TODO: Move this to an autoload file +(defun fg42/dired-external-open () + "In dired, open the file named on this line." + (interactive) + (let ((file (dired-get-filename nil t))) + (call-process "xdg-open" nil 0 nil file))) + + +(defcube fg42/fm-cube + (:docs "cubes/fg42/fm-cube.org" + :flag fm + :flag-default t) + + ;; Linux only + ;; TODO: change this to support OS X + (setq dired-listing-switches "-lFaGh1v --group-directories-first") + + ;; Show directories first + (setq ls-lisp-dirs-first t) + + (setq dired-recursive-copies 'always) + (setq dired-recursive-deletes 'always) + + (define-key dired-mode-map (kbd "E") 'fg42/dired-external-open) + (fpkg/use dired+) + (add-to-list 'dired-mode-hook + (lambda () + (require 'dired-x) + (require 'dired-aux))) + + (when-flag async + (dired-async-mode 1)) + + (fpkg/use dired-narrow + :bind (:map dired-mode-map + ("/" . dired-narrow)))) + + +(provide 'cubes/fm) +;;; fm.el ends here diff --git a/core/cubes/keyboard.el b/core/cubes/keyboard.el new file mode 100644 index 0000000..1692981 --- /dev/null +++ b/core/cubes/keyboard.el @@ -0,0 +1,28 @@ +;;; KeyboardCubes --- The keyboard related 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: + +;; TODO: Add support for HALMAK layout + +(provide 'cubes/keyboard) +;;; keyboard.el ends here diff --git a/core/cubes/wm/core.el b/core/cubes/wm/core.el index a5a6be0..260f1c7 100644 --- a/core/cubes/wm/core.el +++ b/core/cubes/wm/core.el @@ -84,6 +84,7 @@ ;; Here are a few examples: (setq exwm-input-global-keys `( + ;; Bind "s-r" to exit char-mode and fullscreen mode. ([?\s-r] . exwm-reset) ([?\s-g] . keyboard-quit) diff --git a/core/fg42/cube.el b/core/fg42/cube.el index 50158a9..ba96361 100644 --- a/core/fg42/cube.el +++ b/core/fg42/cube.el @@ -105,7 +105,8 @@ ;; This way we can bypass the flag system if we really really want to. (defun ,cube-name-internal (params) - (if (not (boundp (quote ,active-var))) + (if (or (not (boundp (quote ,active-var))) + (not ,active-var)) (progn ;; Mark this cube as active (setq ,active-var t)