-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add lexical support and WSL clipboard functions
- Loading branch information
Showing
8 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Basic configuration for core aspects of Emacs. | |
* Preamble | ||
|
||
#+begin_src emacs-lisp | ||
;;; core.el --- Cunene: My emacs configuration Copyright © 2021 Marco Craveiro | ||
;;; core.el --- Cunene: My emacs configuration. -*- lexical-binding: t -*- | ||
;; Author: Marco Craveiro <[email protected]> URL: | ||
;; https://github.com/mcraveiro/prelude Version: 0.0.3 Keywords: convenience | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Configuration related to programming. | |
* Preamble | ||
|
||
#+begin_src emacs-lisp | ||
;;; core.el --- Cunene: My emacs configuration Copyright © 2021 Marco Craveiro | ||
;;; core.el --- Cunene: My emacs configuration. -*- lexical-binding: t -*- | ||
;; Author: Marco Craveiro <[email protected]> URL: | ||
;; https://github.com/mcraveiro/prelude Version: 0.0.3 Keywords: convenience | ||
|
||
|
@@ -325,7 +325,7 @@ _p_rev _u_pper (mine) _=_: upper/lower _r_esolve | |
;; Improve performance by not logging debug info. | ||
;; https://www.reddit.com/r/emacs/comments/1447fy2/looking_for_help_in_improving_typescript_eglot/ | ||
;; | ||
(fset #'jsonrpc--log-event #'ignore) | ||
; (fset #'jsonrpc--log-event #'ignore) | ||
#+end_src | ||
|
||
* Diagrams | ||
|
@@ -916,6 +916,12 @@ TODO: for some reason we do not trigger the mode with =/**=, it seems to require | |
|
||
(require 'ansi-color) | ||
(add-hook 'compilation-filter-hook #'cunene/colorize-compilation-buffer) | ||
|
||
(defun cunene/recompile-quietly () | ||
"Re-compile without changing the window configuration." | ||
(interactive) | ||
(save-window-excursion | ||
(recompile))) | ||
#+end_src | ||
|
||
* Lisp | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Interaction with the outside world. | |
* Preamble | ||
|
||
#+begin_src emacs-lisp | ||
;;; external.el --- Cunene: My emacs configuration Copyright © 2021 Marco Craveiro | ||
;;; external.el --- Cunene: My emacs configuration. -*- lexical-binding: t -*- | ||
;; Author: Marco Craveiro <[email protected]> URL: | ||
;; https://github.com/mcraveiro/prelude Version: 0.0.3 Keywords: convenience | ||
|
||
|
@@ -78,6 +78,10 @@ Todo: | |
#+begin_src emacs-lisp | ||
(use-package eshell | ||
:config | ||
(add-hook 'eshell-mode-hook | ||
(lambda () | ||
(setq-local imenu-generic-expression | ||
'(("Prompt" " $ \\(.*\\)" 1))))) | ||
(require 'em-hist) | ||
(require 'em-alias) | ||
(add-to-list | ||
|
@@ -97,6 +101,7 @@ Todo: | |
;; ([remap eshell-list-history] . helm-eshell-history) | ||
)) | ||
|
||
|
||
;; Start a new eshell even if one is active. | ||
(global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t))) | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Key features. | |
* Preamble | ||
|
||
#+begin_src emacs-lisp | ||
;;; features.el --- Cunene: My emacs configuration Copyright © 2021 Marco Craveiro | ||
;;; features.el --- Cunene: My emacs configuration. -*- lexical-binding: t -*- | ||
;; Author: Marco Craveiro <[email protected]> URL: | ||
;; https://github.com/mcraveiro/prelude Version: 0.0.3 Keywords: convenience | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Playing music from Emacs. | |
* Preamble | ||
|
||
#+begin_src emacs-lisp | ||
;;; music.el --- Cunene: My emacs configuration Copyright © 2021 Marco Craveiro | ||
;;; music.el --- Cunene: My emacs configuration. -*- lexical-binding: t -*- | ||
;; Author: Marco Craveiro <[email protected]> URL: | ||
;; https://github.com/mcraveiro/prelude Version: 0.0.3 Keywords: convenience | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Changes to core behaviour to make life better. | |
* Preamble | ||
|
||
#+begin_src emacs-lisp | ||
;;; quality_of_life.el --- Cunene: My emacs configuration Copyright © 2021 Marco Craveiro | ||
;;; quality_of_life.el --- Cunene: My emacs configuration. -*- lexical-binding: t -*- | ||
;; Author: Marco Craveiro <[email protected]> URL: | ||
;; https://github.com/mcraveiro/prelude Version: 0.0.3 Keywords: convenience | ||
|
||
|
@@ -585,6 +585,23 @@ other occurrences changed in the same way, with visual feedback as you type. | |
;; note - this should be after volatile-highlights is required | ||
;; add the ability to cut the current line, without marking it | ||
(require 'rect) | ||
|
||
;; WSL only. As per this post: | ||
;; https://www.fredgruber.org/post/wsl_emacs_clipboard/ | ||
;; | ||
(defun cunene/wsl-copy-clip(&rest _args) | ||
"Write the region to a file and then copy it to the Windows clipboard." | ||
(setq mytemp (make-temp-file "winclip")) | ||
(write-region (current-kill 0 t) nil mytemp) | ||
(shell-command (concat "clip.exe<" mytemp)) | ||
(delete-file mytemp)) | ||
;; (advice-add 'kill-new :after #'cunene/wsl-copy-clip) | ||
|
||
(defun cunene/wsl-copy-selected-text (start end) | ||
(interactive "r") | ||
(if (use-region-p) | ||
(let ((text (buffer-substring-no-properties start end))) | ||
(shell-command (concat "echo '" text "' | clip.exe"))))) | ||
#+end_src | ||
|
||
* Mark | ||
|
This file contains 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
This file contains 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