Created
July 11, 2024 17:57
-
-
Save colonelpanic8/04b228cf3a8b1ae81160e56da2c073f4 to your computer and use it in GitHub Desktop.
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
;; -*- no-byte-compile: t -*- | |
(let ((bootstrap-file (concat user-emacs-directory "straight/bootstrap.el")) | |
(bootstrap-version 2)) | |
(unless (file-exists-p bootstrap-file) | |
(with-current-buffer | |
(url-retrieve-synchronously | |
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" | |
'silent 'inhibit-cookies) | |
(goto-char (point-max)) | |
(eval-print-last-sexp))) | |
(load bootstrap-file nil 'nomessage)) | |
(setq native-comp-deferred-compilation-deny-list '("magit")) | |
(setq native-comp-always-compile t) | |
(setq load-no-native t) | |
(setq no-native-compile t) | |
(setq warning-minimum-level :emergency) | |
(setq straight-disable-native-compile t) | |
;; This is a workaround for an issue in emacs28 with symlinks. See https://github.com/radian-software/straight.el/issues/701 | |
(defun my-patch-package-find-file-visit-truename (oldfun &rest r) | |
(let ((find-file-visit-truename nil)) | |
(apply oldfun r))) | |
(advice-add #'straight--build-autoloads :around | |
#'my-patch-package-find-file-visit-truename) | |
(setq package-enable-at-startup nil | |
straight-use-package-by-default t | |
straight-vc-git-default-protocol 'ssh) | |
(straight-use-package 'use-package) | |
(require 'use-package) | |
(use-package editorconfig | |
:config | |
(progn | |
(add-to-list 'editorconfig-exclude-modes '(org-mode)) | |
(editorconfig-mode 1))) | |
(use-package indent-bars | |
:straight (indent-bars :type git :host github :repo "jdtsmith/indent-bars") | |
:config | |
(indent-bars-mode +1) | |
:custom | |
(indent-bars-treesit-support t) | |
(indent-bars-treesit-ignore-blank-lines-types '("module")) | |
;; Add other languages as needed | |
(indent-bars-treesit-scope '((python function_definition class_definition for_statement | |
if_statement with_statement while_statement))) | |
;; wrap may not be needed if no-descend-list is enough | |
;; (indent-bars-treesit-wrap '((python argument_list parameters ; for python, as an example | |
;; list list_comprehension | |
;; dictionary dictionary_comprehension | |
;; parenthesized_expression subscript))) | |
:hook ((prog-mode) . indent-bars-mode)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should not:
Since that turns it on in whatever buffer happens to be active when the mode is loaded. The
:hook
is enough.