this post was submitted on 24 Sep 2024
23 points (96.0% liked)

Neovim

2197 readers
6 users here now

founded 2 years ago
MODERATORS
 

Hello, I’m a developer wanting to change from VSCode to Neovim. I’ve been using a Neovim extension for VSCode, so I know how to drive it to some extent.

I work with:

  • Rust
  • Typescript
  • React

I’m happy to use default NVim mostly with:

  • ctags
  • ins-completion
  • netrwtreelisting

I want to keep things really simple and use defaults when reasonable.

I basically just want to know how to set up Rust analyser and (for ts) prettier/eslint.

Questions:

  • Should I use a nvim conf file or lua? I’m happy to learn Lua if it’s recommended.
  • If I need packages for the above functionality, which package manager is best (excuse the imprecise terminology)?
  • Any additional recommendations?

Thank you.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 2 months ago (2 children)
  • Yes, definitely use lua. You don't need to learn much, you can learn as you go
  • I'd recommend lazy.nvim as a plugin manager

In fact, just start with kickstart.nvim. It is a starter config which is well documented and all in one file. It is a great starting point and you can then build from there. I'd recommend learning how to modularize and start moving stuff for separate concerns into separate files.

[–] lkdm 1 points 2 months ago (1 children)

Thank you, I’ll look into kickstart!

Here’s where I’m at. After a bit of fiddling, I managed to get Rustacean LSP working.

I also used ChatGPT to translate my existing .vim config to lua.

[–] [email protected] 5 points 2 months ago* (last edited 2 months ago)

Looking good! You should switch to lazy from packer though. It's simple:

  • You just need to add a lazy.lua file (just copy the one from the "Structured setup" section in lazy installation documentation)
  • Then instead of a plugins.lua, you can create a plugins/ directory instead where you can have separate .lua files in it and lazy will automatically detect them.
  • Just follow the lazy Plugin Spec documentation and move over your packer plugins to lazy