Clean up listing the pylsp-server patch with minted linebreaks
This commit is contained in:
parent
c44dae6309
commit
a08ec5055e
49
README.org
49
README.org
@ -357,6 +357,7 @@ variable in section are compatible. The local variable ~compile-command~ in the
|
|||||||
[[#sec:local-variables][local variables]] section (only visible in =org= files, but not in =html= and
|
[[#sec:local-variables][local variables]] section (only visible in =org= files, but not in =html= and
|
||||||
=pdf= files) shows how to use the =latexmkrc= file.
|
=pdf= files) shows how to use the =latexmkrc= file.
|
||||||
|
|
||||||
|
#+attr_latex: :options breaklines
|
||||||
#+caption[Tangle the Latexmk resource file]:
|
#+caption[Tangle the Latexmk resource file]:
|
||||||
#+caption: Tangle the Latexmk resource file.
|
#+caption: Tangle the Latexmk resource file.
|
||||||
#+name: lst:latexmkrc
|
#+name: lst:latexmkrc
|
||||||
@ -1815,26 +1816,36 @@ file.
|
|||||||
(:pylsp . (:configurationSources ["flake8"])))))))
|
(:pylsp . (:configurationSources ["flake8"])))))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Here are a few links covering how to integrate Emacs, Python and a Python LSP
|
|
||||||
server:
|
|
||||||
1. [[https://taingram.org/blog/emacs-lsp-ide.html][Building Your Own Emacs IDE with LSP]]
|
|
||||||
2. [[https://rgoswami.me/posts/emacs-lang-servers/][Doom Emacs and Language Servers]]
|
|
||||||
3. [[https://ddavis.io/posts/eglot-python-ide/][Eglot based Emacs Python IDE]]
|
|
||||||
4. [[https://www.mattduck.com/lsp-python-getting-started.html][Getting started with lsp-mode for Python]]
|
|
||||||
5. [[https://ddavis.io/posts/python-emacs-3/][Python & Emacs, Take 3]]
|
|
||||||
6. [[https://ddavis.io/posts/emacs-python-lsp/][Python with Emacs: py(v)env and lsp-mode]]
|
|
||||||
|
|
||||||
[[https://jedi.readthedocs.io/en/latest/][Jedi]] provides grammar checking and completion candidates to [[https://github.com/python-lsp/python-lsp-server][python-lsp-server]].
|
[[https://jedi.readthedocs.io/en/latest/][Jedi]] provides grammar checking and completion candidates to [[https://github.com/python-lsp/python-lsp-server][python-lsp-server]].
|
||||||
Only [[https://jedi.readthedocs.io/en/latest/docs/changelog.html][jedi-0.18.1]] works with for instance [[https://numpy.org/][numpy-1.22.0]] in the sense that it
|
Only [[https://jedi.readthedocs.io/en/latest/docs/changelog.html][jedi-0.18.1]] works with for instance [[https://numpy.org/][numpy-1.22.0]] in the sense that it
|
||||||
handles builtins and universal functions provided that [[https://jedi.readthedocs.io/en/latest/][jedi]] does not parse but
|
handles universal functions provided that [[https://jedi.readthedocs.io/en/latest/][jedi]] does not parse but imports
|
||||||
imports [[https://numpy.org/][numpy-1.22.0]] (see [[https://github.com/davidhalter/jedi/issues/1744][jedi issue #1744]], [[https://github.com/davidhalter/jedi/issues/1745][#1745]], and [[https://github.com/davidhalter/jedi/issues/1746][#1746]]).
|
[[https://numpy.org/][numpy-1.22.0]] (see [[https://github.com/davidhalter/jedi/issues/1744][jedi issue #1744]], [[https://github.com/davidhalter/jedi/issues/1745][#1745]], and [[https://github.com/davidhalter/jedi/issues/1746][#1746]]).
|
||||||
|
|
||||||
#+header: :wrap "src diff :exports code :tangle pylsp-auto-import-modules.patch"
|
Listing [[lst:make-pylsp-server-patch]] generates listing
|
||||||
#+begin_src shell :exports both :results org
|
[[lst:show-pylsp-server-patch]] that shows the patch to make [[https://jedi.readthedocs.io/en/latest/][jedi]] import
|
||||||
|
[[https://numpy.org/][numpy-1.22.0]] in order to serve the information to [[https://github.com/python-lsp/python-lsp-server][python-lsp-server]] allowing it
|
||||||
|
to handle universal functions. Listing [[lst:show-pylsp-server-patch]] tangles to
|
||||||
|
=pylsp-auto-import-modules.patch=.
|
||||||
|
|
||||||
|
#+caption[Make =pylsp-auto-import-modules.patch= listing]:
|
||||||
|
#+caption: Make =pylsp-auto-import-modules.patch= listing.
|
||||||
|
#+name: lst:make-pylsp-server-patch
|
||||||
|
#+begin_src shell :exports both :results drawer :shebang
|
||||||
|
echo "#+attr_latex: :options breaklines"
|
||||||
|
echo "#+caption[Show and tangle =pylsp-auto-import-modules.patch=]:"
|
||||||
|
echo "#+caption: Show and tangle =pylsp-auto-import-modules.patch=."
|
||||||
|
echo "#+name: lst:show-pylsp-server-patch"
|
||||||
|
echo "#+begin_src diff :exports code :tangle pylsp-auto-import-modules.patch"
|
||||||
git -C $HOME/VCS/python-lsp-server diff
|
git -C $HOME/VCS/python-lsp-server diff
|
||||||
|
echo "#+end_src"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS: lst:make-pylsp-server-patch
|
||||||
|
:results:
|
||||||
|
#+attr_latex: :options breaklines
|
||||||
|
#+caption[Show and tangle =pylsp-auto-import-modules.patch=]:
|
||||||
|
#+caption: Show and tangle =pylsp-auto-import-modules.patch=.
|
||||||
|
#+name: lst:show-pylsp-server-patch
|
||||||
#+begin_src diff :exports code :tangle pylsp-auto-import-modules.patch
|
#+begin_src diff :exports code :tangle pylsp-auto-import-modules.patch
|
||||||
diff --git a/pylsp/config/schema.json b/pylsp/config/schema.json
|
diff --git a/pylsp/config/schema.json b/pylsp/config/schema.json
|
||||||
index c29d78b..4f30101 100644
|
index c29d78b..4f30101 100644
|
||||||
@ -1878,6 +1889,16 @@ index bf312f6..4758b53 100644
|
|||||||
extra_paths = jedi_settings.get('extra_paths') or []
|
extra_paths = jedi_settings.get('extra_paths') or []
|
||||||
env_vars = jedi_settings.get('env_vars')
|
env_vars = jedi_settings.get('env_vars')
|
||||||
#+end_src
|
#+end_src
|
||||||
|
:end:
|
||||||
|
|
||||||
|
Finally, here are a few links covering how to integrate Emacs, Python and a
|
||||||
|
Python LSP server:
|
||||||
|
1. [[https://taingram.org/blog/emacs-lsp-ide.html][Building Your Own Emacs IDE with LSP]]
|
||||||
|
2. [[https://rgoswami.me/posts/emacs-lang-servers/][Doom Emacs and Language Servers]]
|
||||||
|
3. [[https://ddavis.io/posts/eglot-python-ide/][Eglot based Emacs Python IDE]]
|
||||||
|
4. [[https://www.mattduck.com/lsp-python-getting-started.html][Getting started with lsp-mode for Python]]
|
||||||
|
5. [[https://ddavis.io/posts/python-emacs-3/][Python & Emacs, Take 3]]
|
||||||
|
6. [[https://ddavis.io/posts/emacs-python-lsp/][Python with Emacs: py(v)env and lsp-mode]]
|
||||||
|
|
||||||
*** [[https://github.com/pythonic-emacs/anaconda-mode][Anaconda]]
|
*** [[https://github.com/pythonic-emacs/anaconda-mode][Anaconda]]
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
Loading…
Reference in New Issue
Block a user