fixed warnings
This commit is contained in:
parent
48625aaa32
commit
734fb54387
1 changed files with 61 additions and 30 deletions
91
init.org
91
init.org
|
@ -2,7 +2,7 @@
|
|||
#+PROPERTY: header-args :tangle yes
|
||||
|
||||
* Literate Configuration for Emacs
|
||||
** Goals
|
||||
** Goals
|
||||
- Manage *init.el* as an org-file
|
||||
- Use a simple robust tangling solution which works together with
|
||||
Crafted Emacs
|
||||
|
@ -35,7 +35,7 @@ one to use.
|
|||
- [[https://github.com/jwiegley/use-package][GitHub repo for use-package]]
|
||||
- [[https://github.com/jwiegley/dot-emacs/blob/master/init.org][John Wiegley's .emacs file]]
|
||||
- [[https://github.com/TheBB/dotemacs/blob/master/init.el][Eivind Fonn's init.el]]
|
||||
|
||||
|
||||
* First Things First
|
||||
** Make tangled file read-only
|
||||
|
||||
|
@ -44,7 +44,9 @@ importantly make the file read-only to avoid editing the tangled file by
|
|||
accident instead of the source in the org-mode file.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;;; -*- lexical-binding: t; read-only-mode: t; -*-
|
||||
;; init.el --- Literate configuration for Emacs -*- lexical-binding: t; read-only-mode: t; -*-
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; DO NOT EDIT!!!
|
||||
;;
|
||||
|
@ -63,16 +65,19 @@ Also immediately set lexical binding mode.
|
|||
** Report time spent loading the configuration
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defconst emacs-start-time (current-time))
|
||||
(defconst emacs-start-time (current-time))
|
||||
|
||||
(defun report-time-since-load (&optional suffix)
|
||||
(message "Loading init... (%.3fs) %s"
|
||||
(float-time (time-subtract (current-time) emacs-start-time))
|
||||
suffix))
|
||||
(defun report-time-since-load (&optional suffix)
|
||||
"Report the time since the file was init script was started.
|
||||
|
||||
(add-hook 'after-init-hook
|
||||
#'(lambda () (report-time-since-load " [after-init]"))
|
||||
t)
|
||||
If SUFFIX is provided, it is appended to the message."
|
||||
(message "Loading init... (%.3fs) %s"
|
||||
(float-time (time-subtract (current-time) emacs-start-time))
|
||||
suffix))
|
||||
|
||||
(add-hook 'after-init-hook
|
||||
#'(lambda () (report-time-since-load " [after-init]"))
|
||||
t)
|
||||
#+end_src
|
||||
|
||||
When looking for where the time goes, the `report-time-since-load`
|
||||
|
@ -266,6 +271,18 @@ I find it a bit a confusing module.
|
|||
|
||||
It provides a minor-mode
|
||||
|
||||
** Add a fully featured terminal emulator
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package eat
|
||||
:ensure t
|
||||
:defer 5)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26285 20099 685413 nil elpaca-process-queues nil nil 626000 nil]
|
||||
|
||||
|
||||
* Editor Features
|
||||
** Evil Vim Keybindings
|
||||
|
||||
|
@ -367,7 +384,11 @@ muscle memory.
|
|||
fonts))
|
||||
|
||||
(defun pti-configure-fonts (&optional frame)
|
||||
"Set configuration of fonts based on display size."
|
||||
"Set configuration of fonts based on display size.
|
||||
|
||||
The FRAME argument makes it possible to set the fonts for new frames by
|
||||
adding this function to `after-make-frame-functions' which must have
|
||||
this argument."
|
||||
(defvar pti-font-size
|
||||
(if (> (display-pixel-height) 1600) 22 14))
|
||||
|
||||
|
@ -403,7 +424,7 @@ muscle memory.
|
|||
(use-package fontaine
|
||||
:ensure t
|
||||
:if (display-graphic-p)
|
||||
:demand t
|
||||
:demand t
|
||||
:config (progn
|
||||
(pti-configure-fonts)
|
||||
(add-hook 'after-make-frame-functions #'pti-configure-fonts)))
|
||||
|
@ -422,8 +443,8 @@ screen.
|
|||
;; also support client frames
|
||||
;;
|
||||
(defun pti-display-tweaks (&optional frame)
|
||||
"Configure a newly created frame."
|
||||
|
||||
"Configure a newly created FRAME."
|
||||
(interactive)
|
||||
(unless frame
|
||||
(setq frame (selected-frame)))
|
||||
(when (display-graphic-p)
|
||||
|
@ -439,6 +460,9 @@ screen.
|
|||
(pti-display-tweaks)
|
||||
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
*** Set Theme
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; Set theme
|
||||
|
@ -483,21 +507,21 @@ There is a keybinding on *<F5>* to toggle between light and dark mode.
|
|||
(display-buffer-reuse-mode-window
|
||||
display-buffer-below-selected)
|
||||
;; Parameters
|
||||
(window-height . 10))
|
||||
(window-height . 10))
|
||||
display-buffer-alist)
|
||||
(push '("\\*Warnings\\*"
|
||||
;; display-buffer functions, first one that succeeds is used
|
||||
(display-buffer-reuse-mode-window
|
||||
display-buffer-below-selected)
|
||||
;; Parameters
|
||||
(window-height . 10))
|
||||
(window-height . 10))
|
||||
display-buffer-alist)
|
||||
(push '("\\*Geiser Debug\\*"
|
||||
;; display-buffer functions, first one that succeeds is used
|
||||
(display-buffer-reuse-mode-window
|
||||
display-buffer-below-selected)
|
||||
;; Parameters
|
||||
(window-height . 10))
|
||||
(window-height . 10))
|
||||
display-buffer-alist)
|
||||
|
||||
;; set custom info folder
|
||||
|
@ -598,9 +622,9 @@ Enables an alternative file navigation behavior in Dired, Emacs' directory edito
|
|||
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
|
||||
(unless (eq ibuffer-sorting-mode 'project-file-relative)
|
||||
(ibuffer-do-sort-by-project-file-relative)))
|
||||
|
||||
|
||||
(use-package ibuffer-project
|
||||
:ensure t
|
||||
:ensure t
|
||||
:hook
|
||||
(ibuffer-mode . crafted-ide-enhance-ibuffer-with-ibuffer-project)
|
||||
:bind (("C-x C-b" . #'ibuffer)))
|
||||
|
@ -651,7 +675,7 @@ This enables direnv globally.
|
|||
:ensure t
|
||||
:if (display-graphic-p)
|
||||
:hook (org-mode . org-bullets-mode))
|
||||
|
||||
|
||||
(use-package mixed-pitch
|
||||
:ensure t
|
||||
:if (display-graphic-p)
|
||||
|
@ -684,7 +708,7 @@ This enables direnv globally.
|
|||
("~/org/personal/bijen.org" . (:level . 1))
|
||||
("~/org/personal/fitness.org" . (:level . 1))
|
||||
))
|
||||
:config
|
||||
:config
|
||||
;; set files for agenda views
|
||||
(setq +org-capture-todo-file "~/Dropbox/org/inbox.org"
|
||||
+org-capture-notes-file "~/Dropbox/org/inbox.org"
|
||||
|
@ -1062,7 +1086,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>.
|
|||
(use-package org-jira
|
||||
:ensure t
|
||||
:commands (org-jira-get-issues org-jira-get-projects)
|
||||
:config
|
||||
:config
|
||||
(make-directory "~/.org-jira" 'parents)
|
||||
(setq jiralib-url (auth-source-pass-get "url" "customer/jira"))
|
||||
(jiralib-login
|
||||
|
@ -1174,7 +1198,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>.
|
|||
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
|
||||
:hook
|
||||
((prog . treesit-inspect-mode)))
|
||||
|
||||
|
||||
(use-package treesit-auto
|
||||
:ensure t
|
||||
:defer 5
|
||||
|
@ -1204,7 +1228,7 @@ I always get errors compiling support for *janet* so I pruned the
|
|||
**** Recompiling all Treesitter Grammars
|
||||
To recompile all treesitter grammars, execute following block with
|
||||
*C-c C-c*.
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist))
|
||||
#+END_SRC
|
||||
|
||||
|
@ -1212,15 +1236,15 @@ To recompile all treesitter grammars, execute following block with
|
|||
| bash | cmake | css | elisp | go | gomod | haskell | html | java | javascript | json | lua | make | markdown | ocaml | python | toml | tsx | typescript | yaml |
|
||||
|
||||
**** Treesitter Grammars for Windows
|
||||
Windows does not come with a handy-dandy C-compiler available as *cc* or *gcc* or even *c99* and treesitter does not have a handy dandy feature to remap that to *zig cc* and similar.
|
||||
Windows does not come with a handy-dandy C-compiler available as *cc* or *gcc* or even *c99* and treesitter does not have a handy dandy feature to remap that to *zig cc* and similar.
|
||||
|
||||
However we can download it from the release page of the tree-sitter-langs repo or even better install the *tree-sitter-langs* package.
|
||||
|
||||
This will download the dynamic library to _user-emacs-directory_/elpa/tree-sitter-langs/bin
|
||||
This will download the dynamic library to _user-emacs-directory_/elpa/tree-sitter-langs/bin
|
||||
|
||||
However they'll have the wrong filename and are not in the path where treesitter looks in.
|
||||
However they'll have the wrong filename and are not in the path where treesitter looks in.
|
||||
|
||||
- Open the folder with *dired*
|
||||
- Open the folder with *dired*
|
||||
- switch to writable with `C-xC-q` to enable *wdired*
|
||||
- :%s/[a-z-]\*.dll/libtree-sitter-\\0/
|
||||
- `C-cC-c` to confirm the changes if it looks ok
|
||||
|
@ -1229,7 +1253,7 @@ However they'll have the wrong filename and are not in the path where treesitter
|
|||
|
||||
and they will now be installed.
|
||||
|
||||
Normally that should work for other OSes too, but there is no real need for it.
|
||||
Normally that should work for other OSes too, but there is no real need for it.
|
||||
|
||||
see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter][How to get started with tree sitter]] .
|
||||
|
||||
|
@ -1764,5 +1788,12 @@ enough value but I just removed it, so it'll have to wait a bit.
|
|||
** TODO Add support for zola blogposts writing in org-mode
|
||||
|
||||
see [[https://github.com/gicrisf/ox-zola][ox-zola]] for exporting org-mode to zola markdown.
|
||||
* Final Words
|
||||
|
||||
This is the end of the configuration file.
|
||||
|
||||
Add a variable so the file is tangling itself each time it is saved.
|
||||
|
||||
# Local Variables:
|
||||
# eval: (add-hook 'after-save-hook #'org-babel-tangle t t)
|
||||
# End:
|
||||
|
|
Loading…
Reference in a new issue