如何让pyls忽略临时文件? 比如emacs的.#test.py?

其实就是

(setq create-lockfiles nil)

分享下我 lsp 的其他设置防止的各种坑:

(setq lsp-enable-eldoc nil) ;we will got error "Wrong type argument: sequencep" from `eldoc-message' if `lsp-enable-eldoc' is non-nil
(setq lsp-message-project-root-warning t) ;avoid popup warning buffer if lsp can't found root directory (such as edit simple *.py file)
(setq create-lockfiles nil) ;we will got error "Error from the Language Server: FileNotFoundError" if `create-lockfiles' is non-nil

我刷一下存在感

lockfiles没有了, M-x recover-this-file 就不能用了啊

我用 auto-save.el 自动保存, 从来就不喜欢 #.* 这些文件, 没啥用, 而且到处产生垃圾文件.