Add Python packages useful for python-lsp-server

This commit is contained in:
Gerard Vermeulen 2022-01-09 19:18:54 +01:00
parent 90af81edad
commit 1a8e96e6f2
1 changed files with 9 additions and 6 deletions

View File

@ -1697,12 +1697,15 @@ Listing [[lst:enable-pyenv-mode]] configures and enables =pyenv-mode=.
Listing [[lst:configure-eglot+python-lsp-server-for-python]] (tangles to
=user-init-file=) and [[lst:configure-eglot+jedi-language-server-for-python]] (does
not tangle to =user-init-file=) configure [[https://github.com/joaotavora/eglot][eglot]] for [[https://www.python.org][Python]] using either the
[[https://github.com/python-lsp/python-lsp-server][python-lsp-server]] or experimentally the [[https://github.com/pappasam/jedi-language-server][jedi-language-server]]. Listing
[[lst:on-hack-local-variables-hook-eglot-maybe]] defines a hook function to launch
[[https://github.com/joaotavora/eglot][eglot]] in presence of a proper [[info:emacs#Directory Variables][.dir-locals.el]] file in the root directory of any
[[https://www.python.org][Python]] project. Listing [[lst:eglot-directory-variables-for-python]] shows such a
proper [[info:emacs#Directory Variables][.dir-locals.el]] file.
not tangle to =user-init-file=) configure [[https://github.com/joaotavora/eglot][eglot]] for [[https://www.python.org][Python]] using the
[[https://github.com/python-lsp/python-lsp-server][python-lsp-server]] (or experimentally the less capable [[https://github.com/pappasam/jedi-language-server][jedi-language-server]]). In
order to enable all builtin [[https://github.com/python-lsp/python-lsp-server][python-lsp-server]] capabilities, ensure installation
of the Python packages [[https://github.com/hhatto/autopep8#readme][autopep8]], [[https://github.com/PyCQA/flake8][flake8]], [[https://github.com/PyCQA/pydocstyle#readme][pydocstyle]], [[https://github.com/PyCQA/pylint#readme][pylint]], [[https://github.com/python-rope/rope#readme][rope]], and
[[https://github.com/google/yapf#readme][yapf]]. Listing [[lst:on-hack-local-variables-hook-eglot-maybe]] defines a hook
function to launch [[https://github.com/joaotavora/eglot][eglot]] in presence of a proper [[info:emacs#Directory Variables][.dir-locals.el]] file in the root
directory of any [[https://www.python.org][Python]] project. Listing
[[lst:eglot-directory-variables-for-python]] shows such a proper [[info:emacs#Directory Variables][.dir-locals.el]]
file.
#+caption[Configure =eglot= with =python-lsp-server= for Python]:
#+caption: Configure =eglot= with =python-lsp-server= for Python.