Closed kootenpv closed 8 years ago
Hi, thanks for raising this issue.
By default, all modes that are derived from prog-mode
uses defun
as the default thing to be in focus (defined in Thing At Point). It seems like this is a bad fit for python, as it only works with classes and functions.
Try adding this to your config:
(add-to-list 'focus-mode-to-thing '(python-mode . paragraph))
Does this produce a more satisfying result?
In terms of highlighting, yes it solves the problem! Thanks! It unfortunately introduces a new problem: my screen flickers, causing a very stuttering feeling when I change "block".
Here I have an idea what could be related: whenever I move my cursor I have "recenter-screen" called (so my cursor is always in the middle, except when at bottom or end of a file). Perhaps you're doing something similar.
Oh and in case it helps, I'm using Emacs 24.4.
Sadly, I am not able to reproduce this error. I've tried using center-cursor-mode
along with focus, and it seems to work fine.
This seems unrelated to the Python bug, so I'll close this issue (assuming that the customization I suggested was satisfactory). If you want me to further investigate the flickering-bug, please open a new issue, and provide some reproducible example.
It does not highlight single lines in the highest level (most notably imports). In fact, it stays on a class defined a couple of lines down (when scrolling up from that class).
I hope there is a solution, since I really like the idea.