Compare commits

...

5 Commits

Author SHA1 Message Date
David Morgan 73fa64af6e
Fix hook name 2022-12-05 12:24:34 +00:00
David Morgan 8de452cf89
Make cider completion work with corfu 2022-12-05 12:24:06 +00:00
David Morgan c3ad45ac28
Disable nrepl-log-messages 2022-12-05 12:21:04 +00:00
David Morgan cedb1b92c5
Add function to load debugging tools 2022-12-05 12:19:11 +00:00
David Morgan e8bbf64c5d
irssi config 2022-12-05 12:18:04 +00:00
4 changed files with 45 additions and 3 deletions

View File

@ -95,6 +95,12 @@
(add-hook 'cider-connected-hook 'run-and-unhook)
(cider-jack-in params))
(cider-jack-in params)))
(defun load-debug-namespaces ()
(interactive)
(cider-interactive-eval "(require 'snitch.core)" nil nil (cider--nrepl-pr-request-map))
(cider-interactive-eval "(require 'miracle.save)" nil nil (cider--nrepl-pr-request-map))
(cider-interactive-eval "(require 'sc.api)" nil nil (cider--nrepl-pr-request-map))
(cider-interactive-eval "(require '[debux.cs.core :refer [dbg dbgn dbgt]])" nil nil (cider--nrepl-pr-request-map)))
(define-abbrev-table 'cider-repl-mode-abbrev-table
'(("scl" "(eval `(sc.api/defsc ~(sc.api/last-ep-id)))" cider-repl-return)
("scs" "(sc.api/defsc*)" cider-repl-return)
@ -122,13 +128,27 @@
;; cider-switch-to-repl-on-insert nil
cider-xref-fn-depth 90
cider-repl-history-file ".cider-repl-history"
nrepl-log-messages t
;; nrepl-log-messages t
cider-connection-message-fn nil
cider-show-error-buffer 'except-in-repl
clojure-toplevel-inside-comment-form t)
(unbind-key "C-c C-l" cider-mode-map)
(unbind-key "C-c C-b" cider-mode-map)
(unbind-key "C-c C-b" cider-repl-mode-map)
;; https://github.com/clojure-emacs/cider/issues/3019#issuecomment-1330342147
(defun my/cider-complete-at-point ()
"Complete the symbol at point."
(when (and (cider-connected-p)
(not (cider-in-string-p)))
(when-let* ((bounds (bounds-of-thing-at-point 'symbol))
(beg (car bounds))
(end (cdr bounds))
(completion (append (cider-complete (buffer-substring beg end))
(get-text-property (point) 'cider-locals))))
(list beg end (completion-table-dynamic (lambda (_) completion))
:annotation-function #'cider-annotate-symbol))))
(advice-add 'cider-complete-at-point :override 'my/cider-complete-at-point)
:bind
(:map cider-mode-map
("C-c M-l" . cider-load-file)
@ -139,6 +159,7 @@
("C-c M-j" . cider-jack-in-and-run-main))
(:map clojure-mode-map
("C-c C-r C-m" . run-main)
("C-c C-r C-d" . load-debug-namespaces)
("C-c M-j" . cider-jack-in-and-run-main)
("C-x p q" . project-clojure-test-switch)
("C-c C-M-c" . (lambda () (interactive) (cider-clear-compilation-highlights t)))

View File

@ -181,7 +181,7 @@
(string-match "^\s*;"
(thing-at-point 'line))))
:hook
(emacs-lisp . aggressive-indent-mode)
(emacs-lisp-mode . aggressive-indent-mode)
(clojure-mode . aggressive-indent-mode))
(use-package hungry-delete

View File

@ -2,6 +2,7 @@
{
imports = [
./includes/linux-server.nix
./includes/irssi.nix
];
# Let Home Manager install and manage itself.

View File

@ -73,6 +73,7 @@
networks = {
libera = {
nick = "djm";
saslExternal = true;
server = {
address = "irc.libera.chat";
port = 6697;
@ -92,6 +93,7 @@
};
tilde = {
nick = "djm";
saslExternal = true;
server = {
address = "irc.tilde.chat";
port = 6697;
@ -110,9 +112,26 @@
team.autoJoin = true;
};
};
oftc = {
nick = "djm";
server = {
address = "irc.oftc.net";
port = 6697;
autoConnect = true;
ssl = {
enable = true;
verify = true;
certificateFile = "${config.home.homeDirectory}/.irssi/oftc.pem";
};
};
channels = {
home-manager.autoJoin = true;
};
};
blinkenirc = {
nick = "djm";
autoCommands = [ "msg chanserv invite #blinkenshell.op" "wait 2000" ];
saslExternal = true;
server = {
address = "irc.blinkenshell.org";
port = 6697;
@ -130,6 +149,7 @@
};
hashbang = {
nick = "djm";
saslExternal = true;
server = {
address = "irc.hashbang.sh";
port = 6697;
@ -141,7 +161,7 @@
};
};
channels = {
"!".autoJoin = true;
"#!".autoJoin = true;
};
};
refchat = {