Fork me on GitHub

Hi there, I’m a Clojure and Emacs beginner and use config from here ( 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.


You can use clj-kondo and lsp-mode


clj-kondo would most likely have caught that. do you have that linter enabled?


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.


@mail990 Try out flycheck-clj-kondo for the most basic clj-kondo setup in emacs


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: #lsp


I already mentioned that @ericdallo :)

thanks 1

I just linked the webpage and the channel 😅


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:


@mail990 I can assure you it's worth the time.


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….

💪 1

VS Code + Calva is also very nice. But I'll try to respect the religion of this channel.

😂 3
🙏 3

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

☝️ 1

the same for CoC/neovim if using LSP ☝️ metal


Just too much choice and religion for a beginner…


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

🙏 1
📿 1

it's risky to state "vscode the modern day successor to emacs" in #emacs 🙂

😁 3

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.


yeah it's a long term investment


had to learn at uni in end of 90s (to work with Java no less), used it almost exclusively ever since.


vscode does some things better, emacs others.


It's also fun to use ( although that is quite subjective on what one's idea of fun is 🙂 )


I hate elisp with a passion personally


yet, it works, so


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


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


ok, thanks, I’ll give it a try


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

metal 1

I am still using emacs own key bindings


@dpsutton what are the features not possible on x?


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


Interesting 😄

David Vujic17:11:41

I also began my emacs journey through clojure and the Clojure for the Brave & True I started learning clojure less than two years ago, and there were a lot of really nice editor alternatives out there - but I went for emacs anyway. Much because of the author Daniel Higginbotham recommending it - even though when he wrote it, there probably wasn’t that many of them to choose from. I haven’t regret choosing emacs, even though it made the learning curve quite a lot more :snow_capped_mountain: 😆 These days, I write JavaScript, TypeScript, Clojure and Python code using Emacs. I still accidentally try to “Yank” and “Kill” text meant to be cut & copied from browsers, notes and other non-emacs stuff. picard-facepalm

emacs 1

For other applications, I am using a small autohotkey scripts to bind M-W and C-Y to C-c and C-v

👍 1
nice 1
emacs 1
kimim10:11:55 you could fork and adjust to your habit, if you use windows.