Recommend customizing eglot for python-base-mode

* doc/misc/eglot.texi (Project-specific configuration): Recommend
setting directory local variables for 'python-base-mode' instead of
'python-mode'.  This makes any customizations effective also for
'python-ts-mode'.
This commit is contained in:
Stefan Kangas 2023-12-22 22:36:37 +01:00
parent bd0c758971
commit d386a8aa43

View file

@ -1085,8 +1085,8 @@ To apply this to Eglot, and assuming you chose the
:fuzzy t)
:pylint (:enabled :json-false)))
:gopls (:usePlaceholders t)))))
(python-mode . ((indent-tabs-mode . nil)))
(go-mode . ((indent-tabs-mode . t))))
(python-base-mode . ((indent-tabs-mode . nil)))
(go-mode . ((indent-tabs-mode . t))))
@end lisp
@noindent
@ -1101,7 +1101,7 @@ plists are used inside the value of
This following form may also be used:
@lisp
((python-mode
((python-base-mode
. ((eglot-workspace-configuration
. (:pylsp (:plugins (:jedi_completion (:include_params t
:fuzzy t)
@ -1116,7 +1116,7 @@ This following form may also be used:
@noindent
This sets up the value of @code{eglot-workspace-configuration}
separately depending on the major mode of each of that project's
buffers. @code{python-mode} buffers will have the variable set to
buffers. @code{python-base-mode} buffers will have the variable set to
@code{(:pylsp (:plugins ...))}. @code{go-mode} buffers will have the
variable set to @code{(:gopls (:usePlaceholders t))}.
@ -1127,7 +1127,7 @@ want to set a different option for @code{gopls.usePlaceholders} , you
may use something like:
@lisp
((python-mode
((python-base-mode
. ((eglot-workspace-configuration
. (:pylsp (:plugins (:jedi_completion (:include_params t
:fuzzy t)