From fd7fe644ebf79ec0501df94d7ea5be110e5e9114 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Wed, 9 Sep 2020 12:55:06 -0300 Subject: Configured pyls in LSP mode --- .doom.d/config.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to '.doom.d/config.el') diff --git a/.doom.d/config.el b/.doom.d/config.el index bad3aeee..73ac9f30 100644 --- a/.doom.d/config.el +++ b/.doom.d/config.el @@ -153,6 +153,8 @@ ;; Org Mode (after! org + ;; Include diary + (setq org-agenda-include-diary t) ;; Logs (setq org-log-state-notes-insert-after-drawers nil org-log-into-drawer t @@ -254,3 +256,19 @@ "--stdio")) ;; For some reason, eslint disables document hightlight so I'm reenabling it (add-hook 'lsp-on-idle-hook 'lsp-document-highlight) + +(after! python + :init + (setq lsp-pyls-plugins-pylint-enabled t) + (setq lsp-pyls-plugins-autopep8-enabled nil) + (setq lsp-pyls-plugins-pyflakes-enabled nil) + (setq lsp-pyls-plugins-pycodestyle-enabled nil) + (setq lsp-pyls-configuration-sources "pep8") + (add-hook 'before-save-hook 'lsp-format-buffer)) + +;; Setting up pyvenv. On each project, run add-dir-local-variable and specify the virtualenv location +(use-package pyvenv + :ensure t + :init + (pyvenv-mode 1) + (pyvenv-tracking-mode 1)) -- cgit v1.2.3