1

the question as follow:

enter image description here

the screen record might be too short, so I upload a longer one: enter image description here

when I enter the code and press tab, there was print($0) on screen. And the cursor isn't at the right place which should follow the ( , I guess I have the wrong config in yas-snippet, please give me some support. Thanks.

the dotspacemacs-configuration-layers as follow:

;; 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;;
)

4

1 回答 1

0

我编辑配置如下。它有帮助,但我需要输入“(”。有什么好的解决方案吗?谢谢。

(python :variables
             python-backend 'lsp
             python-indent-offset 4
             python-format-on-save t;;
             python-sort-imports-on-save t;
             lsp-enable-snippet nil;
             )
于 2020-03-28T22:09:01.887 回答