From 3a9f733ccd94a1bc911f477f4b3d78e6e7057f3a Mon Sep 17 00:00:00 2001 From: zstg Date: Sat, 27 Apr 2024 13:25:27 +0530 Subject: [PATCH] Added more Emacs content --- src/content/docs/stratmacs/introduction.md | 3 -- src/content/docs/tools/Stratmacs/01-Intro.md | 5 +++ .../docs/tools/Stratmacs/02-Configuring.md | 44 +++++++++++++++++++ src/content/docs/tools/Stratmacs/Emacs.md | 3 -- .../Stratvim}/introduction.md | 0 src/styles/_global.css | 2 +- 6 files changed, 50 insertions(+), 7 deletions(-) delete mode 100644 src/content/docs/stratmacs/introduction.md create mode 100644 src/content/docs/tools/Stratmacs/01-Intro.md create mode 100644 src/content/docs/tools/Stratmacs/02-Configuring.md delete mode 100644 src/content/docs/tools/Stratmacs/Emacs.md rename src/content/docs/{stratvim => tools/Stratvim}/introduction.md (100%) diff --git a/src/content/docs/stratmacs/introduction.md b/src/content/docs/stratmacs/introduction.md deleted file mode 100644 index cca511c..0000000 --- a/src/content/docs/stratmacs/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: What is Stratmacs? ---- diff --git a/src/content/docs/tools/Stratmacs/01-Intro.md b/src/content/docs/tools/Stratmacs/01-Intro.md new file mode 100644 index 0000000..e60f967 --- /dev/null +++ b/src/content/docs/tools/Stratmacs/01-Intro.md @@ -0,0 +1,5 @@ +--- +title: Intro to Stratmacs +--- +## Introduction + diff --git a/src/content/docs/tools/Stratmacs/02-Configuring.md b/src/content/docs/tools/Stratmacs/02-Configuring.md new file mode 100644 index 0000000..02e5b36 --- /dev/null +++ b/src/content/docs/tools/Stratmacs/02-Configuring.md @@ -0,0 +1,44 @@ +--- +title: Configuring Stratmacs +--- + +## Assigning variables +Use the `setq` Elisp function to assign variables. +```lisp +(setq use-short-answers t) ;; this lets us use y/n instead of having to type yes/no. +(setq initial-major-mode 'org-mode) ;;make the scratch buffer open in Org mode by default (convenience) +``` +Multiple `setq` statements can _also_ be represented like this: +```lisp +(setq use-short-answers t + initial-major-mode 'org-mode) +``` +## How to use Major and Minor modes +:::note +A buffer can have multiple _minor_ modes enabled, but only *1* _major_ mode can be enabled inside a buffer. +::: +## How to install new packages +Stratmacs comes with [`straight`](https://github.com/radian-software/straight.el) configured out of the box. New packages can be installed via `use-package`: + +```lisp +(use-package name_of_package + ; :defer 3 ;; load this package after a delay of 3s + ; :straight t ;; IF you want to use straight to manage this package (Straight grants access to GitHub repos) + :init (config that must be run before loading the package) + :config (package configuration)) +``` + +We can now apply this knowledge and install new packages. As an example, let's install the [GPTel](https://github.com/karthink/gptel) package from GitHub: +```lisp +(use-package gptel + :straight t ;; you don't need to specify this if you're not ins + :config + ;; OPTIONAL configuration + (setq + gptel-model "neural-chat:latest" + gptel-backend (gptel-make-ollama "Ollama" + :host "localhost:11434" + :stream t + :models '("neural-chat:latest")))) +``` + diff --git a/src/content/docs/tools/Stratmacs/Emacs.md b/src/content/docs/tools/Stratmacs/Emacs.md deleted file mode 100644 index 9579d85..0000000 --- a/src/content/docs/tools/Stratmacs/Emacs.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: StratOS Emacs config ---- diff --git a/src/content/docs/stratvim/introduction.md b/src/content/docs/tools/Stratvim/introduction.md similarity index 100% rename from src/content/docs/stratvim/introduction.md rename to src/content/docs/tools/Stratvim/introduction.md diff --git a/src/styles/_global.css b/src/styles/_global.css index 0d8cb1c..f623338 100644 --- a/src/styles/_global.css +++ b/src/styles/_global.css @@ -1,7 +1,7 @@ /* @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap'); */ @import '@fontsource/jetbrains-mono'; :root { - --sl-font: 'JetBrains Mono', serif !important; + --sl-font: 'JetBrains Mono'; } .card {