larstvei / Focus

Dim the font color of text in surrounding paragraphs
485 stars 16 forks source link

Also highlight document string. #18

Closed jcs090218 closed 4 years ago

jcs090218 commented 5 years ago

Is there a way that also highlight the document string? Or at least highlight multi-line comment when my cursor is on it.

focus-test

larstvei commented 5 years ago

The whole process of deciding "what is a chunk?" is outsourced to the thing at point library. From focus, you can set the focus-mode-to-thing variable or invoke the focus-change-thing to change what sort of thing you want highlighted, but it's restricted to things that are recognized by the thing at point library.

I am not sure there is a thing from thing at point which will recognize the docstring. Maybe try to invoke focus-change-thing and set it to paragraph? Then it will focus in on everything between two blank lines.

I would like to keep the job of deciding what a meaningful chunk outsourced, but maybe there is a better alternative than thing at point out there? One alternative that I have thought about is expand region which does a better job of recognizing a semantically meaningful chunk for many different languages, but I wasn't able to get a successful implementation.

I think your best bet is to see if you can customize the thing at point library to get the result you want. I'm sorry I'm not able to provide you a quick fix to the very reasonable request!

larstvei commented 5 years ago

Hi! I just found this reddit post. Maybe this resolves your issue?