diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2022-01-19 12:45:49 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-23 08:00:39 +0100 |
commit | aaf616fbd63f3b58fc88a2f60e04b9998ef1654a (patch) | |
tree | 7e7a27b95d9d59db81abaaab0d60ac25375cb108 /.dir-locals.el | |
parent | 834277321648297522ce2dbbf46559d96ca7d991 (diff) | |
download | searxng-aaf616fbd63f3b58fc88a2f60e04b9998ef1654a.tar.gz searxng-aaf616fbd63f3b58fc88a2f60e04b9998ef1654a.zip |
[emacs] .dir-locals.el: activate pyright in python-mode
To get in use of pyright type cheker in Emacs, a pyright installation [1] is
needed and in Emacs the lsp-pyright package has to be installed::
M-x package-install lsp-pyright
[1] https://github.com/Microsoft/pyright
[2] https://github.com/emacs-lsp/lsp-pyright
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to '.dir-locals.el')
-rw-r--r-- | .dir-locals.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index 43d6fa551..419311ee7 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -32,6 +32,10 @@ ;; Jedi, flycheck & other python stuff should use the 'python-shell-interpreter' ;; from the local py3 environment. ;; +;; For pyright support you need to install:: +;; +;; M-x package-install lsp-pyright +;; ;; Other useful jedi stuff you might add to your ~/.emacs:: ;; ;; (global-set-key [f6] 'flycheck-mode) @@ -104,7 +108,10 @@ (python-mode . ((eval . (progn - + ;; use nodejs from the (local) NVM environment (see nvm-dir) + (nvm-use-for-buffer) + (if (featurep 'lsp-pyright) + (lsp)) (setq-local python-environment-virtualenv (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root) ;;"--system-site-packages" |