mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-05 18:20:29 -08:00
Compare commits
6 commits
6365309164
...
f3b4314dda
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3b4314dda | ||
|
|
64b085b381 | ||
|
|
09a80927f3 | ||
|
|
a72c865c35 | ||
|
|
4c9dee2c78 | ||
|
|
4159a4f7da |
7 changed files with 21 additions and 40 deletions
|
|
@ -303,10 +303,6 @@
|
|||
:desc "Search project" "s" #'+default/search-project
|
||||
:desc "Open project scratch buffer" "x" #'doom/open-project-scratch-buffer
|
||||
:desc "Switch to project scratch buffer" "X" #'doom/switch-to-project-scratch-buffer
|
||||
(:when (and (modulep! :tools taskrunner)
|
||||
(or (modulep! :completion ivy)
|
||||
(modulep! :completion helm)))
|
||||
:desc "List project tasks" "z" #'+taskrunner/project-tasks)
|
||||
;; later expanded by projectile
|
||||
(:prefix ("4" . "in other window"))
|
||||
(:prefix ("5" . "in other frame")))
|
||||
|
|
|
|||
|
|
@ -785,11 +785,7 @@
|
|||
:desc "Save project files" "s" #'projectile-save-project-buffers
|
||||
:desc "Test project" "T" #'projectile-test-project
|
||||
:desc "Pop up scratch buffer" "x" #'doom/open-project-scratch-buffer
|
||||
:desc "Switch to scratch buffer" "X" #'doom/switch-to-project-scratch-buffer
|
||||
(:when (and (modulep! :tools taskrunner)
|
||||
(or (modulep! :completion ivy)
|
||||
(modulep! :completion helm)))
|
||||
:desc "List project tasks" "z" #'+taskrunner/project-tasks))
|
||||
:desc "Switch to scratch buffer" "X" #'doom/switch-to-project-scratch-buffer)
|
||||
|
||||
;;; <leader> q --- quit/session
|
||||
(:prefix-map ("q" . "quit/session")
|
||||
|
|
|
|||
|
|
@ -284,17 +284,7 @@ Also adds support for a `:sync' parameter to override `:async'."
|
|||
(save-excursion
|
||||
(when-let ((beg (org-babel-where-is-src-block-result))
|
||||
(end (progn (goto-char beg) (forward-line) (org-babel-result-end))))
|
||||
(org-display-inline-images nil nil (min beg end) (max beg end)))))))
|
||||
|
||||
(after! ob-python
|
||||
(when (equal org-babel-python-command-nonsession "python")
|
||||
(setq org-babel-python-command-nonsession
|
||||
(string-trim
|
||||
(concat python-shell-interpreter " "
|
||||
(if (string-match-p "\\<i?python[23]?$" python-shell-interpreter)
|
||||
(replace-regexp-in-string
|
||||
"\\(^\\| \\)-i\\( \\|$\\)" " " python-shell-interpreter-args)
|
||||
python-shell-interpreter-args)))))))
|
||||
(org-display-inline-images nil nil (min beg end) (max beg end))))))))
|
||||
|
||||
|
||||
(defun +org-init-babel-lazy-loader-h ()
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
#+since: 0.9
|
||||
|
||||
* Description :unfold:
|
||||
This module integrates [[https://editorconfig.org/][EditorConfig]] into Emacs, allowing users to dictate code
|
||||
style on a per-project basis with an =.editorconfig= file ([[https://editorconfig-specification.readthedocs.io/][formal
|
||||
specification]]).
|
||||
This module adds [[https://editorconfig.org/][EditorConfig]] support to Emacs, allowing users to dictate code
|
||||
style on a per-project basis with =.editorconfig= files ([[https://editorconfig-specification.readthedocs.io/][formal specification]]),
|
||||
with or without the native editorconfig binary.
|
||||
|
||||
** Maintainers
|
||||
- [[doom-user:][@hlissner]]
|
||||
|
|
@ -20,10 +20,6 @@ specification]]).
|
|||
- [[doom-package:editorconfig-emacs]]
|
||||
|
||||
** Hacks
|
||||
- Added logic to guess an extension-less file's type from its shebang line. For
|
||||
example, editorconfig rules for =*.py= files will apply to =bin/myscript=
|
||||
assuming its first line is ~#!/usr/bin/env python~. See
|
||||
~+editorconfig-mode-alist~ for adding support for more languages.
|
||||
- *Special integration for =dtrt-indent=:* If the local editorconfig file
|
||||
specifies ~indent_style~ or ~indent_size~, the [[doom-package:dtrt-indent]] (which tries to
|
||||
guess your indent settings by analyzing your text file) will bow out.
|
||||
|
|
@ -37,16 +33,17 @@ specification]]).
|
|||
* Installation
|
||||
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
|
||||
|
||||
This module has one optional dependency: the ~editorconfig~ native binary.
|
||||
Without it, a built-in elisp implementation will be used, but it has fewer
|
||||
features and can be a bit slower.
|
||||
This module has one optional dependency: the native ~editorconfig~ binary.
|
||||
Without it, a built-in elisp implementation will be used, which is claimed to be
|
||||
faster and more secure.
|
||||
|
||||
The editorconfig binary has [[https://github.com/editorconfig#contributing][many implementations]] you can choose from, typically
|
||||
available through your OS package manager (or build it yourself).
|
||||
If you choose to install the binary, [[https://github.com/editorconfig#contributing][many implementations]] are available, usually
|
||||
through your OS package manager (if not built from source yourself).
|
||||
|
||||
* Usage
|
||||
You will need to write an ~.editorconfig~ file in your project (this is usually
|
||||
in the root of your project) you can find out about all the properties [[https://editorconfig.org/#example-file][here]].
|
||||
A ~.editorconfig~ file in your project (usually in the root directory of the
|
||||
project) is needed to configure code style for files in the same directory or
|
||||
below. Documentation on editorconfig's properties can be found [[https://editorconfig.org/#example-file][here]].
|
||||
|
||||
* TODO Configuration
|
||||
#+begin_quote
|
||||
|
|
|
|||
|
|
@ -6,6 +6,13 @@
|
|||
(use-package! editorconfig
|
||||
:hook (doom-first-buffer . editorconfig-mode)
|
||||
:config
|
||||
;; The elisp implementation is the default (rather than the external,
|
||||
;; editorconfig binary), because upstream claims it's "faster and more
|
||||
;; secure". Whether that's true or not, I argue the principle of least
|
||||
;; surprise: if the user has the editorconfig binary installed, they're likely
|
||||
;; expecting it to be used.
|
||||
(setq editorconfig-get-properties-function #'editorconfig-get-properties)
|
||||
|
||||
(when (require 'ws-butler nil t)
|
||||
(setq editorconfig-trim-whitespaces-mode 'ws-butler-mode))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; tools/editorconfig/doctor.el
|
||||
|
||||
(unless (executable-find "editorconfig")
|
||||
(warn! "Couldn't find the editorconfig binary. Using native elisp version (slower)"))
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
|
||||
:config
|
||||
;; HACK: Keep $EMACSDIR clean by installing grammars to the active profile.
|
||||
(add-to-list 'treesit-extra-load-path (concat doom-profile-data-dir "tree-sitter"))
|
||||
(add-to-list 'treesit-extra-load-path (file-name-concat doom-profile-data-dir "tree-sitter"))
|
||||
(defadvice! +tree-sitter--install-grammar-to-local-dir-a (fn &rest args)
|
||||
"Write grammars to `doom-profile-data-dir'."
|
||||
:around #'treesit-install-language-grammar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue