vim

Danny Hull 2024-01-13T20:33:27.247519Z

How wise is it to use Neovim for Clojure web development? Currently use VS Code and have tried to use AstroNvim before, but I couldn't get all the bells and whistles going

practicalli-johnny 2024-01-15T07:00:53.837839Z

Astronvim community has a Clojure pack https://practical.li/neovim/configuration/astronvim/

2024-01-13T20:35:17.490749Z

It's been working out fine for me.

Danny Hull 2024-01-13T20:35:40.730859Z

Any suggestions?

Danny Hull 2024-01-13T20:35:47.936989Z

Regarding nvim

2024-01-13T20:35:58.330239Z

in response to your edit: I'd be happy to share my config/plugins I use if that'd be helpful

Danny Hull 2024-01-13T20:36:10.360279Z

That would be awesome!

2024-01-13T20:36:19.404269Z

I don't think there's any web-dev specific stuff you need, just regular clojure plugins just a sec

Danny Hull 2024-01-13T20:36:33.917369Z

I guess so

Danny Hull 2024-01-13T20:38:07.384249Z

Also I don't think I'm there yet concerning proficiency. I always felt like I was overthinking simple actions and not understanding how some actions work and why some actions behave the way they do

Danny Hull 2024-01-13T20:38:32.046139Z

But I think that's mostly about being proficient at vim

Danny Hull 2024-01-13T20:40:46.929889Z

Maybe also some tips there?

Danny Hull 2024-01-13T20:41:15.476679Z

And is there an active vim/nvim community you can suggest?

2024-01-13T20:42:12.448009Z

here it is: https://gist.github.com/jacobobryant/d40fece1da5e54681879c6df4e17af35 list of plugins are at the top; those are the main things I'd look at. They're installed with https://github.com/junegunn/vim-plug. Are you thinking about proficiency with vim in general or proficiency with vim + clojure specifically? I'm not part of any vim/nvim communities (other than this channel, heh), but I assume there's probably an active subreddit?

Danny Hull 2024-01-13T21:20:12.591209Z

> Are you thinking about proficiency with vim in general or proficiency with vim + clojure specifically? At that point, I was thinking about vim in general, but I think both are high-priority I'm guessing

2024-01-13T21:56:53.917619Z

Sounds good--I remember starting out with https://superuser.com/questions/246487/how-to-use-vimtutor and finding it helpful. Looks like you can run nvim +Tutor from the terminal to start it. I think that'd be a good way to build your muscle memory with vim first. Once you feel more comfortable with vim in general, then I'd take a look at the vim-sexp and vim-sexp-mapping-for-regular-people plugins and learn how to use some of the keybindings; just enough so editing clojure doesn't feel painful. Then the last big piece is conjure--learning to use vim to interact with the repl. And then after that there's all the fiddling/piecing together all the remaining plugins so you have a decent IDE-like experience 😉 . I'd definitely take it a step at a time; better to nail fundamentals before moving on. Also, if you mainly just want to get a working clojure editor/IDE set up and aren't necessarily/specifically interested in vim, I think Cursive is worth checking out. Maybe you'll have better luck with it than VS code?

âž• 1
2024-01-13T21:57:56.068729Z

(re: my last paragraph: I might've misunderstood your original comment; I thought you meant you couldn't get the bells and whistles going with VS Code, but on second read I'm pretty sure you just meant with AstroNvim)

2024-01-13T22:00:22.765769Z

though cursive (and vs code) do also have vim plugins, so that might also be worth checking out: you can get used to basic editing with vim first and then decide later if you want to jump in all the way. (fwiw I do prefer "real" vim/nvim myself over plugins--window/buffer management is one reason)

Danny Hull 2024-01-20T20:58:36.265619Z

@robbie.huffman I have some questions: • Why tmux? Isn't a regular terminal enough? • What do you mean by shadow-cljs projects? And as opposed to what?

Nundrum 2024-01-20T21:07:07.594769Z

Regarding tmux: I like having one program that work the same on desktop and on remote sessions. And is easy to set up no matter which computer I'm working from. I like the slimux plugin which lets me use a lot of languages "almost like a repl". Being able to reattach sessions is very nice. I know there are other ways to work on ClojureScript, like figwheel. But I also find it nice that Conjure works the same on Clojure and babashka projects.

Danny Hull 2024-01-20T21:11:39.307119Z

@robbie.huffman Regarding Neovim: • What plugins do you use to make your Clojure development experience smoother with nvim? • The basis of the previous question: have you ever felt the urge to switch to more mouse-based editors like VSCode because editing Clojure with neovim was a pain in the butt? Edit: added "smoother"

Nundrum 2024-01-20T22:41:36.797609Z

When I go back to using the mouse a lot, it just hurts my elbow.

Nundrum 2024-01-20T22:42:04.394029Z

Here is my neovim plugin list:

"editing
Plug 'tpope/vim-surround'
Plug 'tmsvg/pear-tree'
Plug 'ervandew/supertab'
Plug 'echasnovski/mini.nvim'
Plug 'tpope/vim-commentary'
Plug 'neovim/nvim-lspconfig'
Plug 'dcampos/nvim-snippy'
Plug 'w0rp/ale'

"ALE
let g:ale_linters = {'clojure': ['clj-kondo']}

"Tmux 
Plug 'christoomey/vim-tmux-navigator'

"Clojure
Plug 'Olical/conjure'

Danny Hull 2024-01-20T23:04:58.846529Z

Love how minimal your setup is

Nundrum 2024-01-16T01:23:41.877989Z

I've been very happy with Neovim + Conjure + tmux while working on shadow-cljs projects.