mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
Compare commits
3 commits
58696bf2e5
...
bb1365d9a0
| Author | SHA1 | Date | |
|---|---|---|---|
| bb1365d9a0 | |||
| 1988105c35 | |||
| 0f72891f46 |
4 changed files with 230 additions and 127 deletions
171
.emacs.d/init.el
171
.emacs.d/init.el
|
|
@ -1793,6 +1793,27 @@ targets."
|
||||||
(with-eval-after-load 'lsp-mode
|
(with-eval-after-load 'lsp-mode
|
||||||
(advice-add 'lsp--progress-status :override #'my/lsp--progress-status))
|
(advice-add 'lsp--progress-status :override #'my/lsp--progress-status))
|
||||||
|
|
||||||
|
(setq my/lsp--vue-diagnostics-last-update (make-hash-table :test #'equal))
|
||||||
|
|
||||||
|
(defun my/lsp--on-diagnostics (fn workspace params)
|
||||||
|
(if (equal (gethash 'vue-semantic-server lsp-clients)
|
||||||
|
(lsp--workspace-client workspace))
|
||||||
|
(progn
|
||||||
|
(let* ((is-empty (seq-empty-p (gethash "diagnostics" params)))
|
||||||
|
(uri (gethash "uri" params))
|
||||||
|
(last-update (gethash uri my/lsp--vue-diagnostics-last-update))
|
||||||
|
(current-update (time-convert nil #'integer)))
|
||||||
|
(unless is-empty
|
||||||
|
(puthash uri current-update my/lsp--vue-diagnostics-last-update))
|
||||||
|
(when (or (not is-empty)
|
||||||
|
(not last-update)
|
||||||
|
(> (- current-update (or last-update 0)) 5))
|
||||||
|
(funcall fn workspace params))))
|
||||||
|
(funcall fn workspace params)))
|
||||||
|
|
||||||
|
(with-eval-after-load 'lsp
|
||||||
|
(advice-add #'lsp--on-diagnostics :around #'my/lsp--on-diagnostics))
|
||||||
|
|
||||||
(use-package flycheck
|
(use-package flycheck
|
||||||
:straight t
|
:straight t
|
||||||
:config
|
:config
|
||||||
|
|
@ -2315,6 +2336,10 @@ Returns (<buffer> . <workspace-index>) or nil."
|
||||||
(add-hook 'web-mode-hook 'smartparens-mode)
|
(add-hook 'web-mode-hook 'smartparens-mode)
|
||||||
(add-hook 'web-mode-hook 'hs-minor-mode)
|
(add-hook 'web-mode-hook 'hs-minor-mode)
|
||||||
(my/set-smartparens-indent 'web-mode)
|
(my/set-smartparens-indent 'web-mode)
|
||||||
|
(with-eval-after-load 'editorconfig
|
||||||
|
(push
|
||||||
|
'standard-indent
|
||||||
|
(alist-get 'web-mode editorconfig-indentation-alist)))
|
||||||
(setq web-mode-auto-pairs nil))
|
(setq web-mode-auto-pairs nil))
|
||||||
|
|
||||||
(setq my/web-mode-lsp-extensions
|
(setq my/web-mode-lsp-extensions
|
||||||
|
|
@ -3432,7 +3457,7 @@ With ARG, repeats or can move backward if negative."
|
||||||
(mapcar (lambda (file)
|
(mapcar (lambda (file)
|
||||||
(string-replace (concat org-directory "/") "" file)))
|
(string-replace (concat org-directory "/") "" file)))
|
||||||
(append
|
(append
|
||||||
'("inbox.org" "contacts.org")))))
|
'("inbox.org" "contacts.org" "recurring.org")))))
|
||||||
(find-file
|
(find-file
|
||||||
(concat org-directory "/"
|
(concat org-directory "/"
|
||||||
(completing-read "Org file: " files)))))
|
(completing-read "Org file: " files)))))
|
||||||
|
|
@ -3849,7 +3874,9 @@ With ARG, repeats or can move backward if negative."
|
||||||
|
|
||||||
(use-package org-attach-screenshot
|
(use-package org-attach-screenshot
|
||||||
:commands (org-attach-screenshot)
|
:commands (org-attach-screenshot)
|
||||||
:straight t)
|
:straight t
|
||||||
|
:config
|
||||||
|
(setq org-attach-screenshot-auto-refresh 'never))
|
||||||
|
|
||||||
(use-package org-transclusion
|
(use-package org-transclusion
|
||||||
:after org
|
:after org
|
||||||
|
|
@ -5894,6 +5921,24 @@ Happened to the world:
|
||||||
(start-process "dired-open" nil
|
(start-process "dired-open" nil
|
||||||
"xdg-open" (file-truename file)))))
|
"xdg-open" (file-truename file)))))
|
||||||
|
|
||||||
|
(defun my/dired-do-async-shell-command (command &optional arg file-list)
|
||||||
|
(interactive
|
||||||
|
(let ((files (dired-get-marked-files t current-prefix-arg nil nil t)))
|
||||||
|
(list
|
||||||
|
;; Want to give feedback whether this file or marked files are used:
|
||||||
|
(dired-read-shell-command "& on %s: " current-prefix-arg files)
|
||||||
|
current-prefix-arg
|
||||||
|
files)))
|
||||||
|
(start-process-shell-command
|
||||||
|
"*Dired Command*" nil
|
||||||
|
(dired-shell-stuff-it command file-list arg)))
|
||||||
|
|
||||||
|
(with-eval-after-load 'dired
|
||||||
|
(general-define-key
|
||||||
|
:states '(normal insert)
|
||||||
|
:keymaps '(dired-mode-map)
|
||||||
|
"&" #'my/dired-do-async-shell-command))
|
||||||
|
|
||||||
(defun my/dired-bookmark-open ()
|
(defun my/dired-bookmark-open ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((bookmarks
|
(let ((bookmarks
|
||||||
|
|
@ -6006,7 +6051,7 @@ Happened to the world:
|
||||||
(user-error "No (non-directory) files selected"))
|
(user-error "No (non-directory) files selected"))
|
||||||
(with-current-buffer mastodon-buffer
|
(with-current-buffer mastodon-buffer
|
||||||
(dolist (file files)
|
(dolist (file files)
|
||||||
(mastodon-toot--attach-media
|
(mastodon-toot-attach-media
|
||||||
file
|
file
|
||||||
(read-from-minibuffer (format "Description for %s: " file))))))
|
(read-from-minibuffer (format "Description for %s: " file))))))
|
||||||
|
|
||||||
|
|
@ -7477,15 +7522,15 @@ by the `my/elfeed-youtube-subtitles' function."
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:states '(normal motion)
|
:states '(normal motion)
|
||||||
:keymaps '(mastodon-mode-map)
|
:keymaps '(mastodon-mode-map)
|
||||||
"J" #'mastodon-tl--goto-next-item
|
"J" #'mastodon-tl-goto-next-item
|
||||||
"K" #'mastodon-tl--goto-prev-item
|
"K" #'mastodon-tl-goto-prev-item
|
||||||
"M-j" #'mastodon-tl--next-tab-item
|
"M-j" #'mastodon-tl-next-tab-item
|
||||||
"M-k" #'mastodon-tl--prev-tab-item
|
"M-k" #'mastodon-tl-prev-tab-item
|
||||||
"<tab>" #'mastodon-tl--next-tab-item
|
"<tab>" #'mastodon-tl-next-tab-item
|
||||||
"<backtab>" #'mastodon-tl--previous-tab-item
|
"<backtab>" #'mastodon-tl-previous-tab-item
|
||||||
"o" #'my/mastodon-toot
|
"o" #'my/mastodon-toot
|
||||||
"r" 'mastodon-tl--update
|
"r" 'mastodon-tl-update
|
||||||
"c" #'mastodon-tl--toggle-spoiler-text-in-toot
|
"c" #'mastodon-tl-toggle-spoiler-text-in-toot
|
||||||
"q" #'kill-current-buffer))
|
"q" #'kill-current-buffer))
|
||||||
|
|
||||||
(defvar my/mastodon-mode-string "")
|
(defvar my/mastodon-mode-string "")
|
||||||
|
|
@ -7621,11 +7666,11 @@ by the `my/elfeed-youtube-subtitles' function."
|
||||||
(my/mastodon-tl--get-home
|
(my/mastodon-tl--get-home
|
||||||
(seq-contains-p args "--hide-replies")
|
(seq-contains-p args "--hide-replies")
|
||||||
(seq-contains-p args "--hide-boosts"))))
|
(seq-contains-p args "--hide-boosts"))))
|
||||||
("l" "Local" mastodon-tl--get-local-timeline)
|
("l" "Local" mastodon-tl-get-local-timeline)
|
||||||
("f" "Federated" mastodon-tl--get-federated-timeline)
|
("f" "Federated" mastodon-tl-get-federated-timeline)
|
||||||
("g" "One tag" mastodon-tl--get-tag-timeline)
|
("g" "One tag" mastodon-tl-get-tag-timeline)
|
||||||
("a" "Followed tags" mastodon-tl--followed-tags-timeline)
|
("a" "Followed tags" mastodon-tl-followed-tags-timeline)
|
||||||
("s" "Some followed tags" mastodon-tl--some-followed-tags-timeline)]
|
("s" "Some followed tags" mastodon-tl-some-followed-tags-timeline)]
|
||||||
["Misc"
|
["Misc"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("q" "Quit" transient-quit-one)]))
|
("q" "Quit" transient-quit-one)]))
|
||||||
|
|
@ -7639,26 +7684,26 @@ by the `my/elfeed-youtube-subtitles' function."
|
||||||
("m" "Mastodon" mastodon)
|
("m" "Mastodon" mastodon)
|
||||||
("t" "Timelines" my/mastodon-tl)
|
("t" "Timelines" my/mastodon-tl)
|
||||||
("n" "Notifications" mastodon-notifications-get)
|
("n" "Notifications" mastodon-notifications-get)
|
||||||
("s" "Search query" mastodon-search--query)]
|
("s" "Search query" mastodon-search-query)]
|
||||||
["Tags"
|
["Tags"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("aa" "Followed tags" mastodon-tl--list-followed-tags)
|
("aa" "Followed tags" mastodon-tl-list-followed-tags)
|
||||||
("af" "Follow tag" mastodon-tl--follow-tag)
|
("af" "Follow tag" mastodon-tl-follow-tag)
|
||||||
("aF" "Unfollow tag" mastodon-tl--unfollow-tag)]
|
("aF" "Unfollow tag" mastodon-tl-unfollow-tag)]
|
||||||
["Own profile"
|
["Own profile"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("c" "Toot" mastodon-toot)
|
("c" "Toot" mastodon-toot)
|
||||||
("o" "My profile" mastodon-profile--my-profile)
|
("o" "My profile" mastodon-profile-my-profile)
|
||||||
("u" "Update profile note" mastodon-profile--update-user-profile-note)
|
("u" "Update profile note" mastodon-profile-update-user-profile-note)
|
||||||
("f" "Favourites" mastodon-profile--view-favourites)
|
("f" "Favourites" mastodon-profile-view-favourites)
|
||||||
("b" "Bookmarks" mastodon-profile--view-bookmarks)]
|
("b" "Bookmarks" mastodon-profile-view-bookmarks)]
|
||||||
["Minor views"
|
["Minor views"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("F" "Follow requests" mastodon-views--view-follow-requests)
|
("F" "Follow requests" mastodon-views-view-follow-requests)
|
||||||
("S" "Scheduled toots" mastodon-views--view-scheduled-toots)
|
("S" "Scheduled toots" mastodon-views-view-scheduled-toots)
|
||||||
("I" "Filters" mastodon-views--view-filters)
|
("I" "Filters" mastodon-views-view-filters)
|
||||||
("G" "Follow suggestions" mastodon-views--view-follow-suggestions)
|
("G" "Follow suggestions" mastodon-views-view-follow-suggestions)
|
||||||
("L" "Lists" mastodon-views--view-lists)]
|
("L" "Lists" mastodon-views-view-lists)]
|
||||||
["Misc"
|
["Misc"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("/" "Switch to buffer" mastodon-switch-to-buffer)
|
("/" "Switch to buffer" mastodon-switch-to-buffer)
|
||||||
|
|
@ -7684,53 +7729,53 @@ base toot."
|
||||||
(browse-url url)))
|
(browse-url url)))
|
||||||
|
|
||||||
(with-eval-after-load 'mastodon
|
(with-eval-after-load 'mastodon
|
||||||
(my/def-confirmer mastodon-toot--toggle-boost "Toggle boost for this post? ")
|
(my/def-confirmer mastodon-toot-toggle-boost "Toggle boost for this post? ")
|
||||||
(my/def-confirmer mastodon-toot--toggle-favourite "Toggle favourite this post? ")
|
(my/def-confirmer mastodon-toot-toggle-favourite "Toggle favourite this post? ")
|
||||||
(my/def-confirmer mastodon-toot--toggle-bookmark "Toggle bookmark this post? ")
|
(my/def-confirmer mastodon-toot-toggle-bookmark "Toggle bookmark this post? ")
|
||||||
(my/def-confirmer mastodon-tl--follow-user "Follow this user? ")
|
(my/def-confirmer mastodon-tl-follow-user "Follow this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unfollow-user "Unfollow this user? ")
|
(my/def-confirmer mastodon-tl-unfollow-user "Unfollow this user? ")
|
||||||
(my/def-confirmer mastodon-tl--block-user "Block this user? ")
|
(my/def-confirmer mastodon-tl-block-user "Block this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unblock-user "Unblock this user? ")
|
(my/def-confirmer mastodon-tl-unblock-user "Unblock this user? ")
|
||||||
(my/def-confirmer mastodon-tl--mute-user "Mute this user? ")
|
(my/def-confirmer mastodon-tl-mute-user "Mute this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unmute-user "Unmute this user? ")
|
(my/def-confirmer mastodon-tl-unmute-user "Unmute this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unmute-user "Unmute this user? ")
|
(my/def-confirmer mastodon-tl-unmute-user "Unmute this user? ")
|
||||||
|
|
||||||
(transient-define-prefix my/mastodon-toot ()
|
(transient-define-prefix my/mastodon-toot ()
|
||||||
"Mastodon toot actions."
|
"Mastodon toot actions."
|
||||||
["View"
|
["View"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("o" "Thread" mastodon-tl--thread)
|
("o" "Thread" mastodon-tl-thread)
|
||||||
("w" "Browser" my/mastodon-toot--browse)
|
("w" "Browser" my/mastodon-toot--browse)
|
||||||
("le" "List edits" mastodon-toot--view-toot-edits)
|
("le" "List edits" mastodon-toot-view-toot-edits)
|
||||||
("lf" "List favouriters" mastodon-toot--list-favouriters)
|
("lf" "List favouriters" mastodon-toot-list-favouriters)
|
||||||
("lb" "List boosters" mastodon-toot--list-boosters)]
|
("lb" "List boosters" mastodon-toot-list-boosters)]
|
||||||
["Toot Actions"
|
["Toot Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("r" "Reply" mastodon-toot--reply)
|
("r" "Reply" mastodon-toot-reply)
|
||||||
("v" "Vote" mastodon-tl--poll-vote)
|
("v" "Vote" mastodon-tl-poll-vote)
|
||||||
("b" "Boost" my/mastodon-toot--toggle-boost-confirm)
|
("b" "Boost" my/mastodon-toot--toggle-boost-confirm)
|
||||||
("f" "Favourite" my/mastodon-toot--toggle-favourite-confirm)
|
("f" "Favourite" my/mastodon-toot--toggle-favourite-confirm)
|
||||||
("k" "Bookmark" my/mastodon-toot--toggle-bookmark-confirm)]
|
("k" "Bookmark" my/mastodon-toot--toggle-bookmark-confirm)]
|
||||||
["My Toot Actions"
|
["My Toot Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("md" "Delete" mastodon-toot--delete-toot)
|
("md" "Delete" mastodon-toot-delete-toot)
|
||||||
("mD" "Delete and redraft" mastodon-toot--delete-and-redraft-toot)
|
("mD" "Delete and redraft" mastodon-toot-delete-and-redraft-toot)
|
||||||
("mp" "Pin" mastodon-toot--pin-toot-toggle)
|
("mp" "Pin" mastodon-toot-pin-toot-toggle)
|
||||||
("me" "Edit" mastodon-toot--edit-toot-at-point)]
|
("me" "Edit" mastodon-toot-edit-toot-at-point)]
|
||||||
["Profile Actions"
|
["Profile Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("pp" "Profile" mastodon-profile--show-user)
|
("pp" "Profile" mastodon-profile-show-user)
|
||||||
("pf" "List followers" mastodon-profile--open-followers)
|
("pf" "List followers" mastodon-profile-open-followers)
|
||||||
("pF" "List following" mastodon-profile--open-following)
|
("pF" "List following" mastodon-profile-open-following)
|
||||||
("ps" "List statues (no reblogs)" mastodon-profile--open-statuses-no-reblogs)]
|
("ps" "List statues (no reblogs)" mastodon-profile-open-statuses-no-reblogs)]
|
||||||
["User Actions"
|
["User Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("uf" "Follow user" my/mastodon-tl--follow-user-confirm)
|
("uf" "Follow user" my/mastodon-tl-follow-user-confirm)
|
||||||
("uF" "Unfollow user" my/mastodon-tl--unfollow-user-confirm)
|
("uF" "Unfollow user" my/mastodon-tl-unfollow-user-confirm)
|
||||||
("ub" "Block user" my/mastodon-tl--block-user-confirm)
|
("ub" "Block user" my/mastodon-tl-block-user-confirm)
|
||||||
("uB" "Unblock user" my/mastodon-tl--unblock-user-confirm)
|
("uB" "Unblock user" my/mastodon-tl-unblock-user-confirm)
|
||||||
("um" "Mute user" my/mastodon-tl--mute-user-confirm)
|
("um" "Mute user" my/mastodon-tl-mute-user-confirm)
|
||||||
("uB" "Unmute user" my/mastodon-tl--unmute-user-confirm)]
|
("uB" "Unmute user" my/mastodon-tl-unmute-user-confirm)]
|
||||||
["Misc"
|
["Misc"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("q" "Quit" transient-quit-one)]))
|
("q" "Quit" transient-quit-one)]))
|
||||||
|
|
@ -7916,7 +7961,8 @@ base toot."
|
||||||
(telega-button-active :foreground (my/color-value 'base0)
|
(telega-button-active :foreground (my/color-value 'base0)
|
||||||
:background (my/color-value 'cyan))
|
:background (my/color-value 'cyan))
|
||||||
(telega-webpage-chat-link :foreground (my/color-value 'base0)
|
(telega-webpage-chat-link :foreground (my/color-value 'base0)
|
||||||
:background (my/color-value 'fg)))
|
:background (my/color-value 'fg))
|
||||||
|
(telega-entity-type-spoiler :background (my/color-value 'base8)))
|
||||||
:config
|
:config
|
||||||
(when (file-exists-p "~/.guix-extra-profiles/emacs/emacs/bin/telega-server")
|
(when (file-exists-p "~/.guix-extra-profiles/emacs/emacs/bin/telega-server")
|
||||||
(setq telega-server-command
|
(setq telega-server-command
|
||||||
|
|
@ -7925,6 +7971,7 @@ base toot."
|
||||||
(setq telega-emoji-use-images nil)
|
(setq telega-emoji-use-images nil)
|
||||||
(setq telega-chat-fill-column 80)
|
(setq telega-chat-fill-column 80)
|
||||||
(setq telega-completing-read-function #'completing-read)
|
(setq telega-completing-read-function #'completing-read)
|
||||||
|
(setq telega-sticker-size '(12 . 24))
|
||||||
(add-to-list 'savehist-additional-variables 'telega-msg-add-reaction)
|
(add-to-list 'savehist-additional-variables 'telega-msg-add-reaction)
|
||||||
(remove-hook 'telega-chat-mode-hook #'telega-chat-auto-fill-mode)
|
(remove-hook 'telega-chat-mode-hook #'telega-chat-auto-fill-mode)
|
||||||
(general-define-key
|
(general-define-key
|
||||||
|
|
@ -8211,8 +8258,8 @@ base toot."
|
||||||
"qwen2.5:32b" "qwen2.5-coder:32b"
|
"qwen2.5:32b" "qwen2.5-coder:32b"
|
||||||
"eva-qwen2.5-q4_k_l-32b:latest"
|
"eva-qwen2.5-q4_k_l-32b:latest"
|
||||||
"t-pro-1.0-q4_k_m:latest"
|
"t-pro-1.0-q4_k_m:latest"
|
||||||
"t-lite-it-1.0-q4_k_m:latest"
|
"qwq:32b"
|
||||||
(llava-phi3:latest
|
(gemma3:32b
|
||||||
:capabilities (media)
|
:capabilities (media)
|
||||||
:mime-types ("image/jpeg" "image/png")))))
|
:mime-types ("image/jpeg" "image/png")))))
|
||||||
(gptel-make-openai "OpenRouter"
|
(gptel-make-openai "OpenRouter"
|
||||||
|
|
|
||||||
2
.github/workflows/update-site.yml
vendored
2
.github/workflows/update-site.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
jobs:
|
jobs:
|
||||||
trigger_update:
|
trigger_update:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger site update
|
- name: Trigger site update
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
Корытов Павел
|
Корытов Павел
|
||||||
|
|
||||||
Best regards,
|
Best regards,
|
||||||
Korytov Pavel
|
Pavel Korytov
|
||||||
|
|
|
||||||
182
Emacs.org
182
Emacs.org
|
|
@ -2720,6 +2720,33 @@ I don't like how some language servers print the full filename in the progress i
|
||||||
(with-eval-after-load 'lsp-mode
|
(with-eval-after-load 'lsp-mode
|
||||||
(advice-add 'lsp--progress-status :override #'my/lsp--progress-status))
|
(advice-add 'lsp--progress-status :override #'my/lsp--progress-status))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
**** Fix vue-semantic-server
|
||||||
|
Somehow, for me [[https://github.com/vuejs/language-tools][vue-semantic-server]] sends an empty =textDocument/publishDiagnostics= message a second or two after the real one, causing the diagnostics to disappear.
|
||||||
|
|
||||||
|
For now, I've advised this away by ignoring empty messages unless they show up more than 5 seconds after a non-empty message.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq my/lsp--vue-diagnostics-last-update (make-hash-table :test #'equal))
|
||||||
|
|
||||||
|
(defun my/lsp--on-diagnostics (fn workspace params)
|
||||||
|
(if (equal (gethash 'vue-semantic-server lsp-clients)
|
||||||
|
(lsp--workspace-client workspace))
|
||||||
|
(progn
|
||||||
|
(let* ((is-empty (seq-empty-p (gethash "diagnostics" params)))
|
||||||
|
(uri (gethash "uri" params))
|
||||||
|
(last-update (gethash uri my/lsp--vue-diagnostics-last-update))
|
||||||
|
(current-update (time-convert nil #'integer)))
|
||||||
|
(unless is-empty
|
||||||
|
(puthash uri current-update my/lsp--vue-diagnostics-last-update))
|
||||||
|
(when (or (not is-empty)
|
||||||
|
(not last-update)
|
||||||
|
(> (- current-update (or last-update 0)) 5))
|
||||||
|
(funcall fn workspace params))))
|
||||||
|
(funcall fn workspace params)))
|
||||||
|
|
||||||
|
(with-eval-after-load 'lsp
|
||||||
|
(advice-add #'lsp--on-diagnostics :around #'my/lsp--on-diagnostics))
|
||||||
|
#+end_src
|
||||||
*** Flycheck
|
*** Flycheck
|
||||||
A syntax checking extension for Emacs. Integrates with LSP-mode, but can also use various standalone checkers.
|
A syntax checking extension for Emacs. Integrates with LSP-mode, but can also use various standalone checkers.
|
||||||
|
|
||||||
|
|
@ -3254,7 +3281,7 @@ A general-purpose package to run formatters on files. While the most popular for
|
||||||
** Web development
|
** Web development
|
||||||
Configs for various web development technologies I'm using.
|
Configs for various web development technologies I'm using.
|
||||||
*** Emmet
|
*** Emmet
|
||||||
[[https://emmet.io/][Emmet]] is a toolkit which greatly speeds up typing HTML & CSS.
|
[[Https://emmet.io/][Emmet]] is a toolkit which greatly speeds up typing HTML & CSS.
|
||||||
|
|
||||||
| Type | Note |
|
| Type | Note |
|
||||||
|------+---------------------------------------------------|
|
|------+---------------------------------------------------|
|
||||||
|
|
@ -3395,6 +3422,10 @@ Set =web-mode-auto-pairs= not =nil= because smartparens already fulfills that ro
|
||||||
(add-hook 'web-mode-hook 'smartparens-mode)
|
(add-hook 'web-mode-hook 'smartparens-mode)
|
||||||
(add-hook 'web-mode-hook 'hs-minor-mode)
|
(add-hook 'web-mode-hook 'hs-minor-mode)
|
||||||
(my/set-smartparens-indent 'web-mode)
|
(my/set-smartparens-indent 'web-mode)
|
||||||
|
(with-eval-after-load 'editorconfig
|
||||||
|
(push
|
||||||
|
'standard-indent
|
||||||
|
(alist-get 'web-mode editorconfig-indentation-alist)))
|
||||||
(setq web-mode-auto-pairs nil))
|
(setq web-mode-auto-pairs nil))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -4752,7 +4783,7 @@ A function to open a file from =org-directory=, excluding a few directories like
|
||||||
(mapcar (lambda (file)
|
(mapcar (lambda (file)
|
||||||
(string-replace (concat org-directory "/") "" file)))
|
(string-replace (concat org-directory "/") "" file)))
|
||||||
(append
|
(append
|
||||||
'("inbox.org" "contacts.org")))))
|
'("inbox.org" "contacts.org" "recurring.org")))))
|
||||||
(find-file
|
(find-file
|
||||||
(concat org-directory "/"
|
(concat org-directory "/"
|
||||||
(completing-read "Org file: " files)))))
|
(completing-read "Org file: " files)))))
|
||||||
|
|
@ -5356,7 +5387,9 @@ A nice package to make screenshots and insert them to the Org document.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org-attach-screenshot
|
(use-package org-attach-screenshot
|
||||||
:commands (org-attach-screenshot)
|
:commands (org-attach-screenshot)
|
||||||
:straight t)
|
:straight t
|
||||||
|
:config
|
||||||
|
(setq org-attach-screenshot-auto-refresh 'never))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Transclusion
|
*** Transclusion
|
||||||
A package that implements transclusions in Org Mode, i.e. rendering part of one file inside another file.
|
A package that implements transclusions in Org Mode, i.e. rendering part of one file inside another file.
|
||||||
|
|
@ -8122,6 +8155,28 @@ Open a file with =xdg-open=. I used =dired-open= for this before, but I've had t
|
||||||
"xdg-open" (file-truename file)))))
|
"xdg-open" (file-truename file)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Run a command on the marked files. Unlike =dired-do-async-shell-command=, this uses =start-process= instead of =shell-command=, which prevents the output buffer from popping up.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun my/dired-do-async-shell-command (command &optional arg file-list)
|
||||||
|
(interactive
|
||||||
|
(let ((files (dired-get-marked-files t current-prefix-arg nil nil t)))
|
||||||
|
(list
|
||||||
|
;; Want to give feedback whether this file or marked files are used:
|
||||||
|
(dired-read-shell-command "& on %s: " current-prefix-arg files)
|
||||||
|
current-prefix-arg
|
||||||
|
files)))
|
||||||
|
(start-process-shell-command
|
||||||
|
"*Dired Command*" nil
|
||||||
|
(dired-shell-stuff-it command file-list arg)))
|
||||||
|
|
||||||
|
(with-eval-after-load 'dired
|
||||||
|
(general-define-key
|
||||||
|
:states '(normal insert)
|
||||||
|
:keymaps '(dired-mode-map)
|
||||||
|
"&" #'my/dired-do-async-shell-command))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** Bookmarks
|
*** Bookmarks
|
||||||
A simple bookmark list for Dired, mainly to use with TRAMP. I may look into a proper bookmarking system later.
|
A simple bookmark list for Dired, mainly to use with TRAMP. I may look into a proper bookmarking system later.
|
||||||
|
|
||||||
|
|
@ -8269,7 +8324,7 @@ Attach files to mastodon.
|
||||||
(user-error "No (non-directory) files selected"))
|
(user-error "No (non-directory) files selected"))
|
||||||
(with-current-buffer mastodon-buffer
|
(with-current-buffer mastodon-buffer
|
||||||
(dolist (file files)
|
(dolist (file files)
|
||||||
(mastodon-toot--attach-media
|
(mastodon-toot-attach-media
|
||||||
file
|
file
|
||||||
(read-from-minibuffer (format "Description for %s: " file))))))
|
(read-from-minibuffer (format "Description for %s: " file))))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -10328,15 +10383,15 @@ The package also doesn't have evil bindings. I implement a few basic bindings he
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:states '(normal motion)
|
:states '(normal motion)
|
||||||
:keymaps '(mastodon-mode-map)
|
:keymaps '(mastodon-mode-map)
|
||||||
"J" #'mastodon-tl--goto-next-item
|
"J" #'mastodon-tl-goto-next-item
|
||||||
"K" #'mastodon-tl--goto-prev-item
|
"K" #'mastodon-tl-goto-prev-item
|
||||||
"M-j" #'mastodon-tl--next-tab-item
|
"M-j" #'mastodon-tl-next-tab-item
|
||||||
"M-k" #'mastodon-tl--prev-tab-item
|
"M-k" #'mastodon-tl-prev-tab-item
|
||||||
"<tab>" #'mastodon-tl--next-tab-item
|
"<tab>" #'mastodon-tl-next-tab-item
|
||||||
"<backtab>" #'mastodon-tl--previous-tab-item
|
"<backtab>" #'mastodon-tl-previous-tab-item
|
||||||
"o" #'my/mastodon-toot
|
"o" #'my/mastodon-toot
|
||||||
"r" 'mastodon-tl--update
|
"r" 'mastodon-tl-update
|
||||||
"c" #'mastodon-tl--toggle-spoiler-text-in-toot
|
"c" #'mastodon-tl-toggle-spoiler-text-in-toot
|
||||||
"q" #'kill-current-buffer))
|
"q" #'kill-current-buffer))
|
||||||
#+end_src
|
#+end_src
|
||||||
**** Modeline segment
|
**** Modeline segment
|
||||||
|
|
@ -10489,11 +10544,11 @@ And a transient to use it.
|
||||||
(my/mastodon-tl--get-home
|
(my/mastodon-tl--get-home
|
||||||
(seq-contains-p args "--hide-replies")
|
(seq-contains-p args "--hide-replies")
|
||||||
(seq-contains-p args "--hide-boosts"))))
|
(seq-contains-p args "--hide-boosts"))))
|
||||||
("l" "Local" mastodon-tl--get-local-timeline)
|
("l" "Local" mastodon-tl-get-local-timeline)
|
||||||
("f" "Federated" mastodon-tl--get-federated-timeline)
|
("f" "Federated" mastodon-tl-get-federated-timeline)
|
||||||
("g" "One tag" mastodon-tl--get-tag-timeline)
|
("g" "One tag" mastodon-tl-get-tag-timeline)
|
||||||
("a" "Followed tags" mastodon-tl--followed-tags-timeline)
|
("a" "Followed tags" mastodon-tl-followed-tags-timeline)
|
||||||
("s" "Some followed tags" mastodon-tl--some-followed-tags-timeline)]
|
("s" "Some followed tags" mastodon-tl-some-followed-tags-timeline)]
|
||||||
["Misc"
|
["Misc"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("q" "Quit" transient-quit-one)]))
|
("q" "Quit" transient-quit-one)]))
|
||||||
|
|
@ -10513,26 +10568,26 @@ The first dispatches "general" actions:
|
||||||
("m" "Mastodon" mastodon)
|
("m" "Mastodon" mastodon)
|
||||||
("t" "Timelines" my/mastodon-tl)
|
("t" "Timelines" my/mastodon-tl)
|
||||||
("n" "Notifications" mastodon-notifications-get)
|
("n" "Notifications" mastodon-notifications-get)
|
||||||
("s" "Search query" mastodon-search--query)]
|
("s" "Search query" mastodon-search-query)]
|
||||||
["Tags"
|
["Tags"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("aa" "Followed tags" mastodon-tl--list-followed-tags)
|
("aa" "Followed tags" mastodon-tl-list-followed-tags)
|
||||||
("af" "Follow tag" mastodon-tl--follow-tag)
|
("af" "Follow tag" mastodon-tl-follow-tag)
|
||||||
("aF" "Unfollow tag" mastodon-tl--unfollow-tag)]
|
("aF" "Unfollow tag" mastodon-tl-unfollow-tag)]
|
||||||
["Own profile"
|
["Own profile"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("c" "Toot" mastodon-toot)
|
("c" "Toot" mastodon-toot)
|
||||||
("o" "My profile" mastodon-profile--my-profile)
|
("o" "My profile" mastodon-profile-my-profile)
|
||||||
("u" "Update profile note" mastodon-profile--update-user-profile-note)
|
("u" "Update profile note" mastodon-profile-update-user-profile-note)
|
||||||
("f" "Favourites" mastodon-profile--view-favourites)
|
("f" "Favourites" mastodon-profile-view-favourites)
|
||||||
("b" "Bookmarks" mastodon-profile--view-bookmarks)]
|
("b" "Bookmarks" mastodon-profile-view-bookmarks)]
|
||||||
["Minor views"
|
["Minor views"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("F" "Follow requests" mastodon-views--view-follow-requests)
|
("F" "Follow requests" mastodon-views-view-follow-requests)
|
||||||
("S" "Scheduled toots" mastodon-views--view-scheduled-toots)
|
("S" "Scheduled toots" mastodon-views-view-scheduled-toots)
|
||||||
("I" "Filters" mastodon-views--view-filters)
|
("I" "Filters" mastodon-views-view-filters)
|
||||||
("G" "Follow suggestions" mastodon-views--view-follow-suggestions)
|
("G" "Follow suggestions" mastodon-views-view-follow-suggestions)
|
||||||
("L" "Lists" mastodon-views--view-lists)]
|
("L" "Lists" mastodon-views-view-lists)]
|
||||||
["Misc"
|
["Misc"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("/" "Switch to buffer" mastodon-switch-to-buffer)
|
("/" "Switch to buffer" mastodon-switch-to-buffer)
|
||||||
|
|
@ -10569,53 +10624,53 @@ base toot."
|
||||||
And the prefix itself:
|
And the prefix itself:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(with-eval-after-load 'mastodon
|
(with-eval-after-load 'mastodon
|
||||||
(my/def-confirmer mastodon-toot--toggle-boost "Toggle boost for this post? ")
|
(my/def-confirmer mastodon-toot-toggle-boost "Toggle boost for this post? ")
|
||||||
(my/def-confirmer mastodon-toot--toggle-favourite "Toggle favourite this post? ")
|
(my/def-confirmer mastodon-toot-toggle-favourite "Toggle favourite this post? ")
|
||||||
(my/def-confirmer mastodon-toot--toggle-bookmark "Toggle bookmark this post? ")
|
(my/def-confirmer mastodon-toot-toggle-bookmark "Toggle bookmark this post? ")
|
||||||
(my/def-confirmer mastodon-tl--follow-user "Follow this user? ")
|
(my/def-confirmer mastodon-tl-follow-user "Follow this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unfollow-user "Unfollow this user? ")
|
(my/def-confirmer mastodon-tl-unfollow-user "Unfollow this user? ")
|
||||||
(my/def-confirmer mastodon-tl--block-user "Block this user? ")
|
(my/def-confirmer mastodon-tl-block-user "Block this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unblock-user "Unblock this user? ")
|
(my/def-confirmer mastodon-tl-unblock-user "Unblock this user? ")
|
||||||
(my/def-confirmer mastodon-tl--mute-user "Mute this user? ")
|
(my/def-confirmer mastodon-tl-mute-user "Mute this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unmute-user "Unmute this user? ")
|
(my/def-confirmer mastodon-tl-unmute-user "Unmute this user? ")
|
||||||
(my/def-confirmer mastodon-tl--unmute-user "Unmute this user? ")
|
(my/def-confirmer mastodon-tl-unmute-user "Unmute this user? ")
|
||||||
|
|
||||||
(transient-define-prefix my/mastodon-toot ()
|
(transient-define-prefix my/mastodon-toot ()
|
||||||
"Mastodon toot actions."
|
"Mastodon toot actions."
|
||||||
["View"
|
["View"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("o" "Thread" mastodon-tl--thread)
|
("o" "Thread" mastodon-tl-thread)
|
||||||
("w" "Browser" my/mastodon-toot--browse)
|
("w" "Browser" my/mastodon-toot--browse)
|
||||||
("le" "List edits" mastodon-toot--view-toot-edits)
|
("le" "List edits" mastodon-toot-view-toot-edits)
|
||||||
("lf" "List favouriters" mastodon-toot--list-favouriters)
|
("lf" "List favouriters" mastodon-toot-list-favouriters)
|
||||||
("lb" "List boosters" mastodon-toot--list-boosters)]
|
("lb" "List boosters" mastodon-toot-list-boosters)]
|
||||||
["Toot Actions"
|
["Toot Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("r" "Reply" mastodon-toot--reply)
|
("r" "Reply" mastodon-toot-reply)
|
||||||
("v" "Vote" mastodon-tl--poll-vote)
|
("v" "Vote" mastodon-tl-poll-vote)
|
||||||
("b" "Boost" my/mastodon-toot--toggle-boost-confirm)
|
("b" "Boost" my/mastodon-toot--toggle-boost-confirm)
|
||||||
("f" "Favourite" my/mastodon-toot--toggle-favourite-confirm)
|
("f" "Favourite" my/mastodon-toot--toggle-favourite-confirm)
|
||||||
("k" "Bookmark" my/mastodon-toot--toggle-bookmark-confirm)]
|
("k" "Bookmark" my/mastodon-toot--toggle-bookmark-confirm)]
|
||||||
["My Toot Actions"
|
["My Toot Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("md" "Delete" mastodon-toot--delete-toot)
|
("md" "Delete" mastodon-toot-delete-toot)
|
||||||
("mD" "Delete and redraft" mastodon-toot--delete-and-redraft-toot)
|
("mD" "Delete and redraft" mastodon-toot-delete-and-redraft-toot)
|
||||||
("mp" "Pin" mastodon-toot--pin-toot-toggle)
|
("mp" "Pin" mastodon-toot-pin-toot-toggle)
|
||||||
("me" "Edit" mastodon-toot--edit-toot-at-point)]
|
("me" "Edit" mastodon-toot-edit-toot-at-point)]
|
||||||
["Profile Actions"
|
["Profile Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("pp" "Profile" mastodon-profile--show-user)
|
("pp" "Profile" mastodon-profile-show-user)
|
||||||
("pf" "List followers" mastodon-profile--open-followers)
|
("pf" "List followers" mastodon-profile-open-followers)
|
||||||
("pF" "List following" mastodon-profile--open-following)
|
("pF" "List following" mastodon-profile-open-following)
|
||||||
("ps" "List statues (no reblogs)" mastodon-profile--open-statuses-no-reblogs)]
|
("ps" "List statues (no reblogs)" mastodon-profile-open-statuses-no-reblogs)]
|
||||||
["User Actions"
|
["User Actions"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("uf" "Follow user" my/mastodon-tl--follow-user-confirm)
|
("uf" "Follow user" my/mastodon-tl-follow-user-confirm)
|
||||||
("uF" "Unfollow user" my/mastodon-tl--unfollow-user-confirm)
|
("uF" "Unfollow user" my/mastodon-tl-unfollow-user-confirm)
|
||||||
("ub" "Block user" my/mastodon-tl--block-user-confirm)
|
("ub" "Block user" my/mastodon-tl-block-user-confirm)
|
||||||
("uB" "Unblock user" my/mastodon-tl--unblock-user-confirm)
|
("uB" "Unblock user" my/mastodon-tl-unblock-user-confirm)
|
||||||
("um" "Mute user" my/mastodon-tl--mute-user-confirm)
|
("um" "Mute user" my/mastodon-tl-mute-user-confirm)
|
||||||
("uB" "Unmute user" my/mastodon-tl--unmute-user-confirm)]
|
("uB" "Unmute user" my/mastodon-tl-unmute-user-confirm)]
|
||||||
["Misc"
|
["Misc"
|
||||||
:class transient-row
|
:class transient-row
|
||||||
("q" "Quit" transient-quit-one)]))
|
("q" "Quit" transient-quit-one)]))
|
||||||
|
|
@ -10848,7 +10903,8 @@ Or you can load up Element for a moment to see what the mention was, if that's e
|
||||||
(telega-button-active :foreground (my/color-value 'base0)
|
(telega-button-active :foreground (my/color-value 'base0)
|
||||||
:background (my/color-value 'cyan))
|
:background (my/color-value 'cyan))
|
||||||
(telega-webpage-chat-link :foreground (my/color-value 'base0)
|
(telega-webpage-chat-link :foreground (my/color-value 'base0)
|
||||||
:background (my/color-value 'fg)))
|
:background (my/color-value 'fg))
|
||||||
|
(telega-entity-type-spoiler :background (my/color-value 'base8)))
|
||||||
:config
|
:config
|
||||||
(when (file-exists-p "~/.guix-extra-profiles/emacs/emacs/bin/telega-server")
|
(when (file-exists-p "~/.guix-extra-profiles/emacs/emacs/bin/telega-server")
|
||||||
(setq telega-server-command
|
(setq telega-server-command
|
||||||
|
|
@ -11203,8 +11259,8 @@ I don't have access to any proprietary APIs, but LLaMA 3.1 8b with [[https://oll
|
||||||
"qwen2.5:32b" "qwen2.5-coder:32b"
|
"qwen2.5:32b" "qwen2.5-coder:32b"
|
||||||
"eva-qwen2.5-q4_k_l-32b:latest"
|
"eva-qwen2.5-q4_k_l-32b:latest"
|
||||||
"t-pro-1.0-q4_k_m:latest"
|
"t-pro-1.0-q4_k_m:latest"
|
||||||
"t-lite-it-1.0-q4_k_m:latest"
|
"qwq:32b"
|
||||||
(llava-phi3:latest
|
(gemma3:32b
|
||||||
:capabilities (media)
|
:capabilities (media)
|
||||||
:mime-types ("image/jpeg" "image/png")))))
|
:mime-types ("image/jpeg" "image/png")))))
|
||||||
(gptel-make-openai "OpenRouter"
|
(gptel-make-openai "OpenRouter"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue