[sdk/kdesrc-build/docbook_historied_per_file] doc: Add "generate-vscode-project-config" option

Andrew Shark null at kde.org
Fri May 10 10:16:52 BST 2024


Git commit 6bd9334789b5b00a4e4bfc4a5fbf922f2a8b23dd by Andrew Shark, on behalf of Kristen McWilliam.
Committed on 02/12/2023 at 16:16.
Pushed by ashark into branch 'docbook_historied_per_file'.

Add "generate-vscode-project-config" option

This change adds `generate-vscode-project-config` option for `kdesrc-buildrc`
and the corresponding command line flag.

When set to `true`, kdesrc-build will create the `.vscode` folder
in the module source directory with configuration that makes VSCode to work
properly with KDE projects, such as setting the correct build
directory & enabling support for C++, CMake, LSP & IntelliSense.

The process specifically checks for an existing `.vscode` folder,
in case the user already has custom settings present - and only
proceeds if it does not exist yet.

Closes #84

Original commit: 1d9b2355
https://invent.kde.org/sdk/kdesrc-build/-/commit/1d9b2355c10db4d8825cefe06c73b07d0b4f4373

M  +8    -0    doc/cmdline/supported-cmdline-params.docbook
M  +27   -0    doc/kdesrc-buildrc/conf-options-table.docbook

https://invent.kde.org/sdk/kdesrc-build/-/commit/6bd9334789b5b00a4e4bfc4a5fbf922f2a8b23dd

diff --git a/doc/cmdline/supported-cmdline-params.docbook b/doc/cmdline/supported-cmdline-params.docbook
index ded50d26..5818d7a6 100644
--- a/doc/cmdline/supported-cmdline-params.docbook
+++ b/doc/cmdline/supported-cmdline-params.docbook
@@ -105,6 +105,14 @@ Enable colorful output. (This is the default for interactive terminals).
 </para></listitem>
 </varlistentry>
 
+<varlistentry id="cmdline-generate-vscode-project-config">
+<term><parameter>--generate-vscode-project-config</parameter></term>
+<listitem><para>
+Generate a .vscode directory with configurations for building and debugging 
+in Visual Studio Code.
+</para></listitem>
+</varlistentry>
+
 <varlistentry id="cmdline-nice">
 <term><parameter>--nice=<replaceable>value</replaceable></parameter></term>
 <listitem><para>
diff --git a/doc/kdesrc-buildrc/conf-options-table.docbook b/doc/kdesrc-buildrc/conf-options-table.docbook
index 038b25e0..2f26df6f 100644
--- a/doc/kdesrc-buildrc/conf-options-table.docbook
+++ b/doc/kdesrc-buildrc/conf-options-table.docbook
@@ -809,6 +809,33 @@ due to changes in the project metadata.</para>
 </entry>
 </row>
 
+<row id="conf-generate-vscode-project-config">
+<entry>generate-vscode-project-config</entry>
+
+<entry>
+<simplelist type='horiz' columns='2'>
+<member>Type</member><member>Boolean</member>
+<member>Default value</member><member>False</member>
+</simplelist>       
+
+<para>Module setting overrides global</para>
+
+<para>Set this option to <userinput>true</userinput> to make 
+&kdesrc-build; create VS Code project files (.vscode directory) in the module 
+source directory.</para>
+
+<para>The .vscode folder will be created in the project source directory, only 
+if it does not already exist. The configurations will enable the use of LSP, 
+building, debugging, and running the project from within VS Code.</para>
+
+<para>The configuration also recommends extensions to install that are useful 
+for working on most KDE projects.</para>
+
+<para>You can also use the <link linkend="cmdline-generate-vscode-project-config">
+<option>--generate-vscode-project-config</option></link> command line flag.</para>
+</entry>
+</row>
+
 <row id="conf-include-dependencies">
 <entry>include-dependencies</entry>
 <entry>



More information about the kde-doc-english mailing list