Skip to content

Commit 96db7c8

Browse files
Merge pull request #2 from elasticdotventures/feature/mcp
feature/mcp
2 parents 3e4ac03 + 3bdb610 commit 96db7c8

36 files changed

+6174
-455
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
id-token: write
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-latest
19+
if: "!contains(github.event.head_commit.message, 'skip ci')"
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
persist-credentials: false
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
33+
- name: Setup pnpm
34+
uses: pnpm/action-setup@v4
35+
with:
36+
version: latest
37+
38+
- name: Install dependencies
39+
run: pnpm install --frozen-lockfile
40+
41+
- name: Build extension
42+
run: pnpm run package
43+
44+
- name: Run tests
45+
run: pnpm run test
46+
47+
- name: Release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
51+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
52+
run: pnpm run release

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit "$1"

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm run check-types && pnpm run lint

.releaserc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"branches": ["main", "master"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogFile": "CHANGELOG.md"
10+
}
11+
],
12+
[
13+
"semantic-release-vsce",
14+
{
15+
"packageVsix": true,
16+
"publishVsix": true
17+
}
18+
],
19+
[
20+
"@semantic-release/git",
21+
{
22+
"assets": ["CHANGELOG.md", "package.json"],
23+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
24+
}
25+
]
26+
]
27+
}

CHANGELOG.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
# Change Log
1+
# Changelog
22

3-
All notable changes to the "justlang-lsp" extension will be documented in this file.
3+
All notable changes to this project will be documented in this file.
44

5-
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

78
## [Unreleased]
89

9-
- Initial release
10+
### Changed
11+
- Updated repository references to `elasticdotventures/just-vscode-extension`
12+
- Set up automated release workflow with semantic-release
13+
- Added conventional commit tooling (commitizen, commitlint, husky)
14+
15+
## [0.0.33] - Previous Release
16+
17+
See git history for previous changes.

CLAUDE.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 90 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,61 @@
11
# JustLang-LSP Extension
22

33
## Overview
4+
45
JustLang-LSP is a Visual Studio Code extension designed to enhance the development experience by providing task automation and integration with JustLang syntax. It supports `Justfile` (any capitalization), `.justfile`, and `*.just` formats. This extension leverages the VS Code API to register commands and task providers, enabling seamless execution of tasks defined in JustLang files.
56

67
This extension now includes a language client for the `just-lsp` language server, providing features like completion, diagnostics, and more.
8+
I ported my own
9+
10+
https://docs.pkgx.sh/
11+
#!/usr/bin/env -S pkgx +cargo rust-script
12+
https://github.com/pkgxdev/pkgx
13+
14+
cargo install pkgx rust-script
15+
16+
17+
718

819
## Features
9-
- **Language Server Integration**: Connects to the `just-lsp` language server for advanced language features.
10-
- **Task Provider Integration**: Automatically detects and registers tasks from JustLang files (`Justfile`, `.justfile`, or `*.just`).
11-
- **Command Registration**: Includes a sample command (`justlang-lsp.helloWorld`) for demonstration purposes.
12-
- **Compatibility**: Ensures proper integration with VS Code's command and subscription mechanisms.
13-
- **Syntax Highlighting**: Provides syntax highlighting for JustLang files using TextMate grammar (`syntaxes/just.tmLanguage.yaml`).
14-
- **Language Configuration**: Adds language configuration for JustLang files (`language-configuration.json`), including comments, brackets, and auto-closing pairs.
20+
21+
### Language Server Features
22+
- **Rich Completions**: 133 built-in functions, attributes, constants, and settings with detailed documentation
23+
- **Hover Documentation**: Function signatures, descriptions, and version information
24+
- **Go-to-Definition**: Navigate to recipe and variable definitions
25+
- **Find References**: Find all references to recipes and variables
26+
- **Symbol Rename**: Rename symbols across the entire project
27+
- **Document Formatting**: Format Just files with proper indentation and structure
28+
- **Code Actions**: Quick fixes and refactoring suggestions
29+
30+
### VSCode Integration
31+
- **Task Provider Integration**: Automatically detects and registers tasks from JustLang files (`Justfile`, `.justfile`, or `*.just`)
32+
- **Recipe Execution**: Run recipes directly from the editor with live output streaming
33+
- **Smart Command Registration**: Intelligent command handling with LSP server integration
34+
- **Syntax Highlighting**: Comprehensive syntax highlighting using TextMate grammar
35+
- **Language Configuration**: Smart bracket matching, auto-closing pairs, and comment handling
36+
37+
#### Command System
38+
The extension provides two recipe execution commands:
39+
40+
1. **LSP Server Command** (`just-lsp.run_recipe`):
41+
- Provided by the just-lsp language server
42+
- Used internally for LSP protocol communication and code actions
43+
- Triggered automatically by LSP server features (not directly accessible in command palette)
44+
45+
2. **Extension Command** (`justlang-lsp.run_recipe`):
46+
- Accessible via Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) → "Just: Run Recipe"
47+
- Provides interactive recipe browser with descriptions and parameter prompts
48+
- Shows recipe grouping, confirmation dialogs, and real-time execution output
49+
- Available regardless of LSP server status
50+
51+
**How to Access:**
52+
- **Command Palette**: `Ctrl+Shift+P` → "Just: Run Recipe" (uses extension command)
53+
- **LSP Features**: Code actions, hover actions, etc. (uses LSP server command)
54+
- **Task Provider**: VS Code Tasks panel (separate task-based execution)
1555

