You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
5
6
6
7
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
+
7
18
8
19
## 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)
- 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)
15
55
16
56
## Requirements
17
57
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).
19
59
20
60
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.
21
61
@@ -27,7 +67,7 @@ Once installed, you can either add the `just-lsp` executable to your system's `P
27
67
28
68
## Development
29
69
### Prerequisites
30
-
- Node.js
70
+
- Node.js (20+)
31
71
- TypeScript
32
72
- PNPM
33
73
- Rust and Cargo
@@ -37,10 +77,39 @@ Once installed, you can either add the `just-lsp` executable to your system's `P
37
77
2. Run `pnpm install` to install dependencies.
38
78
3. Use `pnpm run compile` to build the extension.
39
79
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
+
40
86
### 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
44
113
45
114
46
115
## References
@@ -52,8 +121,14 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
52
121
53
122
54
123
### 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.
56
124
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.
0 commit comments