techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.6K
active users

#neovim

18 posts18 participants1 post today

On #Neovim, if a language server executable is not available when a buffer tries to attach to it, what would be the simplest way to retry, without closing and reopen neither the buffer nor the editor? I have an user event that will notify when it’s ready

I added next-edit-prediction to my #neovim #nvim plugin.

This was pretty interesting to implement!

- I used an [lsp server](github.com/dlants/magenta.nvim) to track opened files and aggregate text changes to get a stream of diffs.

- I then feed that along with the [context surrounding the cursor](github.com/dlants/magenta.nvim), and a [system prompt](github.com/dlants/magenta.nvim) into an LLM, [forcing a tool use for a find/replace within the context window](github.com/dlants/magenta.nvim)

- Finally, I show the find/replace in the buffer using [virtual text extmarks](github.com/dlants/magenta.nvim), applying a comment effect to the added sections, and a strikethrough to the removed sections

One thing that is interesting about this is that I wasn't able to get good results from smaller/faster models like claude haiku, so I opted to use a larger model instead. I found that the small delay of about a second was worth it for more consistent results.

I also opted to have this be manually triggered (Shift-Ctrl-l by default in insert or normal mode). This is a lot [less distracting](unstable.systems/@sop/11489856).

One cool thing is that you can use a plugin parameter, or a project-level parameter to [append to the system prompt](github.com/dlants/magenta.nvim). I think by providing additional [examples of how you want it to behave](github.com/dlants/magenta.nvim), you can have it be a lot more useful for your specific use-case.

Sure, you can install a huge Vim plugin to help you format Markdown tables. Or, if you're like me and would like to keep your list of plugins short, and have #Pandoc installed anyway (because it rocks), you can simply do

setlocal formatprg=pandoc\ --from\ gfm\ --to\ gfm

in your ftplugin/markdown.vim, and then simply hit

gqip

("format interior of current paragraph") to reformat the messy table you're currently editing.

For years I've used solargraph to develop #Ruby on #Rails apps on #neovim but now I had the time to test #rubyLsp created by shopify and I need to say that ruby_lsp is better than solargraph with rails, this lsp is more efficient and actually the autocompletion is better too, neverthless I need to say that this is on Rails, if you want to build a ruby thing you need to create a several stuff that rails do. Usually solargraph works without dependencies

Continued thread

in december, a **rich kid** killed a killer just to make a point about the cost of medical care being so high (in the u.s.) that it kills & bankrupts many thousands of americans every year, but #neovim devs are talking about a future — within the next 10 years — where it's common to get elective neurosurgery, as if that could possibly be on the same tier of affordability as a bespoke, custom-soldered keyboard.

Continued thread

i don't know if this is the dumbest timeline, but it's pretty dumb!

#neovim

(it's a brilliant editor, and a brilliant development environment. It pains me to watch its dev team fall for bullshit like this.)

Continued thread

Honeymoon period has worn off. Vim definitely has some downsides. Mainly two: plugins crash unexpectedly all the time, including LazyGit, my LSP, and random dependencies. The second downside is difficulty in customization. Of course, it all comes with the territory, it's in line with the philosophy. But occasionally I get worn out and will switch back to VSCode to wrap up my work. On the bright side I'm more aware of my code structure and how it functions. I've also doubled the number of memorized git commands to get around LazyGit limitations. Honestly? I'm still pretty happy with vim, but not all in yet.