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