diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-10-11 14:54:35 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-10-16 09:06:11 +0000 |
commit | fac917b4776597a5166766d62cc7d8f8deb01ec6 (patch) | |
tree | e5e56bcf1f6db1decae6b8c3066d4336f2798933 | |
parent | 2c885fa3d4533ce1d2db43af809d532a64755b00 (diff) | |
download | qt-creator-fac917b4776597a5166766d62cc7d8f8deb01ec6.tar.gz |
Doc: Describe the experimental language client plugin
Change-Id: I14e227a242dc101f9e535f56da52beddb5bc325a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | doc/src/editors/creator-coding.qdoc | 7 | ||||
-rw-r--r-- | doc/src/editors/creator-only/creator-fakevim.qdoc | 2 | ||||
-rw-r--r-- | doc/src/editors/creator-only/creator-language-server.qdoc | 83 | ||||
-rw-r--r-- | doc/src/editors/creator-only/creator-mime-types.qdoc | 10 | ||||
-rw-r--r-- | doc/src/qtcreator-toc.qdoc | 1 |
5 files changed, 97 insertions, 6 deletions
diff --git a/doc/src/editors/creator-coding.qdoc b/doc/src/editors/creator-coding.qdoc index 5f85644aac..c4b70335db 100644 --- a/doc/src/editors/creator-coding.qdoc +++ b/doc/src/editors/creator-coding.qdoc @@ -89,6 +89,13 @@ \list + \li \l{Using Language Servers} + + The experimental language client provides code completion, + highlighting of the symbol under cursor, and jumping to the symbol + definition for other programming languages besides C++. In addition, + it integrates diagnostics from the language server. + \li \l{Editing MIME Types} \QC uses the MIME type of a file to determine which mode and editor diff --git a/doc/src/editors/creator-only/creator-fakevim.qdoc b/doc/src/editors/creator-only/creator-fakevim.qdoc index dfd7dcbb78..a35bf4b1e2 100644 --- a/doc/src/editors/creator-only/creator-fakevim.qdoc +++ b/doc/src/editors/creator-only/creator-fakevim.qdoc @@ -27,7 +27,7 @@ \contentspage index.html \previouspage creator-editor-options-text.html \page creator-editor-fakevim.html - \nextpage creator-mime-types.html + \nextpage creator-language-servers.html \title Using FakeVim Mode diff --git a/doc/src/editors/creator-only/creator-language-server.qdoc b/doc/src/editors/creator-only/creator-language-server.qdoc new file mode 100644 index 0000000000..38045bc99e --- /dev/null +++ b/doc/src/editors/creator-only/creator-language-server.qdoc @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Creator documentation. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** +****************************************************************************/ + +/*! + \contentspage index.html + \previouspage creator-editor-fakevim.html + \page creator-language-servers.html + \nextpage creator-mime-types.html + + \title Using Language Servers + + For several programming languages, a \e {language server} is available + that provides information about the code to IDEs as long as they support + communication via the language server protocol (LSP). This enables the + IDE to provide code completion, highlighting of the symbol under cursor, + and jumping to the symbol definition, as well as to integrate diagnostics + from the language server. + + By providing a client for the language server protocol, \QC can support + the above features for several other programming languages besides C++. + However, the experimental client does support language servers that + require special handling. + + \QC uses the \l{https://www.iana.org/assignments/media-types/media-types.xhtml} + {MIME type} of the file to determine which language server to start when you + open a file for editing. Add new MIME types as filters for language servers. + For more information about how \QC uses MIME types, see + \l {Editing MIME Types}. + + The experimental language service client has been mostly tested with Python. + If problems arise when you try some other language, please select + \uicontrol Help > \uicontrol {Report Bug} to report them in the Qt Bug + Tracker. The reports should include \QC console output with the environment + variable \c {QT_LOGGING_RULES=qtc.languageclient.*=true} set. + + To use a language server: + + \list 1 + + \li Enable the language server client by selecting \uicontrol Help > + \uicontrol {About Plugins} > \uicontrol {Other Languages} > + \uicontrol {Language Client} (or \uicontrol {Qt Creator} > + \uicontrol {About Plugins} > \uicontrol {Other Languages} > + \uicontrol {Language Client} on \macos). + \li Restart \QC to load the language client plugin. + \li Select \uicontrol Tools > \uicontrol Options > + \uicontrol {Language Client} > \uicontrol Add (or + \uicontrol {Qt Creator} > \uicontrol {Language Client} > + \uicontrol Add on \macos) to add language servers. + \li In the \uicontrol Name field, enter a name for the language server. + \li Select the \uicontrol Enabled check box. + \li In the \uicontrol {MIME Type} field, enter the filter for files that + the lanaguage server will handle. When you start typing the filter + name, a list of predefined filters appears where you can select a + filter. + \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 + arguments. + \endlist +*/ diff --git a/doc/src/editors/creator-only/creator-mime-types.qdoc b/doc/src/editors/creator-only/creator-mime-types.qdoc index 251f419514..de45695725 100644 --- a/doc/src/editors/creator-only/creator-mime-types.qdoc +++ b/doc/src/editors/creator-only/creator-mime-types.qdoc @@ -31,16 +31,16 @@ /*! \contentspage index.html - \previouspage creator-editor-fakevim.html + \previouspage creator-language-servers.html \page creator-mime-types.html \nextpage creator-modeling.html \title Editing MIME Types - \QC uses the \l{http://en.wikipedia.org/wiki/Internet_media_type} - {Internet media type} (MIME type) of the file to determine which mode and - editor to use for opening the file. For example, \QC opens C++ source and - header files in the C++ editor, and Qt widget based UI files (.ui) in \QD. + \QC uses the \l{https://www.iana.org/assignments/media-types/media-types.xhtml} + {MIME type} of the file to determine which mode and editor to use for + opening the file. For example, \QC opens C++ source and header files in + the C++ editor, and Qt widget based UI files (.ui) in \QD. To identify the MIME type of a file, \QC uses matching by pattern and matching by contents. First, \QC looks at the filename to check whether it diff --git a/doc/src/qtcreator-toc.qdoc b/doc/src/qtcreator-toc.qdoc index 119d5f1d92..89d19a619c 100644 --- a/doc/src/qtcreator-toc.qdoc +++ b/doc/src/qtcreator-toc.qdoc @@ -141,6 +141,7 @@ \li \l{Specifying Text Editor Settings} \li \l{Using FakeVim Mode} \endlist + \li \l{Using Language Servers} \li \l{Editing MIME Types} \li \l{Modeling} \li \l{Editing State Charts} |