Trying to debug ts
/ sw
identing problems with old codebase
#1723
Unanswered
smithwinston
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Try to define explicitly the options you want in vim.opt_local.expandtab = false
vim.opt_local.shiftwidth = 3
vim.opt_local.tabstop = 8 |
Beta Was this translation helpful? Give feedback.
1 reply
-
I realize that I probably should have posted this in the LazyVim/LazyVim discussions rather than here as it seems like a more appropriate place (and somewhat busier), so I'm going to repost it there and close this one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an old codebase (I think old FreeBSD style) that uses hard 8-stop tabs for tabbing and 3 spaces for indents (don't ask, I have no choice here!). For function bodies, column 0 contains a TAB and any subsequent nesting from control structs is 3 spaces, e.g.:
In Emacs, this modeline works just fine
tab-width: 8; c-basic-offset: 3
, and in plain vim (ornvim --clean
), then the following vim modeline also works just finevim:ts=8:sw=3:noet
.However, with Lazy (and I'm just using a configuration based on josean's lazyvim config from his yt videos) the indenting seems all wrong, it seems to want to replace any tabs with
sw
spaces (in this case 3). I checked the settings forts
,sw
andnoet
with:verbose set ts?
etc. and it says they are being set by the modeline. I've also played around disablingsmartindent
andautoindent
but it doesn't make a difference (sts
is also0
).I have a suspicion that one of the packages in the lazyvim config is overriding the settings, but I can't figure out which package it is. Any ideas how to debug which, or better yet anyone know what might be causing this?
NOTE: This isn't a formatter problem, this happens as you edit not format-on-save (I have that disabled).
These are the 55 packages lazy is showing as loaded, mostly transitive dependencies (below).
Thanks for any insights!
Beta Was this translation helpful? Give feedback.
All reactions