Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
run: |
cd Example
bazelisk test //HelloWorld:HelloWorldTests
- name: Build VSCode extension
run: |
cd vscode-extension
npm install
npm run compile
- name: Build release source archive
run: make release_source_archive
- uses: actions/upload-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions vscode-extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
out/
*.vsix

13 changes: 13 additions & 0 deletions vscode-extension/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "npm: compile"
}
]
}
22 changes: 22 additions & 0 deletions vscode-extension/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"problemMatcher": "$tsc",
"label": "npm: compile",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"label": "npm: watch",
"isBackground": true
}
]
}
7 changes: 7 additions & 0 deletions vscode-extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.vscode/**
src/**
tsconfig.json
**/*.ts
**/*.map
node_modules/**

11 changes: 11 additions & 0 deletions vscode-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# VSCode Extension

This is an early WIP VSCode extension. It has the goal of enabling support for functionality such as:

- [ ] (Cursor / VSCode): Automatic generation of build, launch, and debug tasks

- [ ] (Cursor / VSCode): Test explorer & ability to run tests from within the IDE by clicking the tests individually, similarly to Xcode

- [ ] Automatic index and build graph updates when adding / deleting files and targets (in other words, allowing the user to make heavy changes to the project without needing to restart the IDE)

The extension is in active development and is not yet ready for use.
58 changes: 58 additions & 0 deletions vscode-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions vscode-extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "sourcekit-bazel-bsp",
"displayName": "SourceKit Bazel BSP",
"description": "Companion extension for sourcekit-bazel-bsp",
"version": "0.0.1",
"publisher": "spotify",
"repository": {
"type": "git",
"url": "https://github.com/spotify/sourcekit-bazel-bsp"
},
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Programming Languages"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./"
},
"devDependencies": {
"@types/vscode": "^1.85.0",
"@types/node": "^20.0.0",
"typescript": "^5.3.0"
}
}
28 changes: 28 additions & 0 deletions vscode-extension/src/extension.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) 2025 Spotify AB.
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import { log } from "./logger";

export function activate() {
log("Extension activated ✅");
}

export function deactivate() {
log("Extension deactivated ❌");
}
26 changes: 26 additions & 0 deletions vscode-extension/src/logger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) 2025 Spotify AB.
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import * as vscode from "vscode";

const outputChannel = vscode.window.createOutputChannel("SourceKit Bazel BSP");

export function log(message: string) {
outputChannel.appendLine(message);
}
19 changes: 19 additions & 0 deletions vscode-extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2020",
"lib": ["ES2020"],
"outDir": "out",
"rootDir": "src",
"sourceMap": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}