aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient
Commit message (Collapse)AuthorAgeFilesLines
* Fix MSVC warningsOrgad Shaneh2019-09-111-1/+1
| | | | | | | | | | * Missing `this` captures * Implicit size_t -> int conversion * Unused argument * Suppress warnings in clang headers Change-Id: I7083ce6ab22ee22ecc1258539e77c790acc78df1 Reviewed-by: hjk <hjk@qt.io>
* LanguageClient: Fix wrong notification after will save signalDavid Schulz2019-09-111-1/+1
| | | | | Change-Id: I9470dc7ea9058f43fcf61d4721c3aee1348a7d6e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: reverse error list for initialize errorsDavid Schulz2019-07-191-1/+3
| | | | | | | like it's done in Client::handleMethod. Change-Id: I78c8c43f93ebde20b662fa3d1b6032d83ccac0fd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: include the range length in document updatesDavid Schulz2019-07-191-0/+1
| | | | | | | | | | The did change notification parameter has an arguable redundant range length field, but it seems that there are language server out there which rely on the presence of this field. Change-Id: Id29132fb6586a2886b8ba6d9a13df52a64f31161 Fixes: QTCREATORBUG-22694 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LanguageClient: Show outline after server startDavid Schulz2019-07-181-0/+5
| | | | | | | | | | If the server was started by opening a document the outline factory and client was not properly initialized in the time the outline was requested. Update the outline after the client is fully initialized. Fixes: QTCREATORBUG-22695 Change-Id: I84dc56eead9774d80ed6baf7792daff930a7cb8e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LanguageClient: Fix file path filter handlingChristian Stenger2019-06-251-4/+4
| | | | | | | | | | Avoid sending files to a language server without a file path, like temporary generated files. Only allow this if the file matches the MIME type of the language server. Change-Id: Ibf71a7196c387a2c8bf345db24c0005ba8fbdfb1 Reviewed-by: David Schulz <david.schulz@qt.io>
* Language Client: Fix UI text capitalizationLeena Miettinen2019-06-251-1/+1
| | | | | Change-Id: I6871bb6f91b6a7dfd8b0a12973e709193d6a8a99 Reviewed-by: David Schulz <david.schulz@qt.io>
* LanguageClient: remove experimental flagDavid Schulz2019-06-131-1/+0
| | | | | | Change-Id: I3406bdfc9663f8ef5ced4935941f4510902ed762 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-289-24/+24
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace uses of qVariantFromValue with QVariant::fromValuehjk2019-05-271-2/+2
| | | | | | | | Deprecated in Qt 5.14, alternative has been around since Qt 4 at least. Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CMake: Do not build .pri-fileTobias Hunger2019-05-271-1/+0
| | | | | Change-Id: Ife5889ad9475769028c898fd298e737aeab08d79 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LanguageClient: add signature help providerDavid Schulz2019-05-217-0/+213
| | | | | Change-Id: Ia89c28b574c92802bbfda280115a50f5955f0854 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: Fix build for older compilerChristian Stenger2019-05-201-3/+3
| | | | | | | Amends ed77e105717eb9713a56254375e2646a3a6ddcee. Change-Id: Icd41c65ae308f8862cd9b11ac32f8f8d22e7f6e3 Reviewed-by: David Schulz <david.schulz@qt.io>
* Qt Creator CMake portCristian Adam2019-05-171-0/+21
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LanguageClient: Visualize special trigger charactersChristian Stenger2019-05-171-0/+21
| | | | | | | | | Instead of having strange looking cells that appear to be empty try to cope at least with some common trigger characters and visualize them. Change-Id: Id0f696eb47df204756a1387535a15c2a1d75cc30 Reviewed-by: David Schulz <david.schulz@qt.io>
* LanguageClient: Ensure scrolling to selected outline itemChristian Stenger2019-05-171-0/+2
| | | | | Change-Id: I513c1d3412723c00282b0dd7e3f181c92edb674b Reviewed-by: David Schulz <david.schulz@qt.io>
* LanguageClient: update outline after document changesDavid Schulz2019-05-171-0/+5
| | | | | Change-Id: I45b9107ccf812582a6138b469ded57e978bce267 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: add hover handlerDavid Schulz2019-05-177-0/+233
| | | | | Change-Id: Iddf30828ef26a157ab935d0abe708087ab123dd6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: only replace the default completion providerDavid Schulz2019-05-172-13/+19
| | | | | Change-Id: I36977132ac8094fd31d7bc255a1666ba807810bb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: always set client capabilitiesDavid Schulz2019-05-171-4/+3
| | | | | | | Not just if a project is currently set. Change-Id: I07b19695464025a9d039364ff1611aa39e8e1a9b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: add locator filters for symbols in workspace/projectDavid Schulz2019-05-144-34/+201
| | | | | | | | | | | | Implement locator filter that is using the workspace/symbol request to search for symbols in a project. In total three filters were added: ':': searches for all kind of symbols 'c': searches for classes and structs 'm': searches for methods and functions Fixes: QTCREATORBUG-21915 Change-Id: Id62c9e0b1bcb29112e35b926b1a5cf04357751c4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: Fix icon cacheChristian Stenger2019-05-141-1/+1
| | | | | Change-Id: I084489de7439f4d99694c73f669520eec2b3f368 Reviewed-by: David Schulz <david.schulz@qt.io>
* LanguageClient: Fix deadlock in locatorfilterDavid Schulz2019-05-131-1/+3
| | | | | Change-Id: I4804ec28f74fdf3c7cf20798a94b6edf04f00439 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: send partial document in update notificationDavid Schulz2019-05-132-11/+35
| | | | | | | | | Reduce the amount of transferred data between client and server by sending events which just contain the changed part of the document instead of the full content if the server supports those events. Change-Id: I596930c405bd7a71e4219e328b449fca67664750 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: Fix crash after disabling client settingDavid Schulz2019-05-093-29/+31
| | | | | Change-Id: I0f9ec02edc645726764fc9ea9ea1832e40bbef80 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LSP: reredo completion replacement logicDavid Schulz2019-05-091-4/+17
| | | | | | | | | | | | | | | | | | replacing the text from word start to current cursor position only works if we are not currently at a word start. For example completing: object.function(var|) will not replace the already typed var, because selecting from cursor position to word start does not select anything. Try selecting from current position backwards as long as the inserted text matches case insensitive to the already available text, or select the match of the "[a-zA-Z_][a-zA-Z0-9_]" regex. Whichever selected text is longer will be replaced. Change-Id: I73965183ba430a8de1b7725e1f7bc7621861433f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LSP: log non protocol lines instead of throwing an errorDavid Schulz2019-05-091-6/+5
| | | | | | | | | | Some language server send non protocol conform lines over the same transport layer as the protocol messages. Do not switch the client for those servers into the error state, but print a warning message with the content of these lines to a categorized log. Change-Id: Ic6c62648f0237362136fd657fde71dd104bca9d1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-05-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/howto/creator-sidebar-views.qdoc doc/src/howto/creator-ui.qdoc qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/autotest/testresultmodel.cpp src/plugins/autotest/testresultmodel.h Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
| * LanguageClient: Fix error message on crashChristian Stenger2019-05-071-1/+1
| | | | | | | | | | Change-Id: I46c3fbcff2fcd8eaac57e2c8edcb03f73b7b063f Reviewed-by: David Schulz <david.schulz@qt.io>
* | LanguageClient: Use empty icon for unknown completion item kindNikolai Kosjar2019-05-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | ...instead of a null icon. Without this, a completion item gets no icon and looks misaligned between items with icons. For example, for the completion item "size_t" (a typedef) clangd reports a completion kind of "Reference", for which we do not have a dedicated icon. Change-Id: Ibba658d6bfb958bb34747e3f57514af49f5427b0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | LanguageClient: enable commit characters for completion itemsDavid Schulz2019-05-072-2/+12
| | | | | | | | | | | | | | | | | | While a completion is currently active a commit character can automatically apply the current item and close the current completion widget. Change-Id: Ia962eed69684f8f13f54b88934c63700532103e7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: explicitly disable snippets in completion itemsDavid Schulz2019-05-061-1/+4
| | | | | | | | | | Change-Id: I706f26a2efe090265c36b367e9cd3858dbef9d06 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: redo completion replacement logicDavid Schulz2019-05-061-10/+5
| | | | | | | | | | | | | | | | Instead of trying some magic when applying completion items just replace the text from the current position back to the start of the word. Change-Id: I03ac0f8c9bced88d21bd51f9e5cfa0a3ea25025a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: Do not include current document locator filter by defaultDavid Schulz2019-04-301-1/+1
| | | | | | | | | | Change-Id: I2eaaf6214a40045b1e388288e3f874683424b44e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | LanguageClient: add current document locator filterDavid Schulz2019-04-3011-43/+349
| | | | | | | | | | Change-Id: I20442a254e4e016088b2da845d87af6e9f836731 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: add option to start client per projectDavid Schulz2019-04-296-58/+199
| | | | | | | | | | | | | | | | | | Some server like rust or haskell require a project at server startup. Add option that postpones the server start until we can assign a project to an open file. Change-Id: Iaa475289e833b27a730a90ea228f5d85ecc30338 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: add cache for document symbolsDavid Schulz2019-04-257-24/+170
| | | | | | | | | | Change-Id: Ia4c4061258c74d839edbd472c2087be74ac30113 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LSP: add completion context to completion requestDavid Schulz2019-04-251-0/+1
| | | | | | | | | | Change-Id: I97df6d70ef2ad6e6e1fc0153cd1589b5d5c9683b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LSP: set completion trigger characters to assist providerDavid Schulz2019-04-241-0/+5
| | | | | | | | | | Change-Id: I39bd9aca77d824b6533ea8e4c3aa704b9112be45 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | LanguageClient: move setting client relationship to managerDavid Schulz2019-04-244-39/+68
| | | | | | | | | | Change-Id: I9bf712227d44eada28abb18bbf641a2bfa835914 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: remove unneeded forward delarationDavid Schulz2019-04-232-11/+6
| | | | | | | | | | | | Change-Id: I02e8dd07f8f04c82cdf31fc536c7d23924539296 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | LanguageClient: move current settings to managerDavid Schulz2019-04-234-27/+54
| | | | | | | | | | | | | | | | In preparation to have relationship between clients, settings and project to one another in the manager. Change-Id: I00ae15abe03c54b4a58e429d67d6ff939662cce6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: Select server entry in settings after "Add"Alessandro Portale2019-04-111-0/+1
| | | | | | | | | | | | | | Indicates what to do after adding a server. Change-Id: Ia68e2944fa18d031c1b7e2fa93723bd861bfded9 Reviewed-by: David Schulz <david.schulz@qt.io>
* | LanguageClient: only use BaseSettings in the settings APIDavid Schulz2019-04-043-33/+31
| | | | | | | | | | Change-Id: Ie2ccda8fe4349f495f31a5d46254b68f6074ac6d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: remove friend relationship between manager and pluginDavid Schulz2019-04-044-25/+58
| | | | | | | | | | Change-Id: I594d62615f365db34174c4bd1e6c8a9f6aeb545a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: show icon with assigned server names in toolbarDavid Schulz2019-04-0310-11/+86
| | | | | | | | | | Change-Id: I44ceeb184812a4c48f042a19197c7f0ffd4299f8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: Compare expanded arguments for stdio clientsDavid Schulz2019-04-023-2/+8
| | | | | | | | | | Change-Id: I6b33aa6b3ddb03a1965dbda4e7e1e1724299eba1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: return actual settings instead of fallback settingsDavid Schulz2019-04-021-1/+1
| | | | | | | | | | Change-Id: Ia0734c07ae5894d6c5c3e1f9c78e213f9422b6d8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LanguageClient: support dynamic registration for more functionsDavid Schulz2019-04-021-0/+5
| | | | | | | | | | Change-Id: Iaa49c96195b04ebf72f54698bc070fa0bcaa6311 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | LSP: generate capabilities in a central placeDavid Schulz2019-04-021-0/+70
| | | | | | | | | | | | | | | | Also remove the creator default capabilities from the default constructor of the general client capabilities in Utils. Change-Id: Ifdaaf1bfb5047197e37ba84773552648132df3e8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>