commit: a270b8f0813babda3f8a6d451cf3da5f3b0bc03a
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 16 22:07:52 2022 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 22:07:52 2022 +0000
URL:
https://gitweb.gentoo.org/proj/company-ebuild.git/commit/?id=a270b8f0
company-ebuild.el: / hack
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
company-ebuild.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/company-ebuild.el b/company-ebuild.el
index 2a4cf39..8ef299d 100644
--- a/company-ebuild.el
+++ b/company-ebuild.el
@@ -235,7 +235,6 @@ ARG is the completion argument for annotation and
candidates."
(annotation
(company-ebuild--annotation arg))
(candidates
- ;; FIXME: Can not insert the "/" character.
;; TODO: Complete any string that already appears in current buffer.
(cl-remove-if-not (lambda (candidate)
(string-prefix-p arg candidate t))
@@ -252,6 +251,9 @@ in your config:
\(add-hook 'ebuild-mode-hook 'company-ebuild-setup)
or `require' Company-Ebuild:
\(require 'company-ebuild)"
+ ;; HACK: Modify syntax to treat "/" as a word constituent.
+ ;; TODO: (Hard mode) write a proper `company-grab-symbol' replacement.
+ (modify-syntax-entry ?/ "w")
;; Force-enable `company-mode'.
(when (null company-mode)
(company-mode +1))