Compare commits
4 commits
a5e88644b1
...
f4b44ddd30
Author | SHA1 | Date | |
---|---|---|---|
f4b44ddd30 | |||
0afba6526f | |||
386a004a1c | |||
524b38e744 |
3 changed files with 24 additions and 38 deletions
6
flake.lock
generated
6
flake.lock
generated
|
@ -7,11 +7,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723799695,
|
"lastModified": 1723885890,
|
||||||
"narHash": "sha256-8W/xxCpwQC9LOnwUO0Q7aGAF463ozaxcwQ6/toqtz0M=",
|
"narHash": "sha256-MNREOblaa/DcYkM2Az57JC+auv023k+93biSDP6tiGY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "3b4f8179de2b4950540d70161854e43fe1010eae",
|
"rev": "2dc18fd0621276a03b36e509d9271155d6e5ee19",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
47
init.el
47
init.el
|
@ -436,21 +436,6 @@
|
||||||
[("D" "Difftastic diff (dwim)" difftastic-magit-diff)
|
[("D" "Difftastic diff (dwim)" difftastic-magit-diff)
|
||||||
("S" "Difftastic show" difftastic-magit-show)])))
|
("S" "Difftastic show" difftastic-magit-show)])))
|
||||||
|
|
||||||
(use-package sideline
|
|
||||||
:delight
|
|
||||||
:hook (flymake-mode . sideline-mode)
|
|
||||||
:custom
|
|
||||||
(sideline-flymake-display-mode 'line)
|
|
||||||
(sideline-backends-right '(sideline-flymake))
|
|
||||||
:config
|
|
||||||
;; FIXME https://github.com/emacs-sideline/sideline/issues/13
|
|
||||||
(require 'sideline)
|
|
||||||
(defun ccr-sideline--align (&rest lengths)
|
|
||||||
"Align sideline string by LENGTHS from the right of the window."
|
|
||||||
(list (* (window-font-width)
|
|
||||||
(+ (apply #'+ lengths) (if (display-graphic-p) 1 3)))))
|
|
||||||
(advice-add 'sideline--align :override #'ccr-sideline--align))
|
|
||||||
|
|
||||||
;; FIXME there is something deeply wrong about how nix is configured here
|
;; FIXME there is something deeply wrong about how nix is configured here
|
||||||
;; (use-package nix-mode
|
;; (use-package nix-mode
|
||||||
;; :delight nix-prettify-mode
|
;; :delight nix-prettify-mode
|
||||||
|
@ -808,24 +793,24 @@ This is meant to be an helper to be called from the window manager."
|
||||||
(end-pos (line-end-position)))
|
(end-pos (line-end-position)))
|
||||||
(gptel-request
|
(gptel-request
|
||||||
(buffer-substring-no-properties start-pos end-pos) ;the prompt
|
(buffer-substring-no-properties start-pos end-pos) ;the prompt
|
||||||
:system "You are proficient with emacs shell (eshell), translate the following to something I could directly prompt to the shell. Your responses should only be code, without explanation or formatting."
|
:system "You are proficient with emacs shell (eshell), translate the following to something I could directly prompt to the shell. Your responses should only be code, without explanation or formatting."
|
||||||
:buffer (current-buffer)
|
:buffer (current-buffer)
|
||||||
:context (cons (set-marker (make-marker) start-pos)
|
:context (cons (set-marker (make-marker) start-pos)
|
||||||
(set-marker (make-marker) end-pos))
|
(set-marker (make-marker) end-pos))
|
||||||
:callback
|
:callback
|
||||||
(lambda (response info)
|
(lambda (response info)
|
||||||
(if (not response)
|
(if (not response)
|
||||||
(message "ChatGPT response failed with: %s" (plist-get info :status))
|
(message "ChatGPT response failed with: %s" (plist-get info :status))
|
||||||
(kill-region start-pos end-pos)
|
(kill-region start-pos end-pos)
|
||||||
(insert response)))))))
|
(insert response)))))))
|
||||||
)
|
)
|
||||||
|
|
||||||
;; (use-package copilot
|
(use-package copilot
|
||||||
;; :custom
|
:custom
|
||||||
;; (copilot-max-char -1)
|
(copilot-max-char -1)
|
||||||
;; (copilot-indent-offset-warning-disable 't)
|
(copilot-indent-offset-warning-disable 't)
|
||||||
;; :hook (prog-mode org-mode)
|
:hook (prog-mode org-mode)
|
||||||
;; :bind (("C-<tab>" . copilot-accept-completion)))
|
:bind (("C-<tab>" . copilot-accept-completion)))
|
||||||
|
|
||||||
(use-package pass
|
(use-package pass
|
||||||
:config
|
:config
|
||||||
|
|
|
@ -117,8 +117,9 @@ mainPackages
|
||||||
++ (builtins.attrValues extraPackages)
|
++ (builtins.attrValues extraPackages)
|
||||||
# Playing with EAF
|
# Playing with EAF
|
||||||
++ [
|
++ [
|
||||||
(pkgs.callPackage ./eaf.nix {
|
# Disabled because pymupdf was broken
|
||||||
inherit (epkgs) melpaBuild;
|
# (pkgs.callPackage ./eaf.nix {
|
||||||
inherit (melpaPackages) ctable deferred epc s;
|
# inherit (epkgs) melpaBuild;
|
||||||
})
|
# inherit (melpaPackages) ctable deferred epc s;
|
||||||
|
# })
|
||||||
]
|
]
|
||||||
|
|
Reference in a new issue