Compare commits

..

23 Commits

Author SHA1 Message Date
f4ae8b2e21 chore: upgrade Vuepress 2025-11-19 12:55:52 +01:00
21c570a440 fix(mu4e): disable ical features for now 2025-11-19 12:40:01 +01:00
9b266c444d docs: formatting 2025-11-19 12:40:01 +01:00
3fe9b05623 chore(applications): change remote of npm-transient 2025-11-19 12:40:01 +01:00
c29895d019 treesitter 2025-11-19 12:40:01 +01:00
003d5d12cf feat(Nix): add nix-ts-mode for TreeSitter support in Nix files 2025-11-19 12:40:01 +01:00
764be96265 feat(treesit/astro): disable autocompilation of astro grammar 2025-11-19 12:40:01 +01:00
4b070dbe4f langtool 2025-11-19 12:40:01 +01:00
e432aa5f20 feat(LSP): add better LSP config for LSP servers 2025-11-19 12:40:01 +01:00
419d291d21 feat(tree-sitter): better tree sitter config, precompiled grammars 2025-11-19 12:40:01 +01:00
43e54218a9 feat(wakatime): add wakatime package 2025-11-19 12:40:01 +01:00
bbfd7414f4 feat(webkit browser): remove webkit browser config
I no longer use it, and my Emacs build does not include it anyway.
2025-11-19 12:40:01 +01:00
06a787d3c9 feat(jujutsu): add jjdescription package 2025-11-19 12:40:01 +01:00
0adfe045a8 feat(langtool): restore langtool, using a local server 2025-11-19 12:40:01 +01:00
79fbbd45e5 fix(mu4e): preserve newlines in signature 2025-11-19 12:40:01 +01:00
df99684d3c feat(AI): add AI agent packages to Emacs 2025-11-19 12:40:01 +01:00
4adcfc8f6f feat(langtool): better keybind for langtool-correct-at-point 2025-11-19 12:40:01 +01:00
9d58977c68 feat(emacs): add Json and Tailwind CSS configuration 2025-11-19 12:40:01 +01:00
5c28ff6d39 feat(emacs): add QML configuration 2025-11-19 12:39:59 +01:00
880d9a0a4a feat(emacs): add Jujutsu packages 2025-11-19 12:39:59 +01:00
11aba117de feat(emacs): add keybinds for org-clock 2025-11-19 12:39:59 +01:00
7a7700855f feat(shell/eat): improve eat configuration
This commit enables eat-mode in Eshell, allowing the use of tools that
normally would not work in Eshell.

It also automatically closes the eat buffer when exiting the shell
instead of keeping it open.
2025-06-08 14:51:25 +02:00
b330e1c7e0 feat(emacs/exwm): deprecate EXWM config 2025-05-24 23:35:17 +02:00
9 changed files with 2124 additions and 2818 deletions

View File

