forked from qt-creator/qt-creator
Python: Use specialized document to check for pylsp
Change-Id: I9ea13df7fc04a4fe35d901da179b9c0ebaf57bb6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -635,19 +635,6 @@ static void enablePythonLanguageServer(const FilePath &python,
|
||||
}
|
||||
}
|
||||
|
||||
void PyLSConfigureAssistant::documentOpened(Core::IDocument *document)
|
||||
{
|
||||
auto textDocument = qobject_cast<TextEditor::TextDocument *>(document);
|
||||
if (!textDocument || textDocument->mimeType() != Constants::C_PY_MIMETYPE)
|
||||
return;
|
||||
|
||||
const FilePath &python = detectPython(textDocument->filePath());
|
||||
if (!python.exists())
|
||||
return;
|
||||
|
||||
instance()->openDocumentWithPython(python, textDocument);
|
||||
}
|
||||
|
||||
void PyLSConfigureAssistant::openDocumentWithPython(const FilePath &python,
|
||||
TextEditor::TextDocument *document)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user