I have "Detect width from file" option checked in preferences. But geany often fails to detect indentation width for some python files, for example:
```python import unittest
class MyTestCase(unittest.TestCase):
def test_test(self): # test # test # test pass ```
For this file indentation is set to 8 spaces (should be 4).
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1008
The detection width is set by a heuristic based on a "factored most common" and is not language specific. With a heuristic there will always be situations where it will get it wrong. In particular a language like Python tends to have most indents at a multiple of the minimum, so it is likely to be most at risk.
The most accurate method would be to make it language dependent, especially for Python where indent is syntax.
But that would need support for language specific capabilities to be added via plugins since we do not want to hard code language specific features for all the number of languages we support. That plugin capability has been discussed, but does not exist at the moment.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1008#issuecomment-214265851
github-comments@lists.geany.org