Comments (7)
Neat, but I feel like your symbol-overlay-jump-avy
function doesn't do anything in particular to integrate with symbol-overlay
. My take is that you could submit it for addition to avy.el
as avy-jump-symbol-at-point
or similar, and then indeed you might find it helpful in your personal config to bind it in symbol-overlay-map
.
from symbol-overlay.
It's true, I originally created it as an avy
function, and then realized I'd like it more as a symbol-overlay
function. I think it fills in a nice use case to go with the other symbol-overlay-jump-
functions. I'm still working on the version for avy
, it supports avy-all-windows
though I don't fully understand it yet. I guess the symbol-overlay
version should use symbol-overlay-get-symbol
in place of thing-at-point
?
from symbol-overlay.
I guess the
symbol-overlay
version should usesymbol-overlay-get-symbol
in place ofthing-at-point
I think so, but I don't see much added value tbh, and I don't think we'd pull it into symbol-overlay
itself due to the dependency, as you initially mentioned.
from symbol-overlay.
I assumed a few declare-function
s and a featurep
check around the define-key
could ameliorate any warnings and dependency issues. This just feels to me like a nice way for symbol-overlay
to leverage another popular package without having a hard dependency.
from symbol-overlay.
This just feels to me like a nice way for
symbol-overlay
to leverage another popular package without having a hard dependency.
It's still a hard dependency if you can hit a key and get an error that some other package is not installed. It's possible to work around this, but it's bad practice, and I'd gripe about it if submitted to MELPA for my review. Generally if there's a little add-on like this, it's preferable to publish it as a separate package which declares its dependencies and byte-compiles cleanly.
from symbol-overlay.
I opened an issue with avy about this and will see what comes of it. abo-abo/avy#312
from symbol-overlay.
Jumping for current symbol and among all symbols is so useful for me, hope it'll benefit others as well.
;; ### avy jump
(defun my/symbol-overlay/avy-jump ()
(interactive)
(avy-with my/symbol-overlay/avy-jump
(avy-jump
(symbol-overlay-regexp (symbol-overlay-get-symbol))
:window-flip nil
:beg nil
:end nil)))
(keymap-set symbol-overlay-map "j" #'my/symbol-overlay/avy-jump)
;; ### avy jump among all
(defun my/symbol-overlay/avy-jump/all ()
(interactive)
(let* ((overlays (symbol-overlay-get-list 0))
(symbols (seq-map
(lambda (overlay)
(overlay-get overlay 'symbol))
overlays))
(symbols (seq-uniq symbols))
(symbols-regex (seq-map
(lambda (symbol)
(symbol-overlay-regexp symbol))
symbols))
(symbols-regex (string-join symbols-regex "\\|")))
(message (format "regex: %s (%s)" symbols-regex (length symbols-regex)))
(if (string-empty-p symbols-regex)
(message "No symbol overlay")
(avy-with my/symbol-overlay/avy-jump/all
(avy-jump
symbols-regex
:window-flip nil
:beg nil
:end nil)))))
(keymap-global-set "s-o j" #'my/symbol-overlay/avy-jump/all)
(keymap-set symbol-overlay-map "J" #'my/symbol-overlay/avy-jump/all)
from symbol-overlay.
Related Issues (20)
- Is it possible to use more than 8 colors? HOT 7
- Overlay on selection HOT 4
- symbol-overlay-rename not works in wgrep buffer
- Activating overlays in a transient manner HOT 3
- args-out-of-range error HOT 15
- Tag a new release HOT 1
- Support not putting boundaries on match HOT 2
- Support other search tools, like `swiper-isearch-thing-at-point` HOT 3
- void-variable clojure-font-lock-extra-keywords HOT 7
- Symbol-overlay conflicts with haskell-mode HOT 4
- Request: Add case insensitive
- `symbol-overlay-list-all`
- Overlay conflicts with eglot HOT 4
- Adding package to NonGNU ELPA HOT 2
- Evil implementation? HOT 1
- 11749c3 breaks things HOT 6
- Cannot be used with yasnippet
- SO didn't recognize sharp quote(function quote), is this made by design or a bug?
- Jumping to next symbol (switch-forward) skips to last on screen HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symbol-overlay.