在 Python 中编程,spacemacs 中的制表符完成不正确
Programming in Python, tab completion in spacemacs not right
问题如下:
enter image description here
录屏可能太短了,上传长一点的:
enter image description here
当我输入代码并按 Tab 键时,屏幕上显示 print([=12=])
。而且光标不在应该跟随 (
的正确位置,我想我在 yas-snippet
中配置错误,请支持我。谢谢。
dotspacemacs-configuration-layers
如下:
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
;; `M-m f e R' (Emacs style) to install them.
;; ----------------------------------------------------------------
chinese(chinese :variables chinese-default-input-method 'pinyin
chinese-enable-youdao-dict t)
(auto-completion :variables company-idle-delay 0.1
auto-completion-enable-sort-by-usage t
auto-completion-enable-snippets-in-popup t
auto-completion-tab-key-behavior 'cycle
:disabled-for org);;
better-defaults;;
emacs-lisp
git;; 开启git支持
helm
lsp
(python :variables
python-backend 'lsp
python-indent-offset 4
python-format-on-save t;;
python-sort-imports-on-save t;;
)
java;;
markdown;;
multiple-cursors
;;
org;;
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
spell-checking;;
syntax-checking;;
;; version-control
treemacs
latex;;
)
我按如下方式编辑配置。它有帮助,但我需要输入“(”。有什么好的解决方案吗?
谢谢
(python :variables
python-backend 'lsp
python-indent-offset 4
python-format-on-save t;;
python-sort-imports-on-save t;
lsp-enable-snippet nil;
)
问题如下:
enter image description here
录屏可能太短了,上传长一点的: enter image description here
当我输入代码并按 Tab 键时,屏幕上显示 print([=12=])
。而且光标不在应该跟随 (
的正确位置,我想我在 yas-snippet
中配置错误,请支持我。谢谢。
dotspacemacs-configuration-layers
如下:
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
;; `M-m f e R' (Emacs style) to install them.
;; ----------------------------------------------------------------
chinese(chinese :variables chinese-default-input-method 'pinyin
chinese-enable-youdao-dict t)
(auto-completion :variables company-idle-delay 0.1
auto-completion-enable-sort-by-usage t
auto-completion-enable-snippets-in-popup t
auto-completion-tab-key-behavior 'cycle
:disabled-for org);;
better-defaults;;
emacs-lisp
git;; 开启git支持
helm
lsp
(python :variables
python-backend 'lsp
python-indent-offset 4
python-format-on-save t;;
python-sort-imports-on-save t;;
)
java;;
markdown;;
multiple-cursors
;;
org;;
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
spell-checking;;
syntax-checking;;
;; version-control
treemacs
latex;;
)
我按如下方式编辑配置。它有帮助,但我需要输入“(”。有什么好的解决方案吗? 谢谢
(python :variables
python-backend 'lsp
python-indent-offset 4
python-format-on-save t;;
python-sort-imports-on-save t;
lsp-enable-snippet nil;
)