larstvei / focus Goto Github PK
View Code? Open in Web Editor NEWDim the font color of text in surrounding paragraphs
Dim the font color of text in surrounding paragraphs
I don't know why, but I finally tracked down some broken modes (like customize-faces, but C-x C-c which normally exits for me also gets broken).
I included focus with
(use-package focus :ensure t)
Not entirely sure why so I thought I'd report it. It was the most recent melpa version: 20161013.401
Feel free to close this although I would love to use the functionality, I don't have the time to figure out the interesting interaction with my other commands...
If I make a change to a buffer that has focus-mode enabled, and then refresh it (this is common when working with version control systems), the buffer remains completely unfocussed and must be explicitly disabled and enabled again.
It seems that when an autocomplete window appears the grayed out regions unfocus. Any ideas here? Thanks.
Hi,
currently focus-unfocused
inherits from font-lock-comment-face
which I get but might be suboptimal. E.g. consider when focusing on a defun, and the defun begins with a comment. Then the "unfocused" regions and the comment have the same color which might make it harder to draw a line when the comment is longer.
What do you think about inheriting from shadow
, which might be the semantically more accurate face to use, since the intention is to "dim" the unfocused parts of the buffer?
I currently use 'bar as cursor-type but when I enter read-only mode. It reverts back to the default cursor and stays as it is even after I quit focus mode
Read-only-mode doesn't work with evil.
Thanks for sharing this plugin, it's appreciated. It reminds me of LimeLight.
But I found it hard to read other syntax color when it's not lightened up, and navigate it every time to see the syntax highlighting.
Would it not be a great idea, to use the according colorscheme, but a little darkened (like 80% of opacitiy, while focus have 100% opacitiy), instead convert the non-focus text to one color?
Very absurd, but somehow after loading focus-mode, it changes these settings to use Recentf rather than find file or switch buffer?!
I have the habit of formatting my text on Evil mode using the command "gwap" (evil-fill), and Focus does not recognize these paragraphs, even though there are blank lines between them.
Hi, would there be any interest in adding Focus to NonGNU ELPA? That would allow for it to be installed without any further configuration from Emacs 28 onwards.
A non-fatal error occurs when I execute the following steps with the helm
interface:
focus-mode
M-x
or execute-extended-command
with helm
C-g
It is not fatal but toggling the mode is an inconvenience. 😄
Error Message:
Error in post-command-hook (focus-move-focus): (wrong-type-argument overlayp nil)
Hi! I find the idea of focus fantastic. However, when I try to use focus I get "Can’t enable focus mode when no theme is loaded." It would be very nice if focus could work without a theme, similar to the way that fancy-narrow works(which I use often and love). Any plans for this? Thanks!
Possibly with just the ability to set the unfocused color.
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.
Hey I'd love to use this but I'm on MELPA-stable exclusively. Could you consider tagging a release?
Details: https://github.com/milkypostman/melpa#stable-packages
color-rgb-to-hex
takes 3 arguments. This causes focus to blow up when I load it.
Debugger entered--Lisp error: (wrong-number-of-arguments (3 . 3) 0)
color-rgb-to-hex()
apply(color-rgb-to-hex nil)
focus-average-colors(unspecified unspecified)
apply(focus-average-colors (unspecified unspecified))
focus-make-dim-color()
focus-init()
focus-mode()
(closure (t) nil (setq show-trailing-whitespace t) (whitespace-mode-with-local-variables) (focus-mode) (rainbow-mode) (prettify-symbols-mode) (eldoc-mode) (flycheck-mode) (yas-minor-mode) (company-mode) (smartparens-strict-mode)
Hey @larstvei 👋 Thank you so much for Focus. I've got a lot of stuff I love in my Emacs config, but Focus is very high up on the list!
I'm not sure if this would even be possible, as I'm not familiar with how the point works when visiting the same buffer in a split pane(s). But, I was wondering if it might be possible to highlight the function at the point, depending on the point's position in each pane.
So, one buffer open in a split pane. The one on the left I have the point on one function, the one on the right I have the point at a differing function in that same buffer. I'd like both functions to be highlighted and the rest dimmed as usual.
Like I say, I'm not entirely sure if this is even possible, due to how Emacs may manipulate the point based on panes (when flipping to/from panes, does it simply record the point position, then actually move the point back to that position when re-focussing that pane?), but I figured I'd drop this issue in to see what your thoughts are :)
See discussion on ffd97a5.
When installing on emacs 24.4.1 on Debian and enabling with "M-x focus-mode" i get the following error:
Debugger entered--Lisp error: (wrong-type-argument listp "Dim the font color of text in surrounding sections.")
custom-declare-group((quote focus) "Dim the font color of text in surrounding sections." :group font-lock)
byte-code("\300\301!\210\300\302!\210\303\304\305\306\307$\210\310\311\312\313\314DD\315\316\317\306\320&�\210\310\321\312\313\322DD\323\316\324\306\320&�\207" [require cl-lib thingatpt custom-declare-group (quote focus) "Dim the font color of text in surrounding sections." :group font-lock custom-declare-variable focus-dimness funcall function #[0 "\300\207" [0] 1 "\n\n(fn)"] "Amount of dimness in out of focus sections is determined by this integer.\n\nA positive value increases the dimness of the sections. A\n\nnegative value decreases the dimness.\n\nThe default is 0 which means a 50/50 mixture of the background and foreground\ncolor." :type (integer) focus focus-mode-to-thing #[0 "\300\207" [((prog-mode . defun) (text-mode . sentence))] 1 "\n\n(fn)"] "An associated list between mode and thing.\n\nA thing is defined in thingatpt.el; the thing determines the\nnarrowness of the focused section.\n\nNote that the order of the list matters. The first mode that the\ncurrent mode is derived from is used, so more modes that have\nmany derivatives should be placed by the end of the list.\n\nThings that are defined include `symbol', `list', `sexp',\n`defun', `filename', `url', `email', `word', `sentence',\n`whitespace', `line', and `page'." (repeat symbol)] 8)
autoload-do-load((autoload "focus" "Dim the font color of text in surrounding sections.\n\n(fn &optional ARG)" t nil) focus-mode)
command-execute(focus-mode record)
helm-M-x(nil "focus-mode")
#<subr call-interactively>(helm-M-x nil nil)
ad-Advice-call-interactively(#<subr call-interactively> helm-M-x nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (helm-M-x nil nil))
call-interactively(helm-M-x nil nil)
command-execute(helm-M-x)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.