Robba
This commit is contained in:
parent
7feed73965
commit
d53973ef9a
5 changed files with 78 additions and 13 deletions
17
flake.lock
generated
17
flake.lock
generated
|
@ -68,6 +68,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"extra-package-copilot": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1694588237,
|
||||
"narHash": "sha256-7LKB2JoYAVu5i23ZKBVZPe6azCItHK/tlBNPgFXxztc=",
|
||||
"owner": "zerolfx",
|
||||
"repo": "copilot.el",
|
||||
"rev": "421703f5dd5218ec2a3aa23ddf09d5f13e5014c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zerolfx",
|
||||
"repo": "copilot.el",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"extra-package-dracula-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -225,6 +241,7 @@
|
|||
"extra-package-agenix-el": "extra-package-agenix-el",
|
||||
"extra-package-chatgpt": "extra-package-chatgpt",
|
||||
"extra-package-combobulate": "extra-package-combobulate",
|
||||
"extra-package-copilot": "extra-package-copilot",
|
||||
"extra-package-dracula-theme": "extra-package-dracula-theme",
|
||||
"extra-package-indent-bars": "extra-package-indent-bars",
|
||||
"extra-package-nix-ts-mode": "extra-package-nix-ts-mode",
|
||||
|
|
|
@ -24,12 +24,16 @@
|
|||
};
|
||||
extra-package-dracula-theme = {
|
||||
url = "github:aciceri/dracula-emacs";
|
||||
flake = false;
|
||||
flake = false;
|
||||
};
|
||||
extra-package-chatgpt = {
|
||||
url = "github:joshcho/ChatGPT.el";
|
||||
flake = false;
|
||||
};
|
||||
extra-package-copilot = {
|
||||
url = "github:zerolfx/copilot.el";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
ffmpegthumbnailer
|
||||
mediainfo
|
||||
unzipNLS
|
||||
pkgs.tree-sitter-grammars.tree-sitter-nix
|
||||
nodejs
|
||||
]
|
||||
++ (with hunspellDicts; [
|
||||
en_US-large
|
||||
|
|
48
init.el
48
init.el
|
@ -15,13 +15,22 @@
|
|||
;; (push `(before-string . ,(propertize " " 'display '((margin left-margin) "E"))) (get :error 'flymake-overlay-control))
|
||||
;; (push `(before-string . ,(propertize " " 'display '((margin left-margin) "W"))) (get :warning 'flymake-overlay-control))
|
||||
;; (push `(before-string . ,(propertize " " 'display '((margin left-margin) "N"))) (get :note 'flymake-overlay-control))
|
||||
(set-face-attribute 'flymake-error nil :inverse-video t)
|
||||
(set-face-attribute 'flymake-warning nil :inverse-video t)
|
||||
(set-face-attribute 'flymake-note nil :inverse-video t)
|
||||
;; TODO set following only when on terminal (where wavy underlines are not shown)
|
||||
;; (set-face-attribute 'flymake-error nil :inverse-video t)
|
||||
;; (set-face-attribute 'flymake-warning nil :inverse-video t)
|
||||
;; (set-face-attribute 'flymake-note nil :inverse-video t)
|
||||
:custom
|
||||
(flymake-mode-line-lighter "Fly")
|
||||
:hook prog-mode)
|
||||
|
||||
(use-package eglot
|
||||
:custom
|
||||
;; Tricks that should make Emacs faster
|
||||
(eglot-events-buffer-size 0) ; disable events logging, it should be enabled only when debuggigng LSP servers
|
||||
(eglot-sync-connect-nil 0) ; disable UI freeze when opening big files
|
||||
(eglot-connect-timeout nil) ; never timeout
|
||||
)
|
||||
|
||||
(use-package emacs
|
||||
:bind (("<mouse-4>" . scroll-down-line)
|
||||
("<mouse-5>" . scroll-up-line)
|
||||
|
@ -52,10 +61,11 @@
|
|||
(column-number-mode +1)
|
||||
(add-to-list 'default-frame-alist '(font . "Iosevka Comfy-13"))
|
||||
(recentf-mode +1)
|
||||
(fset #'jsonrpc--log-event #'ignore) ; this should be enabled only when needed, otherwise makes Emacs slower
|
||||
(defun ccr/reload-emacs ()
|
||||
(interactive)
|
||||
(load-file "~/.config/emacs/init.el"))
|
||||
)
|
||||
)
|
||||
|
||||
(use-package tramp
|
||||
:config
|
||||
|
@ -532,6 +542,7 @@
|
|||
)
|
||||
|
||||
(use-package eshell
|
||||
:custom ((eshell-prefer-lisp-functions t))
|
||||
:config
|
||||
(defun ccr/start-eshell ()
|
||||
(eshell 'N))
|
||||
|
@ -571,6 +582,25 @@
|
|||
("C-c t c" . popper-cycle)
|
||||
("C-c t p" . popper-toggle-type)))
|
||||
|
||||
(use-package org
|
||||
:hook (org-mode . variable-pitch-mode)
|
||||
:custom ((org-hide-emphasis-markers t))
|
||||
:config
|
||||
;; FIXME the following doesn't work when using the daemon, it should be executed only
|
||||
;; one time after the first frame is created
|
||||
(set-face-font 'variable-pitch "Dejavu Serif 14")
|
||||
(set-face-font 'fixed-pitch "Iosevka 14")
|
||||
|
||||
(set-face-attribute 'org-block nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-code nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-document-info-keyword nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-meta-line nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-property-value nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-special-keyword nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-tag nil :inherit 'fixed-pitch :weight 'bold :height 0.8)
|
||||
(set-face-attribute 'org-verbatim nil :inherit 'fixed-pitch))
|
||||
|
||||
(use-package org-roam)
|
||||
|
||||
(use-package consult-org-roam
|
||||
|
@ -597,16 +627,20 @@
|
|||
(use-package chatgpt
|
||||
:config
|
||||
(dolist (e '(("spiega" . "Spiega il seguente")
|
||||
("documenta" . "Documenta il seguente")
|
||||
("documenta" . "Documenta il seguente usando la sintassi appropriata in modo che possa essere inserito nel codice")
|
||||
))
|
||||
(push e chatgpt-code-query-map))
|
||||
:bind
|
||||
("C-c i" . chatgpt-query))
|
||||
|
||||
(use-package copilot
|
||||
:custom
|
||||
(copilot-max-char -1)
|
||||
:hook (prog-mode org-mode)
|
||||
:bind (("C-<tab>" . copilot-accept-completion)))
|
||||
|
||||
(provide 'init)
|
||||
;;; init.el ends here
|
||||
;; Local Variables:
|
||||
;; byte-compile-warnings: (not free-vars noruntime unresolved)
|
||||
;; End:
|
||||
|
||||
|
||||
|
|
|
@ -4,20 +4,30 @@ with epkgs; let
|
|||
|
||||
depsPerPackage = {
|
||||
indent-bars = [compat];
|
||||
"chatgpt" = [polymode];
|
||||
chatgpt = [polymode];
|
||||
copilot = [editorconfig dash s];
|
||||
};
|
||||
|
||||
overrideAttrsPerPackage = {
|
||||
copilot = old: {
|
||||
postInstall = ''
|
||||
cp -r "$src/dist" "$LISPDIR"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# *Attrset* containig extra emacs packages from flake inputs
|
||||
extraPackages = lib.mapAttrs (inputName: input: let
|
||||
deps = depsPerPackage.${inputName} or [];
|
||||
in
|
||||
trivialBuild {
|
||||
build = trivialBuild {
|
||||
pname = inputName;
|
||||
src = input.outPath;
|
||||
version = input.shortRev;
|
||||
propagatedUserEnvPkgs = deps;
|
||||
buildInputs = deps;
|
||||
})
|
||||
};
|
||||
in
|
||||
build.overrideAttrs (overrideAttrsPerPackage.${inputName} or (_: _)))
|
||||
pkgs.extra-package-inputs;
|
||||
|
||||
# *List* containing emacs packages from (M)ELPA
|
||||
|
|
Reference in a new issue