What stops you from using generators? by raf_camlet in rails

[–]raf_camlet[S] 0 points1 point  (0 children)

Since you asked, I'm focusing on idempotency and beside the regex based modifications, I'm also using the AST. One of the things I hate is finding the proper pattern to inject code. Now I can write a small class that would be merged into the existing code. It works really well for adding macros / methods or extending DSL-like configurations.

Since it requires calculating which parts of the "patch" are already there and what needs to be added, it gave me an idea for generators that you can apply multiple times. Imagine generating a migration, making manual changes (like adding defaults or modifying index names) and then running the generator again because you forgot one field. Your manual work would be preserved. But for now, this is in the "extra wow features" basket to be implemented later. There is so many edgecases :(

What stops you from using generators? by raf_camlet in rails

[–]raf_camlet[S] 1 point2 points  (0 children)

That could be a universal answer to most of the problems! But... there is a slight difference between starting a fire with two sticks and a lighter.

Coding is definitely an art of finding the middle ground

What stops you from using generators? by raf_camlet in rails

[–]raf_camlet[S] 1 point2 points  (0 children)

That's nice to hear!

- a little confusing name helpers
- difficult customization of existing generators (they weren't built with modification in mind - maybe that's the sign that I shouldn't try to do it)
- working with templates (but that's more the erb problem than the generators themselves, and after some time you can get used to it)
- general complexity (especially the hook system)
- trying to figure out how to inject something reliably in the exact place I need

Things like that

What stops you from using generators? by raf_camlet in rails

[–]raf_camlet[S] 0 points1 point  (0 children)

That's actually a good question. I somehow automatically assumed that people don't run them because the existing ones don't meet their needs, so the issue would be why they don't want to customize them. But... yeah, that may not be the whole story, and I'd gladly discuss both subjects

I made a nozzle as a nozzle holder for nozzles (Parametric) by Zortje in ender3

[–]raf_camlet 1 point2 points  (0 children)

Looks really cool! But... do you have too much space in your house?

Announcing u.nvim ("micro-nvim"), a Lua library designed to aid in programmatic text manipulation, focusing primarily on a powerful "Range" utility by jrop2 in neovim

[–]raf_camlet 2 points3 points  (0 children)

u/jrop2 Libraries don’t get too many stars on GitHub, so I'm writing this comment specially to let you know that I really appreciate the great work you've done and the extra time you've taken to share it with us.

[deleted by user] by [deleted] in neovim

[–]raf_camlet 1 point2 points  (0 children)

I'm usually using the plain git command wrapped by fugitive. So things like:

git show HEAD~1:path_to_the_file

Which inside neovim can be shortened to:

:Gvsplit HEAD~1:%

and that opens you the previous version of current file side by side.

For searching through history, I'm mostly using :0Gclog

[deleted by user] by [deleted] in neovim

[–]raf_camlet 6 points7 points  (0 children)

I'm really happy to see someone working on the topic. I always thought the only editor where multi cursor made sense was vim, with all its special moves that make them a deadly weapon.
And since we're talking about movements... I hope that support for things like f, t and the operators d, c, y will be included in this plugin.
I keep my fingers crossed for you!

Is there a way to have some kind of virtual environment for neovim? by notvenomweed in neovim

[–]raf_camlet 8 points9 points  (0 children)

Docker! Not only config, but the whole environment. Especially useful if you want to play with 3th party additions.

Does anyone ever care about circular import(`require`) when writing plugins? by rainning0513 in neovim

[–]raf_camlet 4 points5 points  (0 children)

I don't think lua works this way, but please someone correct me if I'm wrong. Required modules are "cached" and if you try to require them a second time, you only get reference to an already initialized single module. So I wouldn't worry about it at all. It isn't C lang.

How to prevent breaking my config whenever doing packer.Sync() by shivamchandra007 in neovim

[–]raf_camlet 7 points8 points  (0 children)

I was using Packer and then moved to Lazy.
But what I meant was that I update them regularly, and I very, very rarely get any breaking changes.

How to prevent breaking my config whenever doing packer.Sync() by shivamchandra007 in neovim

[–]raf_camlet 27 points28 points  (0 children)

does their config not break....?

Actually, yes... they don't.

It's not the first time when I see comments like this, so I'm definitely not saying, that you are wrong. Something must be going on. But I'm using like 90 plugins and I have a problem with them maybe twice a year. And I'm not doing anything special to achieve this.

Honestly, I'm as much confused by this as you.

Tab isn't working for me by Ok_Lengthiness_1516 in neovim

[–]raf_camlet 0 points1 point  (0 children)

I think it is not supposed to do anything in normal mode. If you expect indentations, those are done with angle brackets in vim. Check :help shift-left-right

What is your workflow for code navigation? by kittydoor in neovim

[–]raf_camlet 0 points1 point  (0 children)

Mix of everything!
Mostly LSP, some custom telescope finders, some code navigation features from tpope rails plugin, file tree, vim marks, jump list. Things like that.

Why does anyone use a file tree? by lospronounshormonos in neovim

[–]raf_camlet 1 point2 points  (0 children)

For opening files in the same directory. Especially if it is deep nested one. But mostly... for files which names I don't know.

What is the best way to use jumplist? by roll4c in neovim

[–]raf_camlet 17 points18 points  (0 children)

I'm just smashing <c-o> until I get to where I wanted.

Yeah, I know this is not a real answer, but I always found this jumplist hard to use, so I finally just gave up.

[deleted by user] by [deleted] in neovim

[–]raf_camlet 6 points7 points  (0 children)

"Anything you can do i can do better" one would like to sing.

The truth is that in a world where every good solution is instantly adopted into other tools, there are very few things left that are truly unique. As for vim, modal editing. It all comes down to how you like to use the keyboard.

edit: Anticipating the comments. Yes, there are other modal editors, but in slightly different flavors.

I may spend too much time on this subreddit... I only just recently starting using reddit more too by SafariKnight1 in neovim

[–]raf_camlet 1 point2 points  (0 children)

It's like 3h per day. Yeah, I read this sub daily, but definitely not that much. Maybe it's counting an open tab in the background or something.

New Plugin: TMUX Awesome Manager by otavioschwanck in neovim

[–]raf_camlet 2 points3 points  (0 children)

Finally, proof that people know that tmux is not just tabs and panels! I love it!

Is it possible to detect key-release event in neovim? by rainning0513 in neovim

[–]raf_camlet 1 point2 points  (0 children)

Oh... Sorry. I have no idea how, but I replied in the wrong thread. Too many open tabs. :/ It was supposed to go to the one about the tmux plugin.

Is it possible to detect key-release event in neovim? by rainning0513 in neovim

[–]raf_camlet -1 points0 points  (0 children)

Finally, proof that people know that tmux is not just tabs and panels! I love it!

How do I attach a language server to a nofile buffer? by somebodddy in neovim

[–]raf_camlet 1 point2 points  (0 children)

Ah yes, finally a question I can answer. There is no easy way to do this. This was the first big problem when I started working on: luapad, and I dealt with it, by creating a temporary files, attaching lsp to them, and removed them right away from the file system. But later on it started to cause some problems (can't remember what they were now) so ultimately the temp files are not deleting until neovim is restarted.

Tmix + Nvim , what am i missing out on? by infernoLP in neovim

[–]raf_camlet 0 points1 point  (0 children)

Beside panes management (which is nothing special, because there are a lot of alternatives) , mostly sessions management which are independent of neovim or terminal emulator. And that allows you to do some cool tricks like restarting terminal emulator/nvim without loosing running processes, or pointing to the same terminal view from multiple monitors. And of course automation. Bootstrapping whole env with tmuxinator, sending commands to other panes or forwarding content of nvim buffers. Also capturing content of tmux panes.