Skip to content

Commit

Permalink
Added more Emacs content
Browse files Browse the repository at this point in the history
  • Loading branch information
zstg committed Apr 27, 2024
1 parent 7b1e0b2 commit 3a9f733
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/content/docs/stratmacs/introduction.md

This file was deleted.

5 changes: 5 additions & 0 deletions src/content/docs/tools/Stratmacs/01-Intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Intro to Stratmacs
---
## Introduction
<!-- include pics -->
44 changes: 44 additions & 0 deletions src/content/docs/tools/Stratmacs/02-Configuring.md
Original file line number Diff line number Diff line change
@@ -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"))))
```

3 changes: 0 additions & 3 deletions src/content/docs/tools/Stratmacs/Emacs.md

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion src/styles/_global.css
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 3a9f733

Please sign in to comment.