Compare commits

..

1 commit

Author SHA1 Message Date
a894af30b7 flake.lock: Update
All checks were successful
/ test (push) Successful in 7m5s
Flake lock file updates:

• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/3b4f8179de2b4950540d70161854e43fe1010eae' (2024-08-16)
  → 'github:nix-community/emacs-overlay/e197771f35c8c330324256c5f306614f273ffd9d' (2024-08-20)
• Updated input 'emacs-overlay/nixpkgs':
    'github:NixOS/nixpkgs/c3aa7b8938b17aebd2deecf7be0636000d62a2b9' (2024-08-14)
  → 'github:NixOS/nixpkgs/8a3354191c0d7144db9756a74755672387b702ba' (2024-08-18)
• Updated input 'emacs-overlay/nixpkgs-stable':
    'github:NixOS/nixpkgs/c3d4ac725177c030b1e289015989da2ad9d56af0' (2024-08-15)
  → 'github:NixOS/nixpkgs/c42fcfbdfeae23e68fc520f9182dde9f38ad1890' (2024-08-17)
• Updated input 'extra-package-indent-bars':
    'github:jdtsmith/indent-bars/209817a622e2fbf9201a6c756928c9f320431449' (2024-08-12)
  → 'github:jdtsmith/indent-bars/b72fa098d7c48d61fb4b508071bd77d054268f4e' (2024-08-18)
2024-08-20 12:47:31 +00:00
4 changed files with 118 additions and 31 deletions

98
flake.lock generated
View file

