问题表述: 在python中输入几个字符,按tab补全时,不能自动定位到参数位置,而是显示作 print($0) 。请问各位大佬有何解决良策?
我怀疑可能的原因是与yas-snippet冲突,使用M-x yas-visit-snippet-file 查询到print的片段为:
# -*- mode: snippet -*-
# name: print
# key: p
# --
print($0)
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;; 开启markdown支持
multiple-cursors
;;
org;;
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
spell-checking;; 开启拼写检查
syntax-checking;; 开启语法检查
;; version-control
treemacs
latex;;
)