Closed paaguti closed 1 month ago
OK, I should be using buffer.tab_width
and not buffer.indent
.. So my question: what is the use of buffer.indent
then? Maybe an example in the documentation could illustrate the use...
buffer.indent
is the width (number of spaces) in a level of indentation, when the indentation is composed of spaces. buffer.tab_width
is the width (number of spaces) in a level of indentation, when the indentation is composed of tabs. As mentioned in the API documentation, buffer.indent
is 0
by default, which will match buffer.tab_width
. Having different values for these settings often just causes confusion, and buffer.tab_width
is the more familiar setting, so that's what you see in the manual.
Hi,
I'm on nightly, Ubuntu 22.04. In my init.lua I have a simple function to set indentation according to buffer mode:
And I connect it to the LEXER_LOADED with:
Indentation seems to work correctly set. However, the status bar message doesn't seem to change from 'Spaces: 8' when the lexer is loaded.