Minor updates.

This commit is contained in:
Derek Taylor
2020-08-11 17:27:59 -05:00
parent c00618a23a
commit 367af05623
154 changed files with 2484 additions and 1801 deletions

View File

@@ -13,7 +13,7 @@ called.")
;;
;; Packages
;;; Packages
(use-package! python
:mode ("[./]flake8\\'" . conf-mode)
@@ -198,7 +198,7 @@ called.")
;;
;; Environment management
;;; Environment management
(use-package! pipenv
:commands pipenv-project-p
@@ -266,14 +266,15 @@ called.")
"~/.anaconda"
"~/.miniconda"
"~/.miniconda3"
"~/anaconda3"
"~/miniconda3"
"/usr/bin/anaconda3"
"/usr/local/anaconda3"
"/usr/local/miniconda3"
"/usr/local/Caskroom/miniconda/base")
if (file-directory-p dir)
return (setq conda-anaconda-home dir
conda-env-home-directory dir))
return (setq conda-anaconda-home (expand-file-name dir)
conda-env-home-directory (expand-file-name dir)))
(message "Cannot find Anaconda installation"))
;; integration with term/eshell
@@ -290,23 +291,6 @@ called.")
:after python)
(use-package! lsp-python-ms
:when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
:after lsp-clients
:preface
(after! python
(setq lsp-python-ms-python-executable-cmd python-shell-interpreter))
:init
;; HACK If you don't have python installed, then opening python buffers with
;; this on causes a "wrong number of arguments: nil 0" error, because of
;; careless usage of `cl-destructuring-bind'. This silences that error,
;; since we may still want to write some python on a system without
;; python installed!
(defadvice! +python--silence-errors-a (orig-fn &rest args)
:around #'lsp-python-ms--extra-init-params
(ignore-errors (apply orig-fn args))))
(use-package! cython-mode
:when (featurep! +cython)
:mode "\\.p\\(yx\\|x[di]\\)\\'"
@@ -322,3 +306,21 @@ called.")
:when (featurep! +cython)
:when (featurep! :checkers syntax)
:after cython-mode)
;;
;;; LSP
(when! (and (featurep! +lsp)
(not (featurep! :tools lsp +eglot)))
(use-package! lsp-python-ms
:unless (featurep! +pyright)
:after lsp-clients
:preface
(after! python
(setq lsp-python-ms-python-executable-cmd python-shell-interpreter)))
(use-package! lsp-pyright
:when (featurep! +pyright)
:after lsp-clients))