1656
## Requirements
1757

18-
This extension requires the `just-lsp` language server to be installed on your system. You can install it by following the instructions in the [just-lsp repository](https://github.com/your-repo/just-lsp).
58+
This extension requires the `just-lsp` language server to be installed on your system. You can install it by following the instructions in the [just-lsp repository](https://github.com/elasticdotventures/just-lsp).
1959

2060
Once installed, you can either add the `just-lsp` executable to your system's `PATH` or specify the path to the executable in your VS Code settings using the `justlang-lsp.server.path` setting.
2161

@@ -27,7 +67,7 @@ Once installed, you can either add the `just-lsp` executable to your system's `P
2767

2868
## Development
2969
### Prerequisites
30-
- Node.js
70+
- Node.js (20+)
3171
- TypeScript
3272
- PNPM
3373
- Rust and Cargo
@@ -37,10 +77,39 @@ Once installed, you can either add the `just-lsp` executable to your system's `P
3777
2. Run `pnpm install` to install dependencies.
3878
3. Use `pnpm run compile` to build the extension.
3979

80+
### Development Workflow
81+
- **Build**: `pnpm run package` - Build for production
82+
- **Watch**: `pnpm run watch` - Development with hot reload
83+
- **Lint**: `pnpm run lint` - Code linting
84+
- **Type Check**: `pnpm run check-types` - TypeScript validation
85+
4086
### Testing
41-
Run `npm test` to execute the test suite.
42-
open a justfile
43-
Developer: Inspect Editor Tokens and Scopes
87+
- Run `pnpm run test-local` for local testing
88+
- Full test suite requires VSCode Test Runner
89+
- Open a justfile and use "Developer: Inspect Editor Tokens and Scopes"
90+
91+
## Release Process
92+
93+
This project uses automated semantic versioning and releases through conventional commits.
94+
95+
**📋 For detailed release instructions, see [RELEASE.md](./RELEASE.md)**
96+
97+
### Quick Start
98+
1. **Making Commits**: `pnpm run commit` - Interactive conventional commit creation
99+
2. **Development**: Work on feature branches with conventional commits
100+
3. **Release**: Merge to `main` branch triggers automated release
101+
102+
### Commit Types
103+
- `feat`: New features → minor version bump
104+
- `fix`: Bug fixes → patch version bump
105+
- `BREAKING CHANGE`: → major version bump
106+
107+
### Automated Release Workflow
108+
Merging to `main` automatically:
109+
- Analyzes commits and determines version bump
110+
- Generates CHANGELOG.md
111+
- Creates GitHub release
112+
- Publishes to VSCode Marketplace & Open VSX Registry
44113

45114

46115
## References
@@ -52,8 +121,14 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
52121

53122

54123
### Attribution
55-
Syntax highlighting and language configuration features were adapted from the [wolfmah-vscode.just-syntax](https://github.com/wolfmah-vscode/just-syntax) repository under the Mozilla Public License 2.0 (MPL 2.0). See the [LICENSE](LICENSE) file for details.
56124

57-
## Thanks
58-
* skellock
59-
*
125+
**Language Server Integration**: This extension integrates with the `just-lsp` language server, which provides advanced language features including completions, hover documentation, go-to-definition, references, rename, and formatting capabilities. The language server supports 133 built-in functions, attributes, constants, and settings for comprehensive Just language support.
126+
127+
**Advanced Recipe Management & Terminal Integration**: Recipe parsing, parameter handling, terminal management, and formatting features were adapted and enhanced from the [nefrob/vscode-just](https://github.com/nefrob/vscode-just) repository under the MIT License. This includes JSON recipe parsing, interactive parameter prompts, flexible terminal execution options, and professional logging systems.
128+
129+
**Syntax Highlighting**: Syntax highlighting and language configuration features were adapted from the [wolfmah-vscode.just-syntax](https://github.com/wolfmah-vscode/just-syntax) repository under the Mozilla Public License 2.0 (MPL 2.0). See the [LICENSE](LICENSE) file for details.
130+
131+
## Additional Thanks
132+
* https://github.com/terror/just-lsp (lsp)
133+
* Robert Neff - nefrob.vscode-just-syntax
134+
* skellock - skellock.just

0 commit comments

Comments
 (0)