aboutsummaryrefslogtreecommitdiffstats
path: root/oni
diff options
context:
space:
mode:
authorGravatar Tom Willemse2025-03-18 14:15:37 -0700
committerGravatar Tom Willemse2025-03-18 14:19:12 -0700
commit24c5bcf68fa828305a981479af82311925c4ae26 (patch)
tree518dc54a27f59c5809d624b568b223d75a5a68fd /oni
parent0e072e7cdd25af6f015f90113a9e1fa195648953 (diff)
downloadnew-dotfiles-24c5bcf68fa828305a981479af82311925c4ae26.tar.gz
new-dotfiles-24c5bcf68fa828305a981479af82311925c4ae26.zip
packages/emacs: Add packages for phpstan
Diffstat (limited to 'oni')
-rw-r--r--oni/packages/emacs.scm86
1 files changed, 86 insertions, 0 deletions
diff --git a/oni/packages/emacs.scm b/oni/packages/emacs.scm
index da36e2f..bb0f42b 100644
--- a/oni/packages/emacs.scm
+++ b/oni/packages/emacs.scm
@@ -737,3 +737,89 @@ new-theme for a while. I couldn't think of a name so I named it after him.")
and text properties. The package styles headlines, keywords, tables and
source blocks.")
(license license:gpl3+)))
+
+(define-public emacs-php-runtime
+ (package
+ (name "emacs-php-runtime")
+ (version "20241024.1622")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/emacs-php/php-runtime.el.git")
+ (commit "37beef404c70d7b80dc085b1ee1e13fd9c375fe6")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1sd65nhbcxr5r935z1ik3skz73kkpyr4r259nahn5gjvvww3if20"))))
+ (build-system emacs-build-system)
+ (propagated-inputs (list emacs-compat))
+ (home-page "https://github.com/emacs-php/php-runtime.el")
+ (synopsis "Language binding bridge to PHP")
+ (description
+ "Execute PHP code. This package requires `php command in runtime.
+(string-to-number (php-runtime-eval \"echo PHP_INT_MAX;\")) ;; =>
+9.223372036854776e+18 (string-to-number (php-runtime-expr \"PHP_INT_MAX\")) ;
+short hand.")
+ (license #f)))
+
+(define-public emacs-phpstan
+ (package
+ (name "emacs-phpstan")
+ (version "20241107.408")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/emacs-php/phpstan.el.git")
+ (commit "f4256e9f0b206a77b48da2df470c9ab0c48b4472")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gj6i1szlb21k6ya2w3qzin6v0b9dx5yb5wrmrlshcal33k3p660"))))
+ (build-system emacs-build-system)
+ (propagated-inputs (list emacs-compat emacs-php-mode emacs-php-runtime))
+ (arguments
+ '(#:include '("^phpstan.el$")
+ #:exclude '()))
+ (home-page "https://github.com/emacs-php/phpstan.el")
+ (synopsis "Interface to PHPStan")
+ (description
+ "Static analyze for PHP code using PHPStan. https://github.com/phpstan/phpstan
+## Instalation You need to get either the local PHP runtime or Docker and
+prepare for PHPStan. Please read the README for these details.
+https://github.com/emacs-php/phpstan.el/blob/master/README.org If you are a
+Flycheck user, install `flycheck-phpstan package. ## Directory local variables
+Put the following into .dir-locals.el files on the root directory of project.
+Each variable can read what is documented by `M-x describe-variables'. ((nil .
+((php-project-root . git) (phpstan-executable . docker) (phpstan-working-dir .
+(root . \"path/to/dir\")) (phpstan-config-file . (root .
+\"path/to/dir/phpstan-docker.neon\")) (phpstan-level . 7)))) If you want to know
+the directory variable specification, please refer to M-x info [Emacs >
+Customization > Variables] or the following web page.
+https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html.")
+ (license #f)))
+
+(define-public emacs-flycheck-phpstan
+ (package
+ (name "emacs-flycheck-phpstan")
+ (version "20241107.408")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/emacs-php/phpstan.el.git")
+ (commit "f4256e9f0b206a77b48da2df470c9ab0c48b4472")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gj6i1szlb21k6ya2w3qzin6v0b9dx5yb5wrmrlshcal33k3p660"))))
+ (build-system emacs-build-system)
+ (propagated-inputs (list emacs-flycheck emacs-phpstan))
+ (arguments
+ '(#:include '("^flycheck-phpstan.el$")
+ #:exclude '()))
+ (home-page "https://github.com/emacs-php/phpstan.el")
+ (synopsis "Flycheck integration for PHPStan")
+ (description
+ "Flycheck integration for PHPStan. Put the following into your .emacs file
+(~/.emacs.d/init.el) (defun my-php-mode-setup () \"My PHP-mode hook.\" (require
+flycheck-phpstan) (flycheck-mode t)) (add-hook php-mode-hook my-php-mode-setup).")
+ (license #f)))