Compare commits
3 Commits
4392ad0a18
...
3eeead29fd
Author | SHA1 | Date | |
---|---|---|---|
3eeead29fd | |||
9f3a05e500 | |||
629baa89b3 |
36
init.el
36
init.el
@ -25,6 +25,22 @@
|
|||||||
(global-set-key (kbd "C-c <up>") 'mc/mark-previous-like-this)
|
(global-set-key (kbd "C-c <up>") 'mc/mark-previous-like-this)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(use-package highlight-indent-guides
|
||||||
|
:ensure t
|
||||||
|
:hook ((prog-mode . highlight-indent-guides-mode) ; Enable in programming modes
|
||||||
|
(treemacs-mode . (lambda () (highlight-indent-guides-mode -1)))) ; Disable in Treemacs
|
||||||
|
:config
|
||||||
|
(setq highlight-indent-guides-method 'character) ; Choose method: 'character', 'fill', or 'column'
|
||||||
|
(setq highlight-indent-guides-auto-enabled t)
|
||||||
|
(setq highlight-indent-guides-responsive 'top)
|
||||||
|
(setq highlight-indent-guides-character ?\|)) ; Character to display as indent guide
|
||||||
|
|
||||||
|
|
||||||
|
(use-package company
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(global-company-mode t))
|
||||||
|
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
;; custom-set-variables was added by Custom.
|
;; custom-set-variables was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
@ -72,6 +88,26 @@ version 2022-06-09"
|
|||||||
;; Disable line numbers for Treemacs
|
;; Disable line numbers for Treemacs
|
||||||
(add-hook 'treemacs-mode-hook (lambda () (display-line-numbers-mode 0)))
|
(add-hook 'treemacs-mode-hook (lambda () (display-line-numbers-mode 0)))
|
||||||
|
|
||||||
|
;; Clipboard integration (Not work in terminal)
|
||||||
|
(setq select-enable-clipboard t)
|
||||||
|
(setq select-enable-primary t)
|
||||||
|
|
||||||
|
;; Clipboard integration for terminal (Need xclip)
|
||||||
|
(when (not (display-graphic-p)) ;; Check if Emacs is running in the terminal
|
||||||
|
(defun my-copy-to-clipboard ()
|
||||||
|
"Copy region to clipboard using xclip."
|
||||||
|
(interactive)
|
||||||
|
(if (use-region-p)
|
||||||
|
(let ((text (buffer-substring-no-properties (region-beginning) (region-end))))
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert text)
|
||||||
|
(call-process-region (point-min) (point-max) "xclip" nil 0 nil "-selection" "clipboard"))
|
||||||
|
(message "Copied to clipboard"))
|
||||||
|
(message "No region selected.")))
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-c M-w") 'my-copy-to-clipboard))
|
||||||
|
|
||||||
|
|
||||||
;; For example, set the default tab width to 4 spaces
|
;; For example, set the default tab width to 4 spaces
|
||||||
(setq-default tab-width 4)
|
(setq-default tab-width 4)
|
||||||
;; For Python mode, set the indentation style
|
;; For Python mode, set the indentation style
|
||||||
|
Loading…
Reference in New Issue
Block a user