this post was submitted on 15 Jun 2024
16 points (94.4% liked)

Neovim

2161 readers
3 users here now

founded 1 year ago
MODERATORS
 

I'm normally a straight vim user (just out of habit, no particular preference) and I'm giving neovim a spin. So far I like it but...

For the love of all that's holy, how do I disable automatic indentation?

I have noautoindent set, nosmartindent set, filetype indent off, but neovim keeps inserting indentations. The only thing that works is setting paste on, but that's not the right solution to this problem.

Please help. This is driving me nuts!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] oscar@programming.dev 6 points 5 months ago (13 children)

Are you using treesitter? I think that has an option to handle indentation, but I'm not sure if it's enabled by default.

[โ€“] ExtremeDullard@lemmy.sdf.org 3 points 5 months ago* (last edited 5 months ago) (12 children)

I'm not using anything at the moment.

My intention was to give naked Neovim a spin and make sure it performs how I like Vim to perform. Then once it covers what I consider the basics, I was planning on layering kickstart.nvim on top of it and customizing Kickstart to my odd tastes.

The problem being, my odd tastes include:

1/ ABSOLUTELY NO AUTOINDENT. I hate autoindent with a burning passion, in all circumstances

2/ Must work in an 80-column terminal, meaning no line numbers - or at least line numbers that can be disabled. I've survived 40 years without line numbers, I can go on without them a few more ๐Ÿ™‚

Right now I'm stuck at 1/ without even having installed Kickstart. I'm not installing it until I manage to disable autoindent. And I still haven't found out how to do that, so I'm back to vanilla Vim for now because I have work to do.

[โ€“] oscar@programming.dev 1 points 5 months ago

Gotcha. That's actually good because it will be easier to troubleshoot. I will try to reproduce in a barebones config and see if I can figure something out. What language are you editing, and what version of neovim do you use? Distro may also be relevant in case they package some indent.vim file(s).

load more comments (11 replies)
load more comments (11 replies)