Commit Graph

65 Commits

Author SHA1 Message Date
Alessandro Portale
0be309bcf1 Various places: performance-for-range-copy
Change-Id: I475990d32a5211d31a77782667a2dfedba134137
Reviewed-by: hjk <hjk@qt.io>
2020-06-15 05:58:46 +00:00
David Schulz
8f5109b6ee LSP: Robustify open documents
Use Client::openDocument if you just want to open a document and
activate it if it is not already used in another client.

Use LanguageClientManager::openDocumentWithClient if you want to make
sure a document is opened _and_ activated for a specific client.

Change-Id: I6b790f15e17335ce2dc8981a04d2cd571b22b66b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-14 09:51:26 +00:00
Eike Ziller
3b5fc296f2 Python editor: Add buttons & actions for opening REPL
Opens interactive Python, optionally with the current file imported, for
testing and experimentation.

Change-Id: Ieb120e3698bdba77a1445c40fe7fda533773a0cf
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-03-19 13:04:48 +00:00
David Schulz
5a2de2609e Python: detect language server for python asynchron
Change-Id: I775e4cc21dc443b9ec6af81fabef9cf2bfd4e7d2
Fixes: QTCREATORBUG-23599
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 05:42:17 +00:00
hjk
783967f550 Python: Move PyLSConfigureAssistant connection to the plugin
Change-Id: I2d3aecd10d8da7e7272ebca61c0fbeacbc257bd5
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-02-12 10:09:13 +00:00
David Schulz
dee41be2ab Python: install pyls with [all] tag on windows
Pylint caused some troubles on windows, but since 0.31.0 it is disabled
by default, so we can safely install the complete python language server
on all platforms now.

Change-Id: I2f7047e71308040c41d996679d19868c4e6fe73a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-13 08:02:16 +00:00
David Schulz
cbdcde0603 Python: Reset editor info bars when closing document
Fixes crash after reopening a python document and configuring the python
language server in the reopend document.

Change-Id: I42eb6c5d3ccb755a836fd9071b3147d65c8c0ab6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-10 11:30:58 +00:00
David Schulz
54f2ebf91d Python: cache the module path for executable
This reduces ui freezes when switching the interpreter for a python
project.

Change-Id: Iaa8ce8ed8d51666f8696eb96f504aaf8c4a11822
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-04 05:47:38 +00:00
David Schulz
6664d78ded Python: detect virtual environments for documents and projects
After opening a document or project the directory hierarchy is looked up
for a Scripts/(activate && python.exe) on windows or bin/(activate &&
python) on unix. This is the usual structure of python virtual
environments. If such a folder is found add the python from that folder
to the list of configured interpreters in the settings, set it as the
current interpreter for the project and try to open the corresponding
language server.

Change-Id: I038c309ea2988f9370194330d250d1515beac0a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-30 08:46:12 +00:00
Leena Miettinen
70ce398602 Python: Fix UI text
Change-Id: Ia3fa732d9ed6bb880ea7721712093fbe8faa27bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-10-29 07:52:51 +00:00
David Schulz
01df962d6a Python: install python language server with --user
Change-Id: Ifd8e19ea7d52d85ec0c497e5cbfe24300571398e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-25 12:50:35 +00:00
David Schulz
10c94994db Python: close all info bars after language server setup
Change-Id: I607f7cb5a31f3db0c7d7d77011860a1ea87eb8d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-25 12:50:24 +00:00
David Schulz
8b04019270 Python: Fix opening document in wrong pyls
The document was always opened in the first of the configured python
language servers.

Change-Id: If33cb4a08884b93047016be1d8cf5c27ea7950d9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-18 05:23:40 +00:00
David Schulz
28c3f0c31e Python: Add info bar entry to enable pyls
Show an editor info bar entry displaying that the language server for
the current python is disabled and a button to quickly enable the pyls.

Change-Id: I3adb2e7cbfb1a32e35413b0b06dfbe66a0b214af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-18 05:23:29 +00:00
David Schulz
c8ccfea225 Python: Switch pyls on interpreter change
Change-Id: I458b635986a55003a1e7254e27e2df9667704273
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-18 05:23:10 +00:00