Update the sections on `eglot' with Python
This commit is contained in:
parent
189cb48440
commit
d5457b9ebd
23
README.org
23
README.org
@ -3866,14 +3866,15 @@ Listing [[lst:configure-writegood-mode]] configures [[https://github.com/bnbeckw
|
|||||||
:CUSTOM_ID: sec:programming-tools
|
:CUSTOM_ID: sec:programming-tools
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
** [[info:eglot#Top][Eglot (info)]] or [[https://github.com/joaotavora/eglot][Eglot]]
|
** [[info:eglot#Top][Eglot (info)]]
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: sec:eglot
|
:CUSTOM_ID: sec:eglot
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
[[https://github.com/joaotavora/eglot#readme][Emacs polyGLOT (Eglot)]] is an Emacs language-server-protocol client that stays
|
[[https://github.com/joaotavora/eglot#readme][Emacs polyGLOT (Eglot)]] is an Emacs language-server-protocol client that stays
|
||||||
out of the way. The following listings contribute to a programming language
|
out of your way. [[info:eglot#Top][Eglot (info)]] is a builtin since Emacs-29.0.60. The following
|
||||||
mode independent [[https://github.com/joaotavora/eglot][Eglot]] configuration:
|
listings contribute to a programming language mode independent [[https://github.com/joaotavora/eglot][Eglot]]
|
||||||
|
configuration:
|
||||||
1. Listing [[lst:minimal-eglot-setup][minimal Eglot setup]] ensures installation of [[https://github.com/joaotavora/eglot][Eglot]], shows how to get
|
1. Listing [[lst:minimal-eglot-setup][minimal Eglot setup]] ensures installation of [[https://github.com/joaotavora/eglot][Eglot]], shows how to get
|
||||||
debug information from the [[https://github.com/python-lsp/python-lsp-server][Python LSP server]], and adds key bindings to
|
debug information from the [[https://github.com/python-lsp/python-lsp-server][Python LSP server]], and adds key bindings to
|
||||||
=eglot-mode-keymap=.
|
=eglot-mode-keymap=.
|
||||||
@ -4346,9 +4347,11 @@ print(1+1);
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: sec:python-programming
|
:CUSTOM_ID: sec:python-programming
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
The [[https://www.emacswiki.org/emacs/PythonProgrammingInEmacs][Python Programming in Emacs]] wiki page lists options to enhance Emacs's
|
The [[https://www.emacswiki.org/emacs/PythonProgrammingInEmacs][Python Programming in Emacs]] wiki page lists options to enhance Emacs's
|
||||||
built-in ~python-mode~. Here, the focus is on three packages:
|
built-in ~python-mode~. Here, the focus is on two Emacs packages and four Python
|
||||||
1. [[https://github.com/joaotavora/eglot][Eglot - Emacs polyGLOT: an Emacs LSP client that stays out of your way]]. The
|
packages:
|
||||||
|
1. [[#sec:eglot][Eglot - Emacs polyGLOT: a builtin LSP client since Emacs-29.0.60]]. The
|
||||||
maintainer also contributes to Emacs itself and has a deep understanding of
|
maintainer also contributes to Emacs itself and has a deep understanding of
|
||||||
[[https://sheer.tj/the_way_of_emacs.html][the Way of Emacs]]. He refuses to add new features without seeing how they fit
|
[[https://sheer.tj/the_way_of_emacs.html][the Way of Emacs]]. He refuses to add new features without seeing how they fit
|
||||||
into [[https://sheer.tj/the_way_of_emacs.html][the Way of Emacs]] as this discussion on [[https://github.com/joaotavora/eglot/issues/523][org-mode source code blocks]]
|
into [[https://sheer.tj/the_way_of_emacs.html][the Way of Emacs]] as this discussion on [[https://github.com/joaotavora/eglot/issues/523][org-mode source code blocks]]
|
||||||
@ -4356,7 +4359,13 @@ built-in ~python-mode~. Here, the focus is on three packages:
|
|||||||
2. [[https://jedi.readthedocs.io/en/latest/][Jedi]] is a static analysis tool for Python that is typically used in plugins
|
2. [[https://jedi.readthedocs.io/en/latest/][Jedi]] is a static analysis tool for Python that is typically used in plugins
|
||||||
for editors or integrated development environments. Jedi has a focus on
|
for editors or integrated development environments. Jedi has a focus on
|
||||||
autocompletion and object definition lookup functionality.
|
autocompletion and object definition lookup functionality.
|
||||||
3. [[https://github.com/astoff/code-cells.el#readme][Code-cells]] allows to edit [[https://ipython.org/notebook.html][IPython or Jupyter notebooks]] in Emacs with help
|
3. [[https://github.com/charliermarsh/ruff#readme][Ruff]] is an extremely fast Python linter and a replacement for [[https://flake8.pycqa.org/en/latest/][Flake8]] with a
|
||||||
|
variety of its plugins. [[https://notes.crmarsh.com/][Charlie Marsh]] explains why he started [[https://pypi.org/project/ruff/][Ruff]] in the
|
||||||
|
post [[https://notes.crmarsh.com/python-tooling-could-be-much-much-faster][Python tooling could be much faster]].
|
||||||
|
4. [[https://github.com/python-lsp/python-lsp-server#readme][Python LSP Server]] is in my opinion the most complete [[https://en.wikipedia.org/wiki/Language_Server_Protocol][Language Server Protocol]]
|
||||||
|
implementation for Python and it handles [[https://github.com/charliermarsh/ruff#readme][Ruff]] thanks to the [[https://github.com/python-lsp/python-lsp-ruff][python-lsp-ruff]]
|
||||||
|
plugin.
|
||||||
|
5. [[https://github.com/astoff/code-cells.el#readme][Code-cells]] allows to edit [[https://ipython.org/notebook.html][IPython or Jupyter notebooks]] in Emacs with help
|
||||||
from either [[https://github.com/mwouts/jupytext][Jupytext]] or [[https://pandoc.org/][Pandoc]].
|
from either [[https://github.com/mwouts/jupytext][Jupytext]] or [[https://pandoc.org/][Pandoc]].
|
||||||
|
|
||||||
Here are links covering how to integrate Emacs, Python and a Python LSP
|
Here are links covering how to integrate Emacs, Python and a Python LSP
|
||||||
@ -4392,8 +4401,6 @@ of src_emacs-lisp{(choose-common-python-linter)} from:
|
|||||||
1. [[https://github.com/PyCQA/pyflakes][Pyflakes - simple tool which checks Python source files for errors]].
|
1. [[https://github.com/PyCQA/pyflakes][Pyflakes - simple tool which checks Python source files for errors]].
|
||||||
2. [[https://flake8.pycqa.org/en/latest/][Flake8 - your tool for style guide enforcement]].
|
2. [[https://flake8.pycqa.org/en/latest/][Flake8 - your tool for style guide enforcement]].
|
||||||
3. [[https://github.com/charliermarsh/ruff][Ruff - an extremely fast Python linter written in Rust]].
|
3. [[https://github.com/charliermarsh/ruff][Ruff - an extremely fast Python linter written in Rust]].
|
||||||
I use [[https://pypi.org/project/ruff/][Ruff]] to replace [[https://pypi.org/project/flake8/][Flake8]] with a variety of its plugins. [[https://notes.crmarsh.com/][Charlie Marsh]]
|
|
||||||
explains why he started [[https://pypi.org/project/ruff/][Ruff]] in the post [[https://notes.crmarsh.com/python-tooling-could-be-much-much-faster][Python tooling could be much faster]].
|
|
||||||
|
|
||||||
Listing [[lst:pyproject-toml-kickoff][kickoff pyproject.toml proposal]] facilitates dropping a [[https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml][pyproject.toml]]
|
Listing [[lst:pyproject-toml-kickoff][kickoff pyproject.toml proposal]] facilitates dropping a [[https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml][pyproject.toml]]
|
||||||
file into Python projects which anyhow should switch to using a [[https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml][pyproject.toml]]
|
file into Python projects which anyhow should switch to using a [[https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml][pyproject.toml]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user