This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-23
Channels
- # announcements (26)
- # babashka (8)
- # babashka-sci-dev (3)
- # beginners (93)
- # biff (44)
- # calva (1)
- # cider (7)
- # clj-kondo (13)
- # cljdoc (1)
- # clojure (121)
- # clojure-australia (2)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (1)
- # clojurescript (35)
- # conjure (1)
- # core-async (2)
- # datalevin (6)
- # datomic (28)
- # emacs (25)
- # events (1)
- # fulcro (5)
- # introduce-yourself (2)
- # jobs (8)
- # leiningen (2)
- # off-topic (13)
- # other-languages (1)
- # podcasts-discuss (1)
- # polylith (7)
- # rdf (6)
- # re-frame (1)
- # reagent (53)
- # releases (3)
- # rewrite-clj (7)
- # scittle (5)
- # shadow-cljs (63)
- # specter (1)
- # squint (5)
- # tools-build (5)
- # xtdb (7)
Is there a simple way to alter the contents being saved from a buffer to a file without changing the buffer itself?
Backstory on this is that I really like using https://github.com/AbhinavOmprakash/snitch as I am developing, but I'd like to automatically replace all the defn*
s and *let
s with defn
s and let
s respectively.
normally (unless disabling auto-revert-mode
, which seems generally undesirable if not dangerous for data loss) almost as soon as you would persist to disk, emacs would pick up those changes from disk and apply them to the buffer again.
i.e. how emacs distinguish between "normal" changes from outside and the "hacked" changes?
ref https://www.gnu.org/software/emacs/manual/html_node/emacs/Auto-Revert.html
Ah, okay. Probably makes sense to just add it before certain commands then, most notably magit-commit :P
there are many approaches to debugging of course. A quick one that would come to mind is a custom nrepl middleware such that for each Var
that is defined, an add-watch
is performed capturing args and ret.
Or automatically walk
the forms and Tufte them.
The sky is the limit :)
hi, I'm wondering if I have my org-mode Clojure highlighting in source blocks set up correctly. It seems to work but doesn't highlight all the core forms, so for example it highlights def
and fn
but not coll?
-- right now I'm requiring ob-clojure, have fontify-natively set to true and insert the source block as #+begin_src clojure ...
. Does it seem like I'm missing anything?
What's the correct way to enable multiple flycheck checks in the same file?
I have my own checker that I would like to enable for several major modes without having to flycheck-select-checker
(flycheck-define-checker my-checker
"A checker"
:command ("my-checker" "check" source)
:error-patterns
()
:modes (clojure-mode js-mode java-mode))
This sort of works but I need to flycheck-select-checker
manually and only one checker is active at the time.
What I want, is have them active both/all - for example both clj-kondo
and my-checker
for clojure-mode.
I tried this but it doesn't seem to work: https://emacs.stackexchange.com/questions/13392/using-multiple-flycheck-syntax-checkers-in-web-mode
(with-eval-after-load 'flycheck
(flycheck-add-mode 'codescene 'clojure-mode)
(flycheck-add-mode 'codescene 'java-mode)
(flycheck-add-mode 'codescene 'js-mode)
)
flycheck has something called chains for this. how to use this you can find in the flycheck-clj-kondo README
Just started watching this video https://youtu.be/AYKIR1oh62Y?t=794 about repl development, noticed it has number of references a function has curious what I need to make that work ? anyone able to point me in the right direction ?
That is lsp-mode, requires the proper clojure-lsp-server (emacs will offer to install the server when you activate the mode)
as you get a lot of functionality from cider like auto complete and jump to definition, so felt like they would conflict
I will add it in and give it a try, thanks for the tip @U03KLA1A00K
@UU67HFS2X https://clojure-lsp.io/features/#code-lenses-showing-symbol-references the code lens feature you are looking for https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/ a post explaining about lsp and using with cider, for more info check #CPABC1H61
does anyone have this linter working https://github.com/aws-cloudformation/cfn-lint if so, can you share your install steps?
i'm at that point where i'm just going to use vscode when i can't get something working in an hour. Like, installing packages that i'm not customizing shouldn't require special attention. In vs code you just install the extension.
ok after some random looking around, fly check tells me this:
Syntax checker in buffer fix-etl-centriq-cluster.yaml in yaml-mode:
cfn-lint
- major mode: `yaml-mode' not supported
- may enable: yes
- executable: Found at /home/linuxbrew/.linuxbrew/bin/cfn-lint
Flycheck cannot use this syntax checker for this buffer.
Flycheck Mode is enabled. Use SPC u SPC e d to enable disabled checkers.
--------------------
Flycheck version: 33snapshot (package: 20221104.549)
Emacs version: 28.2
System: x86_64-pc-linux-gnu
Window system: x
Did you try with this already? https://github.com/emacsmirror/cfn-mode
I can enable cfn mode, so yes? It doesn't seem to do anything
Does it work for you?
I was able to get the linting after enabling cfn-mode then enabling flycheck-mode i'm not sure why i have to take those steps.
Feature/tree-sitter merged into master https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01443.html
I notice Clojure is not in the list https://tree-sitter.github.io/tree-sitter/ :(
there's https://github.com/sogaiu/tree-sitter-clojure (but I haven't tried it)