@ -7,11 +7,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1724231640,
"narHash": "sha256-1FnV0jk8GAItH71zVTzrhULylMKyXsb4FNmtn9b46Ug=",
"lastModified": 1724119075,
"narHash": "sha256-rZe4WgHhLqhu4NjGVYyIQ36ieHZgSkfnNMdLzKaqFQk=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "758aa1deb09d8d2dce7bd3a016434e8fcedfab89",
"rev": "e197771f35c8c330324256c5f306614f273ffd9d",
"type": "github"
},
"original": {
@ -20,6 +20,38 @@
"type": "github"
}
},
"extra-package-agenix-el": {
"flake": false,
"locked": {
"lastModified": 1722968702,
"narHash": "sha256-npdFsig2UmLcyTg6gaoPfpBfFjaTJ5vhbhx2zeDJ6B8=",
"owner": "t4ccer",
"repo": "agenix.el",
"rev": "1ef747135401ed4b905acc2b3ec3f909d9cb62e1",
"type": "github"
},
"original": {
"owner": "t4ccer",
"repo": "agenix.el",
"type": "github"
}
},
"extra-package-combobulate": {
"flake": false,
"locked": {
"lastModified": 1710175386,
"narHash": "sha256-rww0/6304xZWTFRo1BVcfSDdXOXtlgmfZOxAoOIjYsk=",
"owner": "mickeynp",
"repo": "combobulate",
"rev": "ee82c568ad639605518f62f82fae4bcc0dfdbb81",
"type": "github"
},
"original": {
"owner": "mickeynp",
"repo": "combobulate",
"type": "github"
}
},
"extra-package-copilot": {
"flake": false,
"locked": {
@ -36,6 +68,22 @@
"type": "github"
}
},
"extra-package-gptel": {
"flake": false,
"locked": {
"lastModified": 1723651088,
"narHash": "sha256-5uu9v8vqadAhFldMnMSyE5FUF5QNN5LlU++hLq34Mvg=",
"owner": "karthink",
"repo": "gptel",
"rev": "17f39f6a8144496252eacc012ef7f1d6a2ac883a",
"type": "github"
},
"original": {
"owner": "karthink",
"repo": "gptel",
"type": "github"
}
},
"extra-package-indent-bars": {
"flake": false,
"locked": {
@ -52,6 +100,39 @@
"type": "github"
}
},
"extra-package-meow-tree-sitter": {
"flake": false,
"locked": {
"lastModified": 1719843724,
"narHash": "sha256-XdTeUq1J/zKoYaIDbl86LYuhJZJbaLFEpz7i5CxE8js=",
"owner": "skissue",
"repo": "meow-tree-sitter",
"rev": "d8dce964fac631a6d44b650a733075e14854159c",
"type": "github"
},
"original": {
"owner": "skissue",
"repo": "meow-tree-sitter",
"type": "github"
}
},
"extra-package-nix-ts-mode": {
"flake": false,
"locked": {
"lastModified": 1705596103,
"narHash": "sha256-jEUmhfLE7cFan4/PF4qBiEOLsjM3Q4iSDTlM+0CYwZg=",
"owner": "antifuchs",
"repo": "nix-ts-mode",
"rev": "0ef4e663add03d026a1804f57ac7d5453a635b15",
"type": "github"
},
"original": {
"owner": "antifuchs",
"ref": "improve-indented-string-indentation",
"repo": "nix-ts-mode",
"type": "github"
}
},
"extra-package-notmuch-notify": {
"flake": false,
"locked": {
@ -173,11 +254,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1724098845,
"narHash": "sha256-D5HwjQw/02fuXbR4LCTo64koglP2j99hkDR79/3yLOE=",
"lastModified": 1723938990,
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f1bad50880bae73ff2d82fafc22010b4fc097a9c",
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
"type": "github"
},
"original": {
@ -206,8 +287,13 @@
"root": {
"inputs": {
"emacs-overlay": "emacs-overlay",
"extra-package-agenix-el": "extra-package-agenix-el",
"extra-package-combobulate": "extra-package-combobulate",
"extra-package-copilot": "extra-package-copilot",
"extra-package-gptel": "extra-package-gptel",
"extra-package-indent-bars": "extra-package-indent-bars",
"extra-package-meow-tree-sitter": "extra-package-meow-tree-sitter",
"extra-package-nix-ts-mode": "extra-package-nix-ts-mode",
"extra-package-notmuch-notify": "extra-package-notmuch-notify",
"flake-parts": "flake-parts",
"hercules-ci-effects": "hercules-ci-effects",

View file

@ -10,14 +10,35 @@
url = "github:jdtsmith/indent-bars";
flake = false;
};
extra-package-notmuch-notify = {
url = "github:firmart/notmuch-notify";
extra-package-nix-ts-mode = {
url = "github:antifuchs/nix-ts-mode/improve-indented-string-indentation";
flake = false;
};
extra-package-combobulate = {
url = "github:mickeynp/combobulate";
flake = false;
};
extra-package-agenix-el = {
url = "github:t4ccer/agenix.el";
flake = false;
};
extra-package-copilot = {
url = "github:zerolfx/copilot.el";
flake = false;
};
extra-package-notmuch-notify = {
url = "github:firmart/notmuch-notify";
flake = false;
};
extra-package-meow-tree-sitter = {
url = "github:skissue/meow-tree-sitter";
flake = false;
};
# TODO remove when there will be a new release including GPT-4o
extra-package-gptel = {
url = "github:karthink/gptel";
flake = false;
};
};
outputs = inputs @ {flake-parts, ...}:

18
init.el
View file

@ -784,13 +784,7 @@ This is meant to be an helper to be called from the window manager."
(use-package gptel
:custom
(gptel-api-key (getenv "OPENAI_API_KEY"))
(gptel-model "gpt-4o")
:config
(require 'gptel-curl)
(add-hook 'gptel-post-response-functions 'gptel-end-of-response)
(add-hook 'gptel-post-stream-hook 'gptel-auto-scroll)
(defun ccr/suggest-eshell-command ()
(interactive)
(save-excursion
@ -809,18 +803,6 @@ This is meant to be an helper to be called from the window manager."
(message "ChatGPT response failed with: %s" (plist-get info :status))
(kill-region start-pos end-pos)
(insert response)))))))
(add-to-list 'display-buffer-alist
'("^\\*ChatGPT\\*"
(display-buffer-full-frame)
(name . "floating")))
(defun ccr/start-chatgpt () ;; Used from outside Emacs by emacsclient --eval
(display-buffer (gptel "*ChatGPT*"))
(set-frame-name "floating")
;; (delete-other-windows)
;; (add-hook 'kill-buffer-hook 'delete-frame nil 't)
) ;; destroy frame on exit
)
(use-package copilot

View file

@ -4,8 +4,10 @@ pkgs: epkgs: let
depsPerPackage = {
indent-bars = [elpaPackages.compat];
notmuch-notify = [melpaPackages.alert melpaPackages.notmuch];
copilot = [melpaPackages.editorconfig melpaPackages.dash melpaPackages.s melpaPackages.f];
notmuch-notify = [melpaPackages.alert melpaPackages.notmuch];
gptel = [pkgs.emacsPackages.transient elpaPackages.compat];
meow-tree-sitter = [melpaPackages.meow];
};
overrideAttrsPerPackage = {
@ -38,7 +40,6 @@ pkgs: epkgs: let
(package: ! builtins.elem package.pname (builtins.attrNames extraPackages))
(with epkgs.melpaPackages; [
meow
meow-tree-sitter
dracula-theme
nord-theme
catppuccin-theme
@ -74,7 +75,6 @@ pkgs: epkgs: let
cape
which-key
nix-mode
nix-ts-mode
agenix
unisonlang-mode
purescript-mode
@ -101,8 +101,6 @@ pkgs: epkgs: let
consult-notmuch
poly-org
casual-calc
gptel
agenix
# org-re-reveal # FIXME very not nice hash mismatch when building
# gptel # TODO uncomment when there will be a new release including GPT-4o
]) ++ (with elpaPackages; [