forked from qt-creator/qt-creator
Doc: Document new Python language server options
Task-number: QTCREATORBUG-27560 Change-Id: I659f9ef11b25363126ca387c2844bdddfa33f284 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
BIN
doc/qtcreator/images/qtcreator-language-server-generic-stdio.png
Normal file
BIN
doc/qtcreator/images/qtcreator-language-server-generic-stdio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
doc/qtcreator/images/qtcreator-python-advanced.png
Normal file
BIN
doc/qtcreator/images/qtcreator-python-advanced.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
doc/qtcreator/images/qtcreator-python-plugins.png
Normal file
BIN
doc/qtcreator/images/qtcreator-python-plugins.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
@@ -50,8 +50,8 @@
|
||||
architectures (ABIs) installed as one.
|
||||
|
||||
To enable helpful code editing features for Java, such as code completion,
|
||||
highlighting, function tooltips, and navigating in code, specify settings
|
||||
for a \l{Specifying Java Language Server Settings}{Java language server}.
|
||||
highlighting, function tooltips, and navigating in code, add a
|
||||
\l{Java Language Server}{Java language server}.
|
||||
|
||||
The Android Debug Bridge (adb) command line tool is integrated to \QC to
|
||||
enable you to deploy applications to connected Android devices, to run
|
||||
|
||||
@@ -79,33 +79,31 @@
|
||||
|
||||
\section1 Specifying Settings for Language Clients
|
||||
|
||||
You can add a generic generic stdIO language server for Python, for example.
|
||||
For \l{Connecting Android Devices}{Android development}, you can add a Java
|
||||
language server.
|
||||
\QC supports adding a Java language server for
|
||||
\l{Connecting Android Devices}{Android development}. A Python language
|
||||
server is added by default and you can edit its preferences.
|
||||
For other languages, you can add generic stdIO language servers.
|
||||
|
||||
\section2 Adding Language Servers
|
||||
|
||||
To view a list of language servers, select \uicontrol Edit >
|
||||
\uicontrol Preferences > \uicontrol {Language Client} (or
|
||||
\uicontrol {Qt Creator} > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > on \macos).
|
||||
|
||||
\image qtcreator-language-client-options.png "Language client options page"
|
||||
To add language servers, select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > \uicontrol Add (or \uicontrol {Qt Creator} >
|
||||
\uicontrol Preferences > \uicontrol {Language Client} > \uicontrol Add
|
||||
on \macos).
|
||||
|
||||
To enable a language server, select the check box next to the language
|
||||
server name and specify settings for the server.
|
||||
server name and set server preferences.
|
||||
|
||||
To remove language servers from the list, select \uicontrol Delete.
|
||||
|
||||
\section2 Specifying Generic Settings
|
||||
\section2 Generic StdIO Language Server
|
||||
|
||||
To add a generic language server:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > \uicontrol Add >
|
||||
\uicontrol {New Generic StdIO Language Server}
|
||||
\uicontrol {Generic StdIO Language Server}
|
||||
to add a generic language server.
|
||||
\image qtcreator-language-server-generic-stdio.png
|
||||
\li In the \uicontrol Name field, enter a name for the language server.
|
||||
Select the \inlineimage icons/replace.png
|
||||
(\uicontrol {Variables}) button to use a variable for the server
|
||||
@@ -119,8 +117,9 @@
|
||||
with a matching MIME type is opened. \l{Viewing Output}
|
||||
{General Messages} displays information about the connection to the
|
||||
language server.
|
||||
\li In the \uicontrol Initialization field, you can add language server
|
||||
specific JSON attributes to pass to an \c initialize request.
|
||||
\li In the \uicontrol {Initialization options} field, you can add
|
||||
language server specific JSON attributes to pass to an \c initialize
|
||||
request.
|
||||
\li In the \uicontrol Executable field, enter the path to the language
|
||||
server executable.
|
||||
\li In the \uicontrol Arguments field, enter any required command line
|
||||
@@ -128,15 +127,15 @@
|
||||
arguments.
|
||||
\endlist
|
||||
|
||||
\section2 Specifying Java Language Server Settings
|
||||
\section2 Java Language Server
|
||||
|
||||
To add a Java language server:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > \uicontrol Add >
|
||||
\uicontrol {New Java Language Server} to add a Java language server.
|
||||
\image qtcreator-language-client-options-java.png "Java language server options"
|
||||
\uicontrol {Java Language Server} to add a Java language server.
|
||||
\image qtcreator-language-client-options-java.png "Java language server preferences"
|
||||
\li In the \uicontrol Name field, enter a name for the language server.
|
||||
Select the \inlineimage icons/replace.png
|
||||
(\uicontrol {Variables}) button to use a variable for the server
|
||||
@@ -146,6 +145,25 @@
|
||||
the Java language server \c .jar file.
|
||||
\endlist
|
||||
|
||||
\section2 Python Language Server
|
||||
|
||||
To set preferences for Python language servers:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol Python > \uicontrol {Language Server Configuration} to
|
||||
select the Python language server plugins to use.
|
||||
\image qtcreator-python-plugins.png "Python Language Server Configuration"
|
||||
\li Select \uicontrol Advanced to configure the plugins.
|
||||
\image qtcreator-python-advanced.png "Python language server plugin configuration"
|
||||
\endlist
|
||||
|
||||
For a complete list of configuration options, see
|
||||
\l{https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md}
|
||||
{Python Language Server Configuration}.
|
||||
|
||||
To disable the Python language server, deselect
|
||||
\uicontrol {Use Python Language Server}.
|
||||
|
||||
\section1 Supported Locator Filters
|
||||
|
||||
@@ -205,7 +223,7 @@
|
||||
|
||||
\section1 Reporting Issues
|
||||
|
||||
The language service client has been mostly tested with Python and Java.
|
||||
The language server client has been mostly tested with Python and Java.
|
||||
If problems arise when you try them or some other language, please select
|
||||
\uicontrol Help > \uicontrol {Report Bug} to report them in the
|
||||
\l{https://bugreports.qt.io/}{Qt Project Bug Tracker}. The reports
|
||||
|
||||
Reference in New Issue
Block a user