Compare commits

...

2 commits

Author SHA1 Message Date
4abd34b8b4 [feat] combine pylint and pyright-lsp 2024-09-30 02:00:08 +08:00
86588ecab6 [module] replace company to corfu 2024-08-04 14:31:03 +08:00
2 changed files with 22 additions and 2 deletions

View file

@ -641,3 +641,22 @@
(add-to-list 'window-buffer-change-functions 'my/track-python-virtualenv)
#+end_src
同时启用 pylint 和 pyright-lsp 。
#+begin_src emacs-lisp
(defvar-local my/flycheck-local-cache nil)
(defun my/flycheck-checker-get (fn checker property)
(or (alist-get property (alist-get checker my/flycheck-local-cache))
(funcall fn checker property)))
(advice-add 'flycheck-checker-get :around 'my/flycheck-checker-get)
(add-hook 'lsp-managed-mode-hook
(lambda ()
(when (and (string= nil (file-remote-p default-directory))
(derived-mode-p 'python-mode))
(setq my/flycheck-local-cache '((lsp . ((next-checkers . (python-pylint)))))))))
#+end_src

View file

@ -20,8 +20,9 @@
;;layout ; auie,ctsrnm is the superior home row
:completion
(company
+childframe) ; the ultimate code completion backend
(corfu +orderless) ; complete with cap(f), cape and a flying feather!
;; (company
;; +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life