Skip to content

Commit

Permalink
Allow setting pylint arguments from .dir-locals.el
Browse files Browse the repository at this point in the history
Work around the issue
palantir/python-language-server#616, which would be
fixed by emacs-lsp/lsp-mode#928, but is not yet
merged.
  • Loading branch information
jml committed Jul 27, 2019
1 parent cf67d49 commit 19b0c6b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion emacs/config.d/20-packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,25 @@

(use-package lsp-mode
:hook (prog-mode . lsp)
:commands lsp)
:commands lsp
:config
;; Remove once https://github.com/emacs-lsp/lsp-mode/pull/928 is merged and
;; released.
;;
;; Allows us to specify command-line arguments to pylint, which lets us
;; provide a .dir-locals.el that sets `--rcfile=<project-local-config>`,
;; avoiding a tonne of spurious errors while still getting pylint feedback.
;;
;; e.g.
;;
;; ((nil . ((lsp-pyls-plugins-pylint-args . '("--rcfile=/Users/jml/src/myproject/pylintrc")))))
(defcustom lsp-pyls-plugins-pylint-args nil
"Command-line arguments to pylint."
:risky t
:type '(repeat string)
:group 'lsp-pyls)
(lsp-register-custom-settings
'(("pyls.plugins.pylint.args" lsp-pyls-plugins-pylint-args))))

(use-package lsp-ui
:after diminish
Expand Down

0 comments on commit 19b0c6b

Please sign in to comment.