This is an automated email from the ASF dual-hosted git repository.

wenchen pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/spark-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new b92bcd8de3 Introduce Cursor/VS Code support (#655)
b92bcd8de3 is described below

commit b92bcd8de34a77dd2c88c2547f00e2977dd154a0
Author: Wenchen Fan <[email protected]>
AuthorDate: Mon Dec 29 13:48:48 2025 +0800

    Introduce Cursor/VS Code support (#655)
    
    * Introduce Cursor/VS Code support
    
    * improve
    
    * Apply suggestions from code review
    
    * Apply suggestions from code review
---
 developer-tools.md        | 20 ++++++++++++++++++++
 site/developer-tools.html | 23 +++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/developer-tools.md b/developer-tools.md
index 0908cef343..bf0920a6e2 100644
--- a/developer-tools.md
+++ b/developer-tools.md
@@ -470,6 +470,26 @@ debug in IntelliJ as usual.
 To exit remote debug mode (so that you don't have to keep starting the remote 
debugger),
 type "session clear" in SBT console while you're in a project.
 
+
+<h4>Cursor/VS Code</h4>
+
+You can leverage the power of *Cursor* or *VS Code* for Spark development by 
using the Metals extension. 
+Metals provides robust Scala support through the Build Server Protocol (BSP).
+
+Initial setup:
+- *Install Metals*: Search for and install the Scala (Metals) extension from 
the Marketplace.
+- *Open Project*: Open your Spark root directory.
+- *Select Build Tool*: When prompted by the popup in the bottom-left corner, 
select sbt to read build definition.
+- *Confirm Build Server*: Metals defaults to using Bloop as the build server. 
Do not change this setting, as Bloop provides the fastest compilation and best 
integration for local development. Open the Command Palette (Cmd+Shift+P or 
Ctrl+Shift+P), run `Metals: Run doctor`, and verify the status dashboard. 
Ensure it shows: `Build definition is coming from sbt` and `Build server 
currently being used is Bloop`.
+
+If you encounter compilation errors or the IDE fails to recognize symbols, 
follow these steps to perform a clean import:
+1. *Stop Bloop Server*: Run the following command in your terminal to stop the 
bloop server: `pkill -f "bloop.BloopServer"`. If you have installed bloop CLI 
you can run `bloop exit` instead.
+2. *Clean Workspace*: Run the following command in your terminal to remove 
cached build metadata: `rm -rf .bloop/ .metals/ .bsp/`.
+3. *Reload Window*: Run `Developer: Reload Window` from the Command Palette, 
and select sbt when the prompt reappears.
+4. *Import Build*: Run `Metals: Import build` and wait for the process to 
complete.
+5. *Connect to Server*: Run `Metals: Connect to build server` and wait for the 
process to complete.
+6. *Confirm*: Run `Metals: Run doctor` and verify the status dashboard.
+
 <h4>Eclipse</h4>
 
 Eclipse can be used to develop and test Spark. The following configuration is 
known to work:
diff --git a/site/developer-tools.html b/site/developer-tools.html
index 574ef1f201..ea160cfb23 100644
--- a/site/developer-tools.html
+++ b/site/developer-tools.html
@@ -606,6 +606,29 @@ debug in IntelliJ as usual.</p>
 <p>To exit remote debug mode (so that you don&#8217;t have to keep starting 
the remote debugger),
 type &#8220;session clear&#8221; in SBT console while you&#8217;re in a 
project.</p>
 
+<h4>Cursor/VS Code</h4>
+
+<p>You can leverage the power of <em>Cursor</em> or <em>VS Code</em> for Spark 
development by using the Metals extension. 
+Metals provides robust Scala support through the Build Server Protocol 
(BSP).</p>
+
+<p>Initial setup:</p>
+<ul>
+  <li><em>Install Metals</em>: Search for and install the Scala (Metals) 
extension from the Marketplace.</li>
+  <li><em>Open Project</em>: Open your Spark root directory.</li>
+  <li><em>Select Build Tool</em>: When prompted by the popup in the 
bottom-left corner, select sbt to read build definition.</li>
+  <li><em>Confirm Build Server</em>: Metals defaults to using Bloop as the 
build server. Do not change this setting, as Bloop provides the fastest 
compilation and best integration for local development. Open the Command 
Palette (Cmd+Shift+P or Ctrl+Shift+P), run <code class="language-plaintext 
highlighter-rouge">Metals: Run doctor</code>, and verify the status dashboard. 
Ensure it shows: <code class="language-plaintext highlighter-rouge">Build 
definition is coming from sbt</code> and <co [...]
+</ul>
+
+<p>If you encounter compilation errors or the IDE fails to recognize symbols, 
follow these steps to perform a clean import:</p>
+<ol>
+  <li><em>Stop Bloop Server</em>: Run the following command in your terminal 
to stop the bloop server: <code class="language-plaintext 
highlighter-rouge">pkill -f "bloop.BloopServer"</code>. If you have installed 
bloop CLI you can run <code class="language-plaintext highlighter-rouge">bloop 
exit</code> instead.</li>
+  <li><em>Clean Workspace</em>: Run the following command in your terminal to 
remove cached build metadata: <code class="language-plaintext 
highlighter-rouge">rm -rf .bloop/ .metals/ .bsp/</code>.</li>
+  <li><em>Reload Window</em>: Run <code class="language-plaintext 
highlighter-rouge">Developer: Reload Window</code> from the Command Palette, 
and select sbt when the prompt reappears.</li>
+  <li><em>Import Build</em>: Run <code class="language-plaintext 
highlighter-rouge">Metals: Import build</code> and wait for the process to 
complete.</li>
+  <li><em>Connect to Server</em>: Run <code class="language-plaintext 
highlighter-rouge">Metals: Connect to build server</code> and wait for the 
process to complete.</li>
+  <li><em>Confirm</em>: Run <code class="language-plaintext 
highlighter-rouge">Metals: Run doctor</code> and verify the status 
dashboard.</li>
+</ol>
+
 <h4>Eclipse</h4>
 
 <p>Eclipse can be used to develop and test Spark. The following configuration 
is known to work:</p>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to