From d009e1bc3b57c16d95a42a876fd46043d7df39c8 Mon Sep 17 00:00:00 2001 From: Stella <100439259+StellaHuang95@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:42:38 -0700 Subject: [PATCH] set default to true (#8025) --- .../PythonTools/PythonTools/Editor/LanguagePreferences.cs | 3 +++ Python/Product/PythonTools/PythonToolsPackage.cs | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Python/Product/PythonTools/PythonTools/Editor/LanguagePreferences.cs b/Python/Product/PythonTools/PythonTools/Editor/LanguagePreferences.cs index 3fef89b7e..16b338430 100644 --- a/Python/Product/PythonTools/PythonTools/Editor/LanguagePreferences.cs +++ b/Python/Product/PythonTools/PythonTools/Editor/LanguagePreferences.cs @@ -38,6 +38,8 @@ namespace Microsoft.PythonTools.Editor { var langPrefs = new LANGPREFERENCES[1]; langPrefs[0].guidLang = languageGuid; ErrorHandler.ThrowOnFailure(_textMgr.GetUserPreferences(null, null, langPrefs, null)); + langPrefs[0].fLineNumbers = 1; + ErrorHandler.ThrowOnFailure(_textMgr.SetUserPreferences(null, null, langPrefs, null)); _preferences = langPrefs[0]; var guid = typeof(IVsTextManagerEvents2).GUID; @@ -103,6 +105,7 @@ namespace Microsoft.PythonTools.Editor { _preferences.fAutoListParams = langPrefs[0].fAutoListParams; _preferences.fHideAdvancedAutoListMembers = langPrefs[0].fHideAdvancedAutoListMembers; _preferences.fDropdownBar = langPrefs[0].fDropdownBar; + _preferences.fLineNumbers = langPrefs[0].fLineNumbers; } return VSConstants.S_OK; } diff --git a/Python/Product/PythonTools/PythonToolsPackage.cs b/Python/Product/PythonTools/PythonToolsPackage.cs index f26d74734..965c927ea 100644 --- a/Python/Product/PythonTools/PythonToolsPackage.cs +++ b/Python/Product/PythonTools/PythonToolsPackage.cs @@ -79,7 +79,7 @@ namespace Microsoft.PythonTools { [ProvideOptionPage(typeof(PythonDebuggingOptionsPage), "Python Tools", "Debugging", 115, 125, true)] [ProvideOptionPage(typeof(PythonCondaOptionsPage), "Python Tools", "Conda", 115, 132, true)] [Guid(CommonGuidList.guidPythonToolsPkgString)] // our packages GUID - [ProvideLanguageService(typeof(PythonLanguageInfo), PythonConstants.LanguageName, 106, RequestStockColors = true, ShowSmartIndent = true, ShowCompletion = false, DefaultToInsertSpaces = true, HideAdvancedMembersByDefault = true, EnableAdvancedMembersOption = true, ShowDropDownOptions = false)] + [ProvideLanguageService(typeof(PythonLanguageInfo), PythonConstants.LanguageName, 106, RequestStockColors = true, EnableLineNumbers = true, ShowSmartIndent = true, ShowCompletion = false, DefaultToInsertSpaces = true, HideAdvancedMembersByDefault = true, EnableAdvancedMembersOption = true, ShowDropDownOptions = false)] [ProvideLanguageExtension(typeof(PythonLanguageInfo), PythonConstants.FileExtension)] [ProvideLanguageExtension(typeof(PythonLanguageInfo), PythonConstants.WindowsFileExtension)] [ProvideLanguageExtension(typeof(PythonLanguageInfo), PythonConstants.StubFileExtension)] diff --git a/package.json b/package.json index 44219cf2e..ad6b46cae 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,6 @@ "name": "ptvs", "private": true, "devDependencies": { - "@pylance/pylance": "2024.9.2" + "@pylance/pylance": "2024.10.1" } }