Add my yaml-mode configuration for Emacs

This commit is contained in:
Tom Willemse 2024-02-05 23:41:14 -08:00
parent c5a9e8ac84
commit 1fd9b5aa80
4 changed files with 170 additions and 21 deletions

View file

@ -189,7 +189,8 @@
emacs-oni-sh emacs-oni-sh
emacs-oni-shr emacs-oni-shr
emacs-oni-tramp emacs-oni-tramp
emacs-oni-embrace)) emacs-oni-embrace
emacs-oni-yaml))
#:use-module ((oni packages hlwm-run-or-raise) #:use-module ((oni packages hlwm-run-or-raise)
#:select (hlwm-run-or-raise)) #:select (hlwm-run-or-raise))
#:use-module ((oni packages inbox-size) #:use-module ((oni packages inbox-size)
@ -316,6 +317,7 @@
emacs-oni-sh emacs-oni-sh
emacs-oni-shr emacs-oni-shr
emacs-oni-tramp emacs-oni-tramp
emacs-oni-yaml
tree-sitter-bash tree-sitter-bash
tree-sitter-scheme tree-sitter-scheme

View file

@ -50,3 +50,4 @@
(with-eval-after-load 'electric (with-eval-after-load 'electric
(add-hook 'electric-quote-inhibit-functions #'oni-in-word-p)) (add-hook 'electric-quote-inhibit-functions #'oni-in-word-p))
(with-eval-after-load 'yaml-mode (require 'oni-yaml))

View file

@ -12,7 +12,7 @@
#:use-module (oni packages emacs)) #:use-module (oni packages emacs))
(define-public emacs-oni-config (define-public emacs-oni-config
(let ((commit "3b26004f8bffea707487b0a332381b59362143d4") (let ((commit "68d911f08d5e6559f20c89eadcc8741bf6d3f5e1")
(revision "0")) (revision "0"))
(package (package
(name "emacs-oni-config") (name "emacs-oni-config")
@ -25,7 +25,7 @@
(commit commit))) (commit commit)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "105rflg55wi8ms8qhxqjycpj81chqq6cswannvyjjfqjl54rffyp")))) (base32 "190jzwq00c1pw15jri4qfp2ad44ykl1ax1jnq8k1fyki7p8z82b7"))))
(build-system emacs-build-system) (build-system emacs-build-system)
(home-page "https://code.ryuslash.org/ryuslash/emacs-config") (home-page "https://code.ryuslash.org/ryuslash/emacs-config")
(synopsis "My Emacs configuration") (synopsis "My Emacs configuration")
@ -875,3 +875,20 @@ Emacs")))
emacs-magit)) emacs-magit))
(synopsis "My configuration for git-commit-mode") (synopsis "My configuration for git-commit-mode")
(description "This package provides my configuration for git-commit-mode."))) (description "This package provides my configuration for git-commit-mode.")))
(define-public emacs-oni-yaml
(package
(inherit emacs-oni-config)
(name "emacs-oni-yaml")
(arguments
'(#:include '("oni-yaml\\.el$")))
(propagated-inputs
(list
emacs-yaml-mode
emacs-oni-flycheck
emacs-oni-highlight-indent-guides
emacs-indent-tools
emacs-yaml-imenu
emacs-yaml-pro))
(synopsis "My configuration for yaml-mode.")
(description "This package provides my configuration for editing Yaml files.")))

View file

