This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (7)
- # aws (5)
- # babashka (72)
- # beginners (43)
- # calva (12)
- # cider (9)
- # clara (3)
- # clj-kondo (12)
- # cljdoc (32)
- # cljs-dev (10)
- # cljsrn (1)
- # clojure (78)
- # clojure-dev (50)
- # clojure-europe (17)
- # clojure-gamedev (8)
- # clojure-nl (1)
- # clojure-spec (30)
- # clojure-uk (3)
- # clojurescript (52)
- # core-async (1)
- # cursive (5)
- # datomic (8)
- # emacs (58)
- # events (2)
- # fulcro (5)
- # graalvm (7)
- # holy-lambda (37)
- # honeysql (9)
- # jobs (5)
- # leiningen (3)
- # lsp (7)
- # lumo (2)
- # malli (3)
- # meander (13)
- # membrane-term (64)
- # missionary (19)
- # music (3)
- # nextjournal (8)
- # off-topic (29)
- # pathom (16)
- # polylith (14)
- # portal (16)
- # re-frame (2)
- # reagent (5)
- # sci (14)
- # shadow-cljs (20)
- # spacemacs (6)
- # sql (1)
- # tools-deps (58)
- # vim (14)
Hi there, I’m a Clojure and Emacs beginner and use config from here (https://www.braveclojure.com/basic-emacs/). Today I was hunting down a bug in an example I am coding and it turned out to be a typo in the word ’message”. What surprises me is that there is no check / no linter to highlight those unresolved symbols and prevent those typos in first place. Is this a matter of configuration or generally not possible?
The Emacs config in brave Clojure is really outdated by a number of years.
both shadow-cljs and figwheel should have given a UI toast showing that compiler error as well
I’m not sure if clj-kondo is enabled, most likely not - I just copied that Emacs config.
For more advanced features (navigation etc) move on to clojure-lsp which automatically enables clj-kondo
You’re right, now I looked at the shadow-cljs build and there is a warning… my bad, I just ignored the terminal output 🙂
in case you want a more IDE-ish experience: https://clojure-lsp.io/features/ #lsp
I already mentioned that @ericdallo :)
Wow, thats all very helpful, thanks a lot! I definitely have to spend more time to learn Emacs as well… like “learn to use the tools before building”
Since you are starting, maybe this guide may help you as well: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/
I’m sure it is, but it is also just too tempting to fall back into the old known tools like VS Code or IntelliJ … have… to…. resist….
VS Code + Calva is also very nice. But I'll try to respect the religion of this channel.
As a nice fact: VS Code + Calva also use clj-kondo + clojure-lsp so what you learn here will also be useful on the heathen side of things
religion is not helpful for a beginner. There is no need to use emacs if you are already familiar with other tools. I think emacs is fantastic but it really takes a while to really understand why. And it isn’t necessarily worth it for everyone. I also consider vs code the modern day successor to emacs
I remember I learned emacs because that was the only viable option for clojure pretty much in the early 2010s. I also played around with CounterClockwise in Eclipse. I don't regret learning emacs one bit. But it has a higher learning curve than other options right now.
had to learn at uni in end of 90s (to work with Java no less), used it almost exclusively ever since.
It's also fun to use ( although that is quite subjective on what one's idea of fun is 🙂 )
It matches how I think. Like in Clojure, I use functions and M-x foo is a lot like using a function to me. I tried vim as well, but it matches less how I think, I just can't get used to it. It's very personal.
I wish there was a fennel dynamic module or something of the sort that would allow me to write modes in something else than elisp
I learned emacs in a compilers class in university since it had modes for sml and some other goodies
i’m quite jealous of the lua integration for neovim and agree emacs lisp is quite clunky
the reason i think that vs code is the successor to emacs is based on the community and scriptability. It’s an extensible editor with literally a million users who tinker, create packages, etc. It has achieved what emacs set out to do
Extensible, yes, but it also resists being extended. 😃 https://www.reddit.com/r/Clojure/comments/qmmx7w/i_love_hacking_clojure_support_into_vs_code_for/
there were plenty good alternatives, some lasted more than others, the fact emacs is still around says something I think. it's also much more than a code editor
that said it's good vscode is creating all this innovation around it. it inspires a lot of good features
More than a code editor goes for VS Code as well, to some extent. Not as OS-y as Emacs, of course.
I’ve installed lsp-mode from MELPA stable, but when launching it (after restarting Emacs) with M-x lsp I get the following error:
lsp--path-to-uri: Symbol's function definition is void: -compose
TLDR: update dash.el package, I really suggest you use lsp-mode from melpa unstable
lsp-mode receives a lot of fixes and improvements all the time, stick to the unstable I think it is the best option
emacs has its own resistance to change as well. from licensing, to product vision, to even supporting features on osx that are not possible in x server.
I came to emacs because of clojure (like many), but the reason I'm still here even though I have years of vimming and Intellij, is that if you want vim editing + proper lisp structural editing, emacs+evil is the only place you can get it AFAICT. Intellij/Cursive and vscode/calva are severely handicapped when you enable the vim plugins. I haven't tried the vim tools (fireplace) in years, maybe I should give it a go. But I find emacs delivers the IDE-like experience better than I could ever get vim to over decades. If I somehow manage to boot up emacs without my config, I'm totally hopeless because I don't actually know any core emacs bindings except m-x
I had the same experience but just a heads up that the Clojure Vvm plugins have gotten really good in the past couple of years.. They all pull in CIDER now. I personally use conjure but fireplace and iced are both really solid. (Conjure is neovim only) I go back and forth between emacs and vim all the time… Use vim for most tasks and emacs when I need a bit more help. Usually have both open and just keep the bindings the same to make it easy.
I'll have to try them out. I also spend almost all day in vim and emacs. Vim when I'm doing small edits all over the place over many projects and emacs when diving into one project. that said I've grown to really like the emacs tooling around project management, managing many buffers, searching, sidebars, etc (not to mention the time investment in learning it). I regularly copy bindings between my emacs and vim configs heh. I haven't dove into the neovim rabbitwhole yet. Wait, so cider we know and love is is used by non-emacs editors too?
Ya, the awesome cider team did a lot of work to generalize a lot of the tooling so other editors could use As a result, several Vim plugins as well as the VS code plugin all are now viable Clojure environments
that said emacs is about to have proper wayland support, so that might come to osx in another form eventually
there’s a patch set that gets applied for osx that will not be accepted into core because it adds some niceties like smooth scrolling and maybe subpixel stuff. until x has these capabilities RMS prevents it from being merged so that it doesn’t promote a non-free operating system
Here’s my config: https://github.com/DavidVujic/my-emacs-config
For other applications, I am using a small autohotkey scripts to bind M-W and C-Y to C-c and C-v
https://github.com/kimim/kimim-emacs-everywhere you could fork and adjust to your habit, if you use windows.