@@ -1,19 +1,14 @@
import { defaultTheme } from '@vuepress/theme-default'; import { defaultTheme } from '@vuepress/theme-default';
import { viteBundler } from '@vuepress/bundler-vite'; import { viteBundler } from '@vuepress/bundler-vite';
import { defineUserConfig } from 'vuepress'; import { defineUserConfig } from 'vuepress';
import { searchProPlugin } from 'vuepress-plugin-search-pro'; import { slimsearchPlugin } from '@vuepress/plugin-slimsearch';
import head from './head'; import head from './head';
interface ChildPage {
text: string;
link: string;
}
export default defineUserConfig({ export default defineUserConfig({
lang: 'en-US', lang: 'en-US',
title: "Phundrak's Dotfiles", title: "Phundrak's Dotfiles",
head: head, head: head as any,
description: "Documentation of the GNU/Linux configuration of P'undrak", description: "Documentation of the GNU/Linux configuration of P'undrak",
bundler: viteBundler({}), bundler: viteBundler({}),
markdown: { markdown: {
@@ -25,9 +20,9 @@ export default defineUserConfig({
}, },
}, },
plugins: [ plugins: [
searchProPlugin({ slimsearchPlugin({
indexContent: true, indexContent: true
}), })
], ],
theme: defaultTheme({ theme: defaultTheme({
sidebarDepth: 5, sidebarDepth: 5,
@@ -72,6 +67,7 @@ export default defineUserConfig({
children: [ children: [
'/deprecated/awesome', '/deprecated/awesome',
'/deprecated/bootstrap', '/deprecated/bootstrap',
'/emacs/packages/exwm',
'/deprecated/i3', '/deprecated/i3',
'/deprecated/nano', '/deprecated/nano',
'/neofetch', '/neofetch',

View File

@@ -1,9 +1,9 @@
interface SimplifiedHeader { interface SimplifiedHeader {
tag: string; tag: string;
content: [any]; content: any[];
} }
const simplifiedHead = [ const simplifiedHead:SimplifiedHeader[] = [
{ {
tag: 'script', tag: 'script',
content: [ content: [
@@ -128,7 +128,7 @@ const simplifiedHead = [
}, },
]; ];
let head = []; let head:[string, any, string?][] = [];
simplifiedHead.forEach((tag: SimplifiedHeader) => { simplifiedHead.forEach((tag: SimplifiedHeader) => {
let tagName = tag.tag; let tagName = tag.tag;
tag.content.forEach((element) => { tag.content.forEach((element) => {

View File

@@ -90,7 +90,6 @@ block.
| =autocompletion.el= | [[file:./packages/autocompletion.org][Packages — Autocompletion]] | | =autocompletion.el= | [[file:./packages/autocompletion.org][Packages — Autocompletion]] |
| =editing.el= | [[file:./packages/editing.org][Packages — Editing]] | | =editing.el= | [[file:./packages/editing.org][Packages — Editing]] |
| =emacs-builtin.el= | [[file:./packages/emacs-builtin.org][Packages — Emacs Built-ins]] | | =emacs-builtin.el= | [[file:./packages/emacs-builtin.org][Packages — Emacs Built-ins]] |
| =exwm.el= | [[file:./packages/exwm.org][Packages — EXWM]] |
| =helpful.el= | [[file:./packages/helpful.org][Packages — Making My Life Easier]] | | =helpful.el= | [[file:./packages/helpful.org][Packages — Making My Life Easier]] |
| =latex.el= | [[file:./packages/latex.org][Packages — LaTeX]] | | =latex.el= | [[file:./packages/latex.org][Packages — LaTeX]] |
| =misc.el= | [[file:./packages/misc.org][Packages — Misc]] | | =misc.el= | [[file:./packages/misc.org][Packages — Misc]] |
@@ -107,8 +106,8 @@ block.
" ") " ")
#+end_src #+end_src
#+RESULTS[f76449860408293997e174ff94c743d46951835b]: generate-modules #+RESULTS[05f9bb535bec2ba84390cc118600323683f51e7c]: generate-modules
: "basic-config.el" "custom-elisp.el" "package-manager.el" "keybinding-managemers.el" "applications.el" "autocompletion.el" "editing.el" "emacs-builtin.el" "exwm.el" "helpful.el" "latex.el" "misc.el" "org.el" "programming.el" "visual-config.el" "keybindings.el" : "basic-config.el" "custom-elisp.el" "package-manager.el" "keybinding-managers.el" "applications.el" "autocompletion.el" "editing.el" "emacs-builtin.el" "helpful.el" "latex.el" "misc.el" "org.el" "programming.el" "visual-config.el" "keybindings.el"
#+begin_src emacs-lisp :noweb yes #+begin_src emacs-lisp :noweb yes
(dolist (module '(<<generate-modules()>>)) (dolist (module '(<<generate-modules()>>))

View File

@@ -90,37 +90,41 @@ Undefining some stuff to make keybind prefixes work correctly.
** Apps ** Apps
Here are my apps keybindings. Each one of them is prefixed by ~a~. Here are my apps keybindings. Each one of them is prefixed by ~a~.
#+name: keybindings-apps #+name: keybindings-apps
| Key | Function | Description | Package | | Key | Function | Description | Package |
|-----+----------------------------+-------------+------------| |-----+----------------------------+-------------+-----------------|
| | | apps | | | | | apps | |
| c | calc | | | | a | | AI | |
| C | | calendar | | | ae | eca | | eca |
| CC | calendar | | | | aC | claude-code-ide | | claude-code-ide |
| Co | org-agenda | | org | | ac | claude-code-ide-menu | | claude-code-ide |
| Cs | org-caldav-sync | | org-caldav | | c | calc | | |
| d | docker | | docker | | C | | calendar | |
| E | elfeed | | elfeed | | CC | calendar | | |
| e | | email | | | Co | org-agenda | | org |
| ec | mu4e-compose-new | | mu4e | | Cs | org-caldav-sync | | org-caldav |
| em | mu4e | | mu4e | | d | docker | | docker |
| k | keycast-mode | | keycast | | E | elfeed | | elfeed |
| K | keycast-log-mode | | keycast | | e | | email | |
| m | | mastodon | | | ec | mu4e-compose-new | | mu4e |
| mm | mastodon | | mastodon | | em | mu4e | | mu4e |
| mn | mastodon-notifications-get | | mastodon | | k | keycast-mode | | keycast |
| mt | mastodon-toot | | mastodon | | K | keycast-log-mode | | keycast |
| T | tetris | | | | m | | mastodon | |
| S | screenshot | | screenshot | | mm | mastodon | | mastodon |
| w | wttrin | | wttrin | | mn | mastodon-notifications-get | | mastodon |
| mt | mastodon-toot | | mastodon |
| T | tetris | | |
| S | screenshot | | screenshot |
| w | wttrin | | wttrin |
*** Shell apps *** Shell apps
I also have two main shell-related functions, prefixed with ~as~. I also have two main shell-related functions, prefixed with ~as~.
#+name: keybindings-apps-shell #+name: keybindings-apps-shell
| Key | Function | Description | Package | | Key | Function | Description | Package |
|-----+-------------+-------------+-------------| |-----+------------+-------------+---------|
| | | shells | | | | | shells | |
| e | eshell-new | | | | e | eshell-new | | |
| t | eat | | eat | | t | eat | | eat |
*** Treemacs *** Treemacs
#+name: keybindings-treemacs #+name: keybindings-treemacs
@@ -407,10 +411,10 @@ My keybindings for jumping around are prefixed by ~j~.
| Key | Function | Description | Package | | Key | Function | Description | Package |
|-----+----------------------------------+-------------+----------| |-----+----------------------------------+-------------+----------|
| | | language | | | | | language | |
| . | langtool-correct-at-point | | langtool |
| B | langtool-correct-buffer | | langtool | | B | langtool-correct-buffer | | langtool |
| b | langtool-check-buffer | | langtool | | b | langtool-check-buffer | | langtool |
| c | langtool-check | | langtool | | c | langtool-check | | langtool |
| C | langtool-correct-at-point | | langtool |
| d | langtool-check-done | | langtool | | d | langtool-check-done | | langtool |
| l | langtool-switch-default-language | | langtool | | l | langtool-switch-default-language | | langtool |
| p | langtool-show-message-at-point | | langtool | | p | langtool-show-message-at-point | | langtool |
@@ -466,7 +470,13 @@ My keybindings for my projects are prefixed by ~p~.
| Key | Function | Description | Package | | Key | Function | Description | Package |
|-----+--------------------------------+-------------+----------| |-----+--------------------------------+-------------+----------|
| | | org | | | | | org | |
| c | org-capture | | org | | c | | clock | |
| cc | org-clock-cancel | | org |
| cd | org-clock-display | | org |
| cg | org-clock-goto | | org |
| ci | org-clock-in | | org |
| co | org-clock-out | | org |
| C | org-capture | | org |
| r | | roam | | | r | | roam | |
| rb | org-mark-ring-goto | back | org-roam | | rb | org-mark-ring-goto | back | org-roam |
| rB | org-roam-buffer-toggle | | org-roam | | rB | org-roam-buffer-toggle | | org-roam |

View File

@@ -33,6 +33,35 @@
:defer t) :defer t)
#+end_src #+end_src
** AI
*** Claude Code Emacs
#+begin_src emacs-lisp
(use-package claude-code-ide
:defer t
:straight (:build t :type git :host github :repo "manzaltu/claude-code-ide.el")
:custom
((claude-code-ide-terminal-backend 'eat)
(claude-code-ide-enable-mcp-server t))
:config
(claude-code-ide-emacs-tools-setup))
#+end_src
*** Editor Code Assistant
The Editor Code Assistant, or ECA, is a nice package that allows the
user to use an AI agent right in Emacs. AI is certainly not something
that will replace programmers any time soon, but its still a nice
tool to have when you know what youre doing.
#+begin_src emacs-lisp
(use-package eca
:defer t
:init (setopt eca-extra-args '("--verbose" "--log-level debug"))
:straight (:build t
:host github
:repo "editor-code-assistant/eca-emacs"
:files ("*.el")))
#+end_src
** Bitwarden ** Bitwarden
This package is still a very much work in progress one Im developing This package is still a very much work in progress one Im developing
in order to interact with Bitwarden in Emacs with the help of the in order to interact with Bitwarden in Emacs with the help of the
@@ -295,6 +324,7 @@ know about it since I dont want it to include it a second time after
(setq message-signature nil (setq message-signature nil
mail-signature nil) mail-signature nil)
#+end_src #+end_src
*** Gnus *** Gnus
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package gnus (use-package gnus
@@ -406,8 +436,8 @@ configuration for the ~mu4e~ package itself.
(require 'mu4e) (require 'mu4e)
(remove-hook 'mu4e-main-mode-hook 'evil-collection-mu4e-update-main-view) (remove-hook 'mu4e-main-mode-hook 'evil-collection-mu4e-update-main-view)
<<mu4e-ical-setup>> ;; <<mu4e-ical-setup>>
<<mu4e-ical-init-config>> ;; <<mu4e-ical-init-config>>
(setopt mu4e-completing-read-function 'completing-read (setopt mu4e-completing-read-function 'completing-read
mu4e-use-fancy-chars t mu4e-use-fancy-chars t
@@ -433,7 +463,7 @@ configuration for the ~mu4e~ package itself.
(add-hook 'mu4e-view-mode-hook (lambda () (setq truncate-lines nil))) (add-hook 'mu4e-view-mode-hook (lambda () (setq truncate-lines nil)))
(add-hook 'mu4e-headers-mode-hook (lambda () (setq truncate-lines t))) (add-hook 'mu4e-headers-mode-hook (lambda () (setq truncate-lines t)))
<<mu4e-ical-config>> ;; <<mu4e-ical-config>>
<<mu4e-keybindings-undef>> <<mu4e-keybindings-undef>>
<<mu4e-keybindings-view>> <<mu4e-keybindings-view>>
<<mu4e-keybindings-view-no-prefix>> <<mu4e-keybindings-view-no-prefix>>
@@ -506,8 +536,8 @@ events shared with me on my personal mailbox. The answer is actually
[[https://www.djcbsoftware.nl/code/mu/mu4e/iCalendar.html][dead simple]]. [[https://www.djcbsoftware.nl/code/mu/mu4e/iCalendar.html][dead simple]].
#+name: mu4e-ical-setup #+name: mu4e-ical-setup
#+begin_src emacs-lisp #+begin_src emacs-lisp
(require 'mu4e-icalendar) ;; (require 'mu4e-icalendar)
(mu4e-icalendar-setup) ;; (mu4e-icalendar-setup)
#+end_src #+end_src
Ill just configure a couple of things regarding these events, namely Ill just configure a couple of things regarding these events, namely
@@ -515,14 +545,14 @@ converting them to org-mode and add them to my =~/org/notes.org= file,
and delete the email once I answered to the event. and delete the email once I answered to the event.
#+name: mu4e-ical-config #+name: mu4e-ical-config
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq mu4e-icalendar-trash-after-reply t) ;; (setq mu4e-icalendar-trash-after-reply t)
#+end_src #+end_src
#+name: mu4e-ical-init-config #+name: mu4e-ical-init-config
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq gnus-icalendar-org-capture-file "~/org/notes.org" ;; (setq gnus-icalendar-org-capture-file "~/org/notes.org"
gnus-icalendar-org-capture-headline '("Calendar")) ;; gnus-icalendar-org-capture-headline '("Calendar"))
(gnus-icalendar-org-setup) ;; (gnus-icalendar-org-setup)
#+end_src #+end_src
**** Basic configuration **** Basic configuration
@@ -1011,8 +1041,6 @@ skipping the export part and write your emails directly in org-mode?
org-msg-signature (format "\n--\n#+begin_signature\n%s\n#+end_signature" org-msg-signature (format "\n--\n#+begin_signature\n%s\n#+end_signature"
(with-temp-buffer (with-temp-buffer
(insert-file-contents mail-signature-file) (insert-file-contents mail-signature-file)
(while (re-search-forward "\n" nil t)
(replace-match "\n\n"))
(buffer-string)))) (buffer-string))))
:general :general
(phundrak/major-leader-key (phundrak/major-leader-key
@@ -1214,6 +1242,40 @@ minibuffer, both separated by a single space."
("q" nil :exit t)) ("q" nil :exit t))
#+end_src #+end_src
** Langtool
LanguageTool is a great tool for catching typos and grammatical errors
in quite a few languages.
#+begin_src emacs-lisp
(use-package langtool
:defer t
:straight (:build t)
:commands (langtool-check
langtool-check-done
langtool-show-message-at-point
langtool-correct-buffer)
:custom
(langtool-default-language "en-US")
(langtool-mother-tongue "fr")
:config
(setq langtool-http-server-host "localhost"
langtool-http-server-port 8081))
#+end_src
Finally, =writegood-mode= detects some simple general rules when writing
in English and can also calculate the Flesh-Kincaid levels of a
document.
#+begin_src emacs-lisp
(use-package writegood-mode
:defer t
:straight (:build t)
:hook org-mode latex-mode
:general
(phundrak/major-leader-key
:keymaps 'writegood-mode-map
"g" #'writegood-grade-level
"r" #'writegood-reading-ease))
#+end_src
** Nov ** Nov
Nov is a major-mode for reading EPUB files within Emacs. Since I have Nov is a major-mode for reading EPUB files within Emacs. Since I have
it, I dont need any other Epub reader on my computer! Plus this one it, I dont need any other Epub reader on my computer! Plus this one
@@ -1311,6 +1373,60 @@ left it.
#+end_src #+end_src
** Project Management ** Project Management
*** Jujutsu
Lets face it: [[https://git-scm.com/][git]] is awesome. Theres a reason it took over the world
of software development, replacing pretty much all competitors such as
subversion. And I will forever love it. But, it has a lot of
drawbacks, especially its interface that is... not great, to put it
mildly. I absolutely respect its commitment to staying backward
compatible, but its not great.
[[https://jj-vcs.github.io/][Jujutsu]] on the other hand, is awesome! Its interface is really clean,
really intuitive, especially for someone like me who rebases a LOT!
And, for now, it still uses git as its backend, so its entirely
compatible with git repositories. In fact, I pretty much dont use git
anymore, jj (abbreviation of Jujutsu) has almost completely replaced
git for me.
It comes to no surprise then that I will use [[https://elpa.gnu.org/packages/vc-jj.html][=vc-jj=]], a Jujutsu
backend for =vc.el= and =project.el=.
#+begin_src emacs-lisp
(use-package vc-jj
:straight (:build t)
:defer nil)
#+end_src
As mentioned in the packages README, I do need to set these lines in
my jj config:
#+begin_src toml :tangle no
[ui]
diff-formatter = ":git"
conflict-marker-style = "git"
#+end_src
I also like Magits interface, as you can see in my [[file:./applications.md#magit][Magit]] config.
Therefore, lets install =jujutsu-mode= which attempts to recreate a
Magit-style interface for Jujutsu.
#+begin_src emacs-lisp
(use-package jj-mode
:straight (:build t :host github :repo "bolivier/jj-mode.el")
:defer t)
#+end_src
Though, Ill be honest, I generally prefer to use Jujutsu in the
terminal, unlike git. Something I do use Emacs for, however, is
writing my commit messages.
#+begin_src emacs-lisp
(use-package jjdescription
:defer nil
:straight (:build t)
:commands jjdescription-mode
:init (add-to-list 'auto-mode-alist '("\\.jjdescription\\'" . jjdescription-mode)))
#+end_src
*** Magit *** Magit
Magit is an awesome wrapper around Git for Emacs! Very often, I go Magit is an awesome wrapper around Git for Emacs! Very often, I go
from disliking to really hating Git GUI clients because they often from disliking to really hating Git GUI clients because they often
@@ -1555,7 +1671,12 @@ for VTerm as I never got VTerm to actually work on NixOS.
"*.ti" ("terminfo/e" "terminfo/e/*") "*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*") ("terminfo/65" "terminfo/65/*")
("integration" "integration/*") ("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el")))) (:exclude ".dir-locals.el" "*-tests.el")))
:init
(add-hook 'eshell-load-hook #'eat-eshell-mode)
(eat-eshell-mode 1)
:config
(add-hook 'eat-exit-hook #'kill-this-buffer))
#+end_src #+end_src
*** Shell-pop *** Shell-pop
@@ -1576,31 +1697,12 @@ buffer.
(shell-pop-cleanup-buffer-at-process-exit t)) (shell-pop-cleanup-buffer-at-process-exit t))
#+end_src #+end_src
** XWidgets Webkit Browser ** Wakatime
I used to use the xwidgets webkit browser in order to view or preview #+begin_src emacs-lisp
HTML files from Emacs, but it seems the Cairo background transparency (use-package wakatime-mode
patch breaks it. So while this isnt patched, I will disable Xwidgets :defer t
in my Emacs build, and these keybinds *will not* be tangled. :straight (:build t)
#+begin_src emacs-lisp :tangle no :init (global-wakatime-mode))
(phundrak/evil
:keymaps 'xwidget-webkit-mode-map
"<mouse-4>" #'xwidget-webkit-scroll-down-line
"<mouse-5>" #'xwidget-webkit-scroll-up-line
"c" #'xwidget-webkit-scroll-backward
"t" #'xwidget-webkit-scroll-up-line
"s" #'xwidget-webkit-scroll-down-line
"r" #'xwidget-webkit-scroll-forward
"h" #'xwidget-webkit-goto-history
"C" #'xwidget-webkit-back
"R" #'xwidget-webkit-forward
"C-r" #'xwidget-webkit-reload
"j" nil
"k" nil
"l" nil
"H" nil
"L" nil
"C-d" #'xwidget-webkit-scroll-up
"C-u" #'xwidget-webkit-scroll-down)
#+end_src #+end_src
** Wttr.in ** Wttr.in

View File

@@ -1,10 +1,16 @@
#+title: Emacs — Packages — EXWM #+title: Emacs — Packages — EXWM (Deprecated)
#+setupfile: ../../headers #+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code #+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/exwm.el #+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/exwm.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export #+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* EXWM * EXWM (Deprecated)
#+html: ::: warning
This configuration of EXWM is no longer maintained and was deprecated
on May 24th, 2025. Therefore, it may not be up to date with the latest
versions of EXWM.
#+html: :::
So, Im finally slowly getting back to EXWM. I tried it a couple of So, Im finally slowly getting back to EXWM. I tried it a couple of
years ago, but that was with the SpacemacsOS layer on Spacemacs, on a years ago, but that was with the SpacemacsOS layer on Spacemacs, on a
laptop which got accidentally formatted before I could save my config laptop which got accidentally formatted before I could save my config

View File

@@ -18,34 +18,27 @@ variables to install grammars for different languages.
:hook ((bash-ts-mode c-ts-mode c++-ts-mode :hook ((bash-ts-mode c-ts-mode c++-ts-mode
html-ts-mode js-ts-mode typescript-ts-mode html-ts-mode js-ts-mode typescript-ts-mode
json-ts-mode rust-ts-mode tsx-ts-mode python-ts-mode json-ts-mode rust-ts-mode tsx-ts-mode python-ts-mode
css-ts-mode yaml-ts-mode) . lsp-deferred) css-ts-mode yaml-ts-mode) . lsp-deferred))
#+end_src
#+begin_src emacs-lisp
(use-package tree-sitter-langs
:after tree-sitter
:straight t
:custom (global-tree-sitter-mode t)
:init :init
(setq treesit-font-lock-level 4 (add-to-list 'treesit-extra-load-path
treesit-language-source-alist (expand-file-name "bin" tree-sitter-langs-grammar-dir)))
'((astro "https://github.com/virchau13/tree-sitter-astro")
(bash "https://github.com/tree-sitter/tree-sitter-bash") (use-package treesit-auto
(c "https://github.com/tree-sitter/tree-sitter-c") :after tree-sitter
(cmake "https://github.com/uyha/tree-sitter-cmake") :straight t
(common-lisp "https://github.com/theHamsta/tree-sitter-commonlisp") :config (global-treesit-auto-mode))
(cpp "https://github.com/tree-sitter/tree-sitter-cpp")
(css "https://github.com/tree-sitter/tree-sitter-css") (use-package treesit-fold
(csharp "https://github.com/tree-sitter/tree-sitter-c-sharp") :after tree-sitter
(elisp "https://github.com/Wilfred/tree-sitter-elisp") :straight (:build t :host github :repo "emacs-tree-sitter/treesit-fold")
(go "https://github.com/tree-sitter/tree-sitter-go") :config (treesit-fold-mode))
(go-mod "https://github.com/camdencheek/tree-sitter-go-mod")
(html "https://github.com/tree-sitter/tree-sitter-html")
(js ("https://github.com/tree-sitter/tree-sitter-javascript" "master" "src"))
(json "https://github.com/tree-sitter/tree-sitter-json")
(lua "https://github.com/Azganoth/tree-sitter-lua")
(make "https://github.com/alemuller/tree-sitter-make")
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
(python "https://github.com/tree-sitter/tree-sitter-python")
(r "https://github.com/r-lib/tree-sitter-r")
(rust "https://github.com/tree-sitter/tree-sitter-rust")
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml"))))
#+end_src #+end_src
*** Appwrite *** Appwrite
@@ -202,9 +195,18 @@ awesome!
(lsp-rust-analyzer-cargo-watch-command "clippy") (lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t) (lsp-eldoc-render-all t)
(lsp-idle-delay 0.6) (lsp-idle-delay 0.6)
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-use-plist t) (lsp-use-plist t)
(lsp-enable-indentation nil)
;; Bash
(lsp-bash-highlight-parsing-errors t)
;; Nix
;; Rust
(lsp-rust-analyzer-server-display-inlay-hints t)
;; ;; Vue configuration
(lsp-vetur-emmet "always")
(lsp-vetur-format-default-formatter-html "prettier")
:config :config
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]coverage\\'")
(lsp-register-client (lsp-register-client
(make-lsp-client :new-connection (lsp-tramp-connection "shellcheck") (make-lsp-client :new-connection (lsp-tramp-connection "shellcheck")
:major-modes '(sh-mode) :major-modes '(sh-mode)
@@ -306,42 +308,6 @@ that currently, ~dap-firefox~ and ~dap-chrome~ dont work correctly due to
:cwd nil)))) :cwd nil))))
#+end_src #+end_src
*** Langtool
LanguageTool is a great tool for catching typos and grammatical errors
in quite a few languages.
#+begin_src emacs-lisp
(use-package langtool
:defer t
:straight (:build t)
:commands (langtool-check
langtool-check-done
langtool-show-message-at-point
langtool-correct-buffer)
:custom
(langtool-default-language "en-US")
(langtool-mother-tongue "fr")
:config
(setq langtool-java-classpath (string-join '("/usr/share/languagetool"
"/usr/share/java/languagetool/*")
":")))
#+end_src
Finally, =writegood-mode= detects some simple general rules when writing
in English and can also calculate the Flesh-Kincaid levels of a
document.
#+begin_src emacs-lisp
(use-package writegood-mode
:defer t
:straight (:build t)
:hook org-mode latex-mode
:general
(phundrak/major-leader-key
:keymaps 'writegood-mode-map
"g" #'writegood-grade-level
"r" #'writegood-reading-ease))
#+end_src
**** TODO Auto detection of langtool java classpath :noexport:
** DSLs ** DSLs
DSLs, or /Domain Specific Languages/, are languages dedicated to some DSLs, or /Domain Specific Languages/, are languages dedicated to some
very tasks, such as configuration languages or non-general programming very tasks, such as configuration languages or non-general programming
@@ -650,6 +616,13 @@ Markdown.
:defer t) :defer t)
#+end_src #+end_src
#+begin_src emacs-lisp
(use-package nix-ts-mode
:mode "\\.nix\\'"
:straight (:build t)
:config (add-to-list 'major-mode-remap-alist '((nix-mode . nix-ts-mode))))
#+end_src
*** Nginx *** Nginx
Nginx is another webserver, older and more mature than Caddy. A couple Nginx is another webserver, older and more mature than Caddy. A couple
of packages are required in order to be able to properly work with of packages are required in order to be able to properly work with
@@ -720,6 +693,29 @@ or some I write myself.
org-plantuml-jar-path "~/.local/bin/plantuml.jar")) org-plantuml-jar-path "~/.local/bin/plantuml.jar"))
#+end_src #+end_src
*** QML
Im currently working on a [[https://quickshell.org/][Quickshell]] configuration to replace my
[[https://github.com/Alexays/Waybar][Waybar]] one. Quickshell is configured with [[https://doc.qt.io/qt-6/qmlapplications.html][QML]], which requires its
major mode.
#+begin_src emacs-lisp
(use-package qml-ts-mode
:after lsp-mode
:straight (qml-ts-mode :build t
:type git
:host github
:repo "xhcoding/qml-ts-mode")
:config
(add-to-list 'lsp-language-id-configuration '(qml-ts-mode . "qml-ts"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("qmlls" "-E"))
:activation-fn (lsp-activate-on "qml-ts")
:server-id 'qmlls))
(add-hook 'qml-ts-mode-hook (lambda ()
(setq-local electric-indent-chars '(?\n ?\( ?\) ?{ ?} ?\[ ?\] ?\; ?,))
(lsp-deferred))))
#+end_src
*** Ron files *** Ron files
Rusty Object Notation, or RON for short, is to Rust what Json is to Rusty Object Notation, or RON for short, is to Rust what Json is to
Javascript. Sometimes, I have to work with such files, which is why I Javascript. Sometimes, I have to work with such files, which is why I
@@ -1389,6 +1385,7 @@ languages in the same buffer, mainly HTML, CSS, and JavaScript.
("\\.svelte\\'" . web-mode) ("\\.svelte\\'" . web-mode)
("\\.ctp\\'" . web-mode) ("\\.ctp\\'" . web-mode)
("\\.djhtml\\'" . web-mode) ("\\.djhtml\\'" . web-mode)
("\\.ftl\\'" . web-mode)
("\\.vue\\'" . web-mode)) ("\\.vue\\'" . web-mode))
:config :config
(setopt web-mode-markup-indent-offset 2 (setopt web-mode-markup-indent-offset 2
@@ -1436,8 +1433,7 @@ Auto-completion for ~emmet-mode~, ~html-mode~, and ~web-mode~.
(use-package astro-ts-mode (use-package astro-ts-mode
:straight (:build t) :straight (:build t)
:defer t :defer t
:init :mode "\\.astro\\'")
(mapc #'treesit-install-language-grammar '(astro css tsx)))
#+end_src #+end_src
**** CSS **** CSS
@@ -1451,6 +1447,7 @@ Lets customize a bit the built-in CSS mode.
:hook (scss-mode . prettier-js-mode) :hook (scss-mode . prettier-js-mode)
:init :init
(put 'css-indent-offset 'safe-local-variable #'integerp) (put 'css-indent-offset 'safe-local-variable #'integerp)
:config (setopt css-indent-offset 2)
:general :general
(phundrak/major-leader-key (phundrak/major-leader-key
:keymaps 'css-mode-map :keymaps 'css-mode-map
@@ -1506,6 +1503,16 @@ activate when I open ~.less~ files by default. Lets fix that.
"l" '(:keymap lsp-command-map :which-key "lsp"))) "l" '(:keymap lsp-command-map :which-key "lsp")))
#+end_src #+end_src
I also use from time to time TailwindCSS. Lets add its LSP
configuration.
#+begin_src emacs-lisp
(use-package lsp-tailwindcss
:defer t
:after lsp
:init (setq lsp-tailwindcss-add-on-mode t)
:straight (:type git :host github :repo "merrickluo/lsp-tailwindcss"))
#+end_src
**** Javascript **** Javascript
~javascript-mode~ is meh at best, while ~rjsx-mode~ (Real JSX) is much ~javascript-mode~ is meh at best, while ~rjsx-mode~ (Real JSX) is much
better: it supports both JavaScript and ~.jsx~ files for React and better: it supports both JavaScript and ~.jsx~ files for React and
@@ -1562,15 +1569,14 @@ dont. Lets interact with NPM through Emacs then.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package npm-transient (use-package npm-transient
:defer t :defer t
:straight (npm-transient :build t :straight (:build t
:type git :type git
:host github :repo "labs.phundrak.com/phundrak/npm-transient.el")
:repo "Phundrak/npm-transient")) :general
;; :general (phundrak/major-leader-key
;; (phundrak/major-leader-key :packages '(npm-transient typescript-ts-mode web-mode)
;; :packages '(npm-transient rjsx-mode web-mode) :keymaps '(web-mode-map)
;; :keymaps '(rjsx-mode-map web-mode-map) "n" #'npm-transient))
;; "n" #'npm-transient))
#+end_src #+end_src
And finally, here is a formatter for JavaScript. And finally, here is a formatter for JavaScript.
@@ -1584,8 +1590,21 @@ And finally, here is a formatter for JavaScript.
(setq prettier-js-args '("--single-quote" "--jsx-single-quote"))) (setq prettier-js-args '("--single-quote" "--jsx-single-quote")))
#+end_src #+end_src
**** Typescript **** Json
Typescript is a safer alternative to JavaScript. Lets install its major mode then. My configuration for Json is quite short, Im just defaulting to
Emacs built-in tree-sitter mode for any =.json= file and reducing the
indentation to 2 spaces for any file using a mode from the built-in
package =js=.
#+begin_src emacs-lisp
(use-package js
:straight (:type built-in)
:mode ("\\.json\\'" . json-ts-mode)
:config (setopt js-indent-level 2))
#+end_src
**** TypeScript
TypeScript is a safer alternative to JavaScript. Lets install its major mode then.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package typescript-mode (use-package typescript-mode
:defer t :defer t
@@ -1652,7 +1671,12 @@ simplest fix is to run the following command:
#+begin_src sh #+begin_src sh
npm install --save-dev vue-tsc typescript npm install --save-dev vue-tsc typescript
#+end_src #+end_src
Or replace =npm= with whichever package manager you prefer. Or replace =npm= with whichever package manager you prefer.
If you want to work with Vue in Emacs, =web-mode= is more than enough If you want to work with Vue in Emacs, =web-mode= is more than enough
when paired with an LSP server. when paired with an LSP server.
With the Nix package manager, the Vue 3 LSP server is
=nodePackages."@vue/language-server"= and not =vue-language-server=. The
latter is for Vue 2.

4471
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,14 +11,14 @@
"license": "AGPL-3.0", "license": "AGPL-3.0",
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.14", "@vuepress/bundler-vite": "2.0.0-rc.26",
"@vuepress/plugin-umami-analytics": "2.0.0-rc.41", "@vuepress/plugin-slimsearch": "^2.0.0-rc.118",
"@vuepress/theme-default": "2.0.0-rc.41", "@vuepress/plugin-umami-analytics": "2.0.0-rc.118",
"vuepress": "2.0.0-rc.14", "@vuepress/theme-default": "2.0.0-rc.118",
"vuepress-plugin-search-pro": "2.0.0-rc.52" "vuepress": "2.0.0-rc.26"
}, },
"dependencies": { "dependencies": {
"less": "^4.2.0", "less": "^4.4.2",
"nord": "^0.2.1" "nord": "^0.2.1"
}, },
"scripts": { "scripts": {