@ -9,7 +9,9 @@
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages emacs-xyz) #:use-module (gnu packages emacs-xyz)
#:use-module ((gnu packages mail) #:use-module ((gnu packages mail)
#:select (notmuch))) #:select (notmuch))
#:use-module (gnu packages ruby)
#:use-module (rosenthal packages tree-sitter))
(define-public emacs-ace-link-notmuch (define-public emacs-ace-link-notmuch
(let ((commit "fb09673881ef0f7b7ad744c576a19f578df7c51d") (let ((commit "fb09673881ef0f7b7ad744c576a19f578df7c51d")
@ -324,6 +326,59 @@ not being actively edited will be re-sized to a smaller size that doesn't get in
the way, but at the same time will be readable enough to know it's content.") the way, but at the same time will be readable enough to know it's content.")
(license license:expat)))) (license license:expat))))
(define-public emacs-indent-bars
(package
(name "emacs-indent-bars")
(version "0.2.3")
(source
(origin
(uri (git-reference
(url "https://github.com/jdtsmith/indent-bars")
(commit (string-append "v" version))))
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32 "0mis93rh01i1zk8bix79l3q46zrfwlkpq1c1l6msng22ydxs1mw1"))))
(build-system emacs-build-system)
(propagated-inputs
(list emacs-compat))
(home-page "https://github.com/jdtsmith/indent-bars")
(synopsis "Fast, configurable indentation guide-bars for Emacs.")
(description "This package provides vertical indentation guide bars")
(license license:gpl3+)))
(define-public emacs-indent-tools
(let ((commit "c731f05fa3950e2e8580ec61b88abbc705639830")
(revision "0"))
(package
(name "emacs-indent-tools")
(version (git-version "0.0.0" revision commit))
(source
(origin
(uri (git-reference
(url "https://gitlab.com/emacs-stuff/indent-tools.git")
(commit commit)))
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32 "0jri2vxd5a4sx93xq6kjcc5zx9yrhv789x3lyq6r2p2422diw2jr"))))
(build-system emacs-build-system)
(propagated-inputs
(list emacs-s
emacs-hydra
emacs-yafolding))
(home-page "https://gitlab.com/emacs-stuff/indent-tools/")
(synopsis "Indent, navigate around and act on indentation units: perfect for yaml, python
and the like.")
(description "Indent, move around and act on code based on indentation (yaml,
python, jade, etc).
Meant for indentation-based languages, but can be used any time with indented
text.")
;; I'm not sure this license is correct, there doesn't seem to be a wtfpl
;; v1 in the licenses file.
(license license:wtfpl2))))
(define-public emacs-inkplate (define-public emacs-inkplate
(let ((commit "0897721a7b3d84aa3f200ae85fddd5fdd370fc42") (let ((commit "0897721a7b3d84aa3f200ae85fddd5fdd370fc42")
(revision "0")) (revision "0"))
@ -447,6 +502,80 @@ Syncthing REST API and request package to get this data and display it in an
Emacs buffer.") Emacs buffer.")
(license license:expat)))) (license license:expat))))
(define-public emacs-yafolding
(package
(name "emacs-yafolding")
(version "0.4.1")
(source
(origin
(uri (git-reference
(url "https://github.com/emacsorphanage/yafolding")
(commit (string-append "v" version))))
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32 "1bb763lx5cs5z06irjllip8z9c61brjsamfcjajibi24wcajkprx"))))
(build-system emacs-build-system)
(home-page "https://github.com/emacsorphanage/yafolding")
(synopsis "Yet another folding extension for Emacs")
(description "Folding code blocks based on indentation.")
(license license:gpl3+)))
(define-public emacs-yaml-imenu
(let ((commit "c1fbba8b03a7bef4fc2b87404914fa9c6eb67b55")
(revision "0"))
(package
(name "emacs-yaml-imenu")
(version (git-version "1.0.3" revision commit))
(source
(origin
(uri (git-reference
(url "https://github.com/knu/yaml-imenu.el")
(commit commit)))
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32 "1p5zyjj9hvqjfhyp68c04w6cxj5qh4psd4y8kafyrz3n05wimzl5"))))
(build-system emacs-build-system)
(inputs
(list ruby
emacs-yaml-mode))
(home-page "https://github.com/knu/yaml-imenu.el")
(synopsis "Enhancement for the imenu support in yaml-mode")
(description "This package enhances the imenu support in yaml-mode. It generates an index
containing a full list of keys that contain any child, with key names in the
dot-separated path form like @code{jobs.build.docker} and
@code{ja.activerecord.attributes.user.nickname}. It shines best with
@code{which-function-mode} enabled.")
(license license:bsd-2))))
(define-public emacs-yaml-pro
(package
(name "emacs-yaml-pro")
(version "0.3.4")
(source
(origin
(uri (git-reference
(url "https://github.com/zkry/yaml-pro")
(commit (string-append "v" version))))
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32 "0zz8cl400grdip8c2jl27sf4prysyg0rcp91kah6qghmns87f3z9"))))
(build-system emacs-build-system)
(propagated-inputs
(list emacs-yaml
tree-sitter-yaml))
(home-page "https://github.com/zkry/yaml-pro")
(synopsis "Edit YAML in Emacs like a pro")
(description "yaml-pro is a package that provides conveniences for editing yaml.
This package has been written to leverage tree-sitter parsing facilities,
allowing all of these actions to be performed fast and accurate, even in the
absence of parsing errors. The tree-sitter version is orders of magnitudes
faster and I highly recommend its usage if your Emacs version permits.")
(license license:gpl3+)))
(define-public emacs-yasnippet-capf (define-public emacs-yasnippet-capf
(let ((commit "40654214db7a44db3a99321447632b43a10fae57") (let ((commit "40654214db7a44db3a99321447632b43a10fae57")
(revision "0")) (revision "0"))