For clarity: I mean indents as represented by individual spaces, not tab characters.
I'm working with a friend on a javascript project, and while I'm an 80col zealot, he wants to have 4 space indent. It's not the end of the world, but it bothers the heck out of my eyes.
I know about the .dir-locals.el
trick, so I'll just stick the tab width in there, but I was wondering if there was a display hook or extension that would print any block identation as 2 spaces? For example, show this block
function greet(name) {
return `Hello, ${name}`
}
as this one
function greet(name) {
return `Hello, ${name}`
}
while actually writing 4 spaces into the file on disk. We already use prettier, so I can chuck in anything without having to worry what comes out on the other end, but I'd prefer to have a solution that just changes the display of the buffer in emacs. I don't really want to hassle with changing the real file contents every time I open a file.