This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; `org-hide-emphasis-markers' is great, but when point is at the ends | |
| ;; of an emphasized piece of text, it's often not clear if you're in | |
| ;; position [A] or [B] (or, [X] or [Y]): | |
| ;; | |
| ;; [A]_[B]italicized[X]_[Y] | |
| ;; | |
| ;; This is frustrating, because sometimes you want to add text inside, | |
| ;; and sometimes you want to add adjacent text outside. The code below | |
| ;; tweaks `org' to help with with that problem, in two ways: | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local hotkey = require "hs.hotkey" | |
| local window = require "hs.window" | |
| local hse, hsee, hst = hs.eventtap,hs.eventtap.event,hs.timer | |
| local spaces = require "hs.spaces" | |
| function flashScreen(screen) | |
| local flash=hs.canvas.new(screen:fullFrame()):appendElements({ | |
| action = "fill", | |
| fillColor = { alpha = 0.35, red=1}, | |
| type = "rectangle"}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; An example building your own consult command. Here we take | |
| ;; advantage of fd's -X argument to find files with fd (e.g. recent | |
| ;; files, etc.) and search them with rg. Consult make this easy. | |
| (defun consult--ripgrep-fd-make-builder (paths) | |
| (let* ((opt-pat (rx (+ space) (group "--") (or (+ space) eos))) | |
| (fd-builder (consult--fd-make-builder paths)) | |
| (rg-builder (consult--ripgrep-make-builder nil)) | |
| (rg-builder-with-paths (consult--ripgrep-make-builder paths))) | |
| (lambda (input) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (let ((orig (default-value 'repeat-echo-function)) | |
| rcol ccol in-repeat) | |
| (setq | |
| repeat-echo-function | |
| (lambda (map) | |
| (if orig (funcall orig map)) | |
| (unless rcol (setq rcol (face-foreground 'error))) | |
| (if map | |
| (unless in-repeat ; new repeat sequence | |
| (setq in-repeat t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (use-package highlight-indentation | |
| :ensure highlight-indentation | |
| :init | |
| ;; Add a timer delay to the current column highlight for efficiency, | |
| ;; and to avoid flashing when scrolling or moving by line | |
| (defvar my/highlight-indentation-current-column-timer nil) | |
| (defun my/highlight-indentation-current-column () | |
| (highlight-indentation-redraw-window (selected-window) | |
| 'highlight-indentation-current-column-overlay | |
| 'highlight-indentation-current-column-put-overlays-region)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun my/eglot-next-highlight (&optional prev) | |
| "Move to the next symbol highlighted by eglot. | |
| Relative position within the symbol is preserved. Moves to the previous | |
| symbol if PREV is non-nil or called with a prefix argument. Wraps at | |
| beginning and end of the symbol set." | |
| (interactive "P") | |
| (let* ((p (point)) (b (current-buffer)) | |
| (overlays (sort (seq-filter | |
| (lambda (o) | |
| (eq (overlay-buffer o) b)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun my/elisp-xref-find-def-in-source (sym) | |
| "Find elisp files in the source directory." | |
| (let* ((elisp-xref-find-def-functions nil) ; recurses otherwise | |
| (records (elisp--xref-find-definitions sym))) | |
| (dolist (rec records) | |
| (when-let* ((file (xref-elisp-location-file (xref-item-location rec))) | |
| ( (and (stringp file) | |
| (string-match (rx ".el" (? ".gz") eos) file) | |
| (file-in-directory-p file lisp-directory))) | |
| (relname (file-relative-name file lisp-directory)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun my/org-link-heading-here (cand) | |
| (when-let ((marker (get-text-property 0 'consult--candidate cand))) | |
| (save-excursion | |
| (with-current-buffer (marker-buffer marker) | |
| (goto-char marker) | |
| (org-store-link nil t))) | |
| (org-insert-all-links 1 "" " "))) | |
| (defvar-keymap embark-consult-org-heading-map | |
| :doc "Keymap for operating on org headings" | |
| :parent embark-general-map |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (:jsonrpc "2.0" :id 63 :method "completionItem/resolve" :params | |
| (:label #("acorr" 0 1 ...) :kind 3 :data | |
| (:uri | |
| "file:///Users/jdsmith/code/python/test/test_axes.py" | |
| :position ... :funcParensDisabled t :symbolLabel | |
| "acorr") | |
| :sortText "09.9999.acorr")) | |
| [jsonrpc] e[19:11:33.283] --> textDocument/didChange | |
| (:jsonrpc "2.0" :method "textDocument/didChange" :params |
NewerOlder