1
0
Fork 0

oni-php: Make sure imports aren't duplicated

This commit is contained in:
Tom Willemse 2025-04-07 14:19:14 -07:00
parent ceba96db23
commit 31b1d69b0e

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2025.0307.104352
;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-hydra ggtags fic-mode company-php rainbow-delimiters)
;; Version: 2025.0310.102726
;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-hydra oni-smartparens ggtags fic-mode company-php rainbow-delimiters)
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@ -90,9 +90,10 @@ nil for some reason."
(forward-line)
(insert "\n"))
(let ((start (point)))
(insert "use " class ";\n")
(pulse-momentary-highlight-region start (point))))))
(unless (search-backward class nil t)
(let ((start (point)))
(insert "use " class ";\n")
(pulse-momentary-highlight-region start (point)))))))
(defun oni-php-insert-dot-dwim (N)
"Insert either a concatenation or access operator depending on context.