diff --git a/.config/guix/manifests/emacs.scm b/.config/guix/manifests/emacs.scm index d23408c..f1bf267 100644 --- a/.config/guix/manifests/emacs.scm +++ b/.config/guix/manifests/emacs.scm @@ -8,7 +8,7 @@ "imagemagick" "font-gnu-freefont" "font-gnu-unifont" - "tdlib-1.8.16" + "emacs-telega-sever" "yt-dlp" "mpv" "python-youtube-transcript-api" diff --git a/.emacs.d/init.el b/.emacs.d/init.el index ec0d208..486a0a3 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1723,6 +1723,7 @@ targets." (setq lsp-headerline-breadcrumb-enable nil) (setq lsp-modeline-code-actions-enable nil) (setq lsp-modeline-diagnostics-enable nil) + (setq lsp-volar-take-over-mode nil) (add-to-list 'lsp-language-id-configuration '(svelte-mode . "svelte"))) (use-package lsp-ui @@ -2166,7 +2167,7 @@ Returns ( . ) or nil." (use-package copilot :straight (:host github :repo "copilot-emacs/copilot.el") :commands (copilot-mode) - :if (not (or my/remote-server my/is-termux)) + :disabled t :init (add-hook 'emacs-startup-hook (lambda () @@ -2310,11 +2311,13 @@ Returns ( . ) or nil." (add-hook 'web-mode-hook #'my/web-mode-lsp) (defun my/web-mode-vue-setup (&rest _) - (when (string-match-p (rx ".vue" eos) (buffer-file-name)) - (setq-local web-mode-script-padding 0) - (setq-local web-mode-style-padding 0) - (setq-local create-lockfiles nil) - (setq-local web-mode-enable-auto-pairing nil))) + (let ((filename (buffer-file-name))) + (when (and (stringp filename) + (string-match-p (rx ".vue" eos) filename)) + (setq-local web-mode-script-padding 0) + (setq-local web-mode-style-padding 0) + (setq-local create-lockfiles nil) + (setq-local web-mode-enable-auto-pairing nil)))) (add-hook 'web-mode-hook 'my/web-mode-vue-setup) (add-hook 'editorconfig-after-apply-functions 'my/web-mode-vue-setup) @@ -2783,7 +2786,7 @@ Returns ( . ) or nil." :config (setq langtool-language-tool-server-jar "/home/pavel/bin/LanguageTool-6.4/languagetool-server.jar") (setq langtool-mother-tongue "ru") - (setq langtool-default-language "en-US")) + (setq langtool-default-language "ru-RU")) (my-leader-def :infix "L" @@ -3557,6 +3560,7 @@ With ARG, repeats or can move backward if negative." `((emacs-lisp . t) (python . t) (sql . t) + (sqlite . t) ;; (typescript .t) (hy . t) (shell . t) @@ -3946,6 +3950,9 @@ With ARG, repeats or can move backward if negative." (with-eval-after-load 'org (my-leader-def "ol" #'org-clock-agg)) :config + (setq org-clock-agg-node-format + "%-%(+ title-width)t %20c %8z %s/%S") + (setq org-clock-agg-node-title-width-delta 47) (push (cons "Agenda+Archive" (append @@ -4063,6 +4070,21 @@ With ARG, repeats or can move backward if negative." :infix "SPC" "C" #'my/org-clock-recent)) +(defun my/org-fix-task-kind () + (interactive) + (let ((entries (org-ql-query + :select #'element-with-markers + :from (current-buffer) + :where '(and (olp "Tasks") + (not (property "TASK_KIND")) + (clocked))))) + (org-fold-show-all) + (dolist (entry entries) + (let ((marker (org-element-property :org-marker entry))) + (org-with-point-at marker + (let ((value (org-read-property-value "TASK_KIND"))) + (org-set-property "TASK_KIND" value))))))) + (use-package org-super-agenda :straight t :after (org) @@ -4150,6 +4172,30 @@ TYPE may be `ts', `ts-active', `ts-inactive', `clocked', or :sort '(priority todo deadline) :super-groups '((:auto-outline-path-file t))))) +(defun my/org-ql-clocked-today () + (interactive) + (let ((today (format-time-string + "%Y-%m-%d" + (days-to-time + (- (org-today) (time-to-days 0)))))) + (org-ql-search (org-agenda-files) `(clocked :from ,today) + :title "Clocked today" + :sort '(todo priority date) + :super-groups '((:auto-outline-path-file t) + (:auto-todo t))))) + +(defun my/org-ql-closed-today () + (interactive) + (let ((today (format-time-string + "%Y-%m-%d" + (days-to-time + (- (org-today) (time-to-days 0)))))) + (org-ql-search (org-agenda-files) `(closed :from ,today) + :title "Closed today" + :sort '(todo priority date) + :super-groups '((:auto-outline-path-file t) + (:auto-todo t))))) + (setq org-ql-views (list (cons "Overview: All TODO" #'my/org-ql-all-todo) @@ -4171,13 +4217,8 @@ TYPE may be `ts', `ts-active', `ts-inactive', `clocked', or :sort '(todo priority date) :super-groups '((:auto-outline-path-file t)))) (cons "Review: Recently timestamped" #'my/org-ql-view-recent-items) - (cons "Review: Unlinked to meetings" - (list :buffers-files #'org-agenda-files - :query '(and (todo "DONE" "NO") - (not (property "MEETING")) - (ts :from -7)) - :super-groups '((:auto-outline-path-file t)))) - (cons "Review: Meeting" #'my/org-ql-meeting-tasks) + (cons "Review: Clocked today" #'my/org-ql-clocked-today) + (cons "Review: Closed today" #'my/org-ql-closed-today) (cons "Fix: tasks without TASK_KIND" (lambda () (interactive) @@ -4522,7 +4563,7 @@ KEYS is a list of cons cells like (