لا يتواجد مرشحو yasnippets في الإكمال التلقائي للشركة.
على الرغم من أنني أستطيع رؤيتهم من SPC s i
، واستهلكهم بشكل جيد.
تظهر نتيجة describe-variable
لـ company backends
في لقطة الشاشة التالية
عند إدخال ifm
، يجب أن يقدم الإكمال التلقائي مرشحين ifmain
بالنسبة لي.
انقر فوق لتوسيع
- OS: darwin (x86_64-apple-darwin14.5.0)
- Emacs: 26.1 (May 31, 2018)
- Doom: 2.0.9 (develop cdf745e72a3e8bf9bef1f0fa4d051b00aab351e3)
- Graphic display: nil (daemon: nil)
- System features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS
- Details:
```elisp
elc count: 0
uname -a: Darwin machw 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64 i386 MacBookPro10,1 Darwin
modules: (:feature (evil +everywhere) file-templates (lookup +docsets) snippets spellcheck (syntax-checker +childframe) workspaces :completion (helm +fuzzy) :ui doom-dashboard doom-modeline doom-quit evil-goggles fci hl-todo nav-flash treemacs (popup +all +defaults) unicode vc-gutter vi-tilde-fringe window-select :editor rotate-text :emacs ediff electric hideshow imenu vc :tools magit :lang emacs-lisp markdown (org +attach +babel +capture +export +present) python rust (sh +fish) :config)
packages: n/a
exec-path: (/usr/local/opt/coreutils/libexec/gnubin /usr/local/opt/python/libexec/bin /usr/local/bin /usr/local/sbin /usr/bin /bin /usr/sbin /sbin ~/.cargo/bin ~/bin /usr/local/opt/fzf/bin /Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_10 /Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_10 /Applications/Emacs.app/Contents/MacOS/libexec /Applications/Emacs.app/Contents/MacOS/bin)
```
هذا ما كنت اتوقعه. لن تستخدم الشركة سوى company-anaconda
. (:separate company-capf company-yasnippet)
احتياطي في حالة فشل الأناكوندا.
يمكنك إما الوصول إلى إكمال المقتطف من خلال C-x C-s
، أو عن طريق تغيير خلفيات Python الخلفية:
(set-company-backend! 'anaconda-mode '(company-anaconda company-yasnippet))
سيؤدي هذا إلى تغيير خلفيات الشركة لتصبح:
((company-anaconda company-yasnippet)
(:separate company-capf company-yasnippet)
company-capf)
في وضع بيثون.
يعمل فقط للمخزن المؤقت الجديد ، لا يتأثر المخزن المؤقت الموجود.
أتستطيع أن تساعد في هذا؟
بعد التحقق من رموز العذاب ، أجد أنه تم تعديل الواجهة الخلفية للشركة هنا: https://github.com/hlissner/doom-emacs/blob/develop/modules/lang/python/config.el#L64
لتمكين company-yasnippet
افتراضيًا ، تعمل الرموز التالية.
(after! anaconda-mode
(set-company-backend! 'anaconda-mode '(company-anaconda company-yasnippet)))
التعليق الأكثر فائدة
بعد التحقق من رموز العذاب ، أجد أنه تم تعديل الواجهة الخلفية للشركة هنا: https://github.com/hlissner/doom-emacs/blob/develop/modules/lang/python/config.el#L64
لتمكين
company-yasnippet
افتراضيًا ، تعمل الرموز التالية.