3 ms·
It's good to see this acknowledged. I tried to learn Clojure and appreciated the language but I just couldn't get my vim head around the emacs ecosystem well e
by __MatrixMan__ 4y ago
It's good to see this acknowledged. I tried to learn Clojure and appreciated the language but I just couldn't get my vim head around the emacs ecosystem well enough to experience the nirvana.
I may well try again.
- Fellshard 4y agoThe vim/evil-equipped distributions go a long way toward helping with this.
- jrvarela56 4y agoI haven't used vim in years but there's a package by Tim Pope: https://github.com/tpope/vim-fireplace https://github.com/tpope/vim-fireplace This is a key piece of the REPL workflow: you rarely type into the REPL, you use commands in your editor to select code and run it in a REPL. The idea is that you eval stuff in the same place you type, and that gets run in the same environment over and over again without having to restart it or redefine the data you're using to iterate your functions.
- delboni 4y agoGive a try to this setup: https://github.com/rafaeldelboni/nvim-fennel-lsp-conjure-as-clojure-ide https://github.com/rafaeldelboni/nvim-fennel-lsp-conjure-as-... It's for neovim, but is using very modern tools and even uses a clojure like lisp to configure the setup.
- __MatrixMan__ 4y agoI will, thanks!
- kgwxd 4y agoI'm a vim head too and tried to embrace emacs, because it seems the de facto standard, but I eventually realized it was dumb to trade my editor of choice for that reason, especially at the same time I'm learning a new language. So I ventured into Fireplace and the paredit equivalent (It's been a while so I forget the name) and I was much more comfortable with that setup. Also, I'm equally as comfortable in "standard" editors, like VS Code, since I have to use Visual Studio for work most of the time (vim plugins are ok, I just don't mind context switching, feels like it keeps the mind sharp). I've tried Calva for Clojure dev in VS Code and I think it's just as nice as the other setups. I don't think anyone using an "alternative" setup is going to miss out on any of the "big ideas" that make Clojure dev so nice. I suggest sticking with vim, at least to start. I've never had the opportunity to use Clojure in production projects but, as an exercise in learning the langue, I did a library that I've had to rewrite for many production systems (can't copy paste across companies), in various languages, over the past 15 years, and I liked the end result of the Clojure version way more than any other. It was objectively shorter and easier to reason about. Even the insane, invalid XML parsing that has to be done to integrate with a third-party interface. Just hope I get to use it, in a pragmatic sense, someday.
- djha-skin 4y agoIt's not as difficult as those who think they are elite would have you believe. Here is my common lisp setup easily adaptable to clojure: https://blog.djha.skin/p/developing-common-lisp-using-gnu-screen-rlwrap-and-vim/ https://blog.djha.skin/p/developing-common-lisp-using-gnu-sc... My thoughts on emacs versus vim and a better approach to trying to get them to be useful for things like common Lisp and Clojure: https://blog.djha.skin/p/emacs-users-im-okay-i-promise/ https://blog.djha.skin/p/emacs-users-im-okay-i-promise/ The main idea is that you don't need an IDE. Most Ides just copy and paste stuff for you into the repl, believing that you're too stupid to learn the commands inside the repl yourself and so they'll do it for you and you'll just learn a bunch of hotkeys. As if learning the hotkeys was easier than just learning the commands. I don't mean to offend anybody but this never made sense to me. Just learn the commands, then you can use the commands from whatever editor you want without having to relearn a bunch of hotkeys switching from emacs to vs code. Being a VIM person, I imagine you're pretty comfortable in the terminal and so will not have a problem just using the repl in one window with vim in the other. Then I just have a few plugins to make it easier to copy and paste between vim and the repl. I will say this, getting an LSP client for Clojure does help, but between that and syntax highlighting I'd say you're good to go.
- djtango 4y agoIt's absolutely NOT production ready but I once wrote a one-liner Vim macro to send clojure forms to the REPL via ncat: https://github.com/djtango/spartan-repl https://github.com/djtango/spartan-repl I tidied it up a little for my personal .vimrc but it works surprisingly well for how little effort it took to configure. One known issue is if the thread of execution spawns a sub thread then exits (because the ncat socket is closed) I was surprised just how lightweight a REPL editor integration could be - simply having a Vim editing experience over a REPL is pretty incredible
- barrell 4y agoI also tried to grok emacs when I started learning clojure. Returning to (neo)vim was one of the best days in my entire career. I now use clojure + neovim thanks to: https://github.com/Olical/conjure https://github.com/Olical/conjure Dead simple to set up and to use!