Add pyright config

Hopefully better single-file support, better support for use with mypy
and isort
This commit is contained in:
Evie Litherland-Smith 2024-03-24 11:42:11 +00:00
parent 662846fd25
commit 7dd0e0f4ed

View file

@ -79,22 +79,24 @@ Set treesit to fontify all elements, default was 3 (out of 4)
:config :config
(setq eglot-stay-out-of '(flymake)) (setq eglot-stay-out-of '(flymake))
(setq-default eglot-workspace-configuration (setq-default eglot-workspace-configuration
'( :pylsp '( :pylsp ( :plugins
( :plugins ( :jedi_completion
( :jedi_completion ( :enabled t
( :enabled t :include_params t
:include_params t :include_class_objects t
:include_class_objects t :include_function_objects t
:include_function_objects t :fuzzy t)
:fuzzy t) :jedi_definition (:enabled t)
:jedi_definition (:enabled t) :jedi_hover (:enabled t)))
:jedi_hover (:enabled t))) :pyright ( :disableOrganizeImports t) ; Use isort instead
:nil :python.analysis ( :autoImportCompletions t
( :nix :diagnosticMode "openFilesOnly" ; Better single-file support
( :maxMemoryMB nil :typeCheckingMode "off") ; Use mypy instead
:flake :nil ( :nix
( :autoArchive t ( :maxMemoryMB nil
:nixpkgsInputName "nixpkgs"))))) :flake
( :autoArchive t
:nixpkgsInputName "nixpkgs")))))
(with-eval-after-load 'cape (with-eval-after-load 'cape
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster) (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
(defun my/eglot-capf () (defun my/eglot-capf ()