pytest-language-server 0.5.2__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/.github/workflows/release.yml +11 -41
  2. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/AGENTS.md +24 -19
  3. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/Cargo.lock +1 -1
  4. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/Cargo.toml +1 -1
  5. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/EXTENSION_PUBLISHING.md +48 -8
  6. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/PKG-INFO +11 -2
  7. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/README.md +10 -1
  8. pytest_language_server-0.7.0/demo.gif +0 -0
  9. pytest_language_server-0.7.0/demo.mp4 +0 -0
  10. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/demo.tape +41 -15
  11. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/intellij-plugin/build.sh +19 -5
  12. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/intellij-plugin/src/main/resources/META-INF/plugin.xml +1 -1
  13. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/.vscodeignore +3 -0
  14. pytest_language_server-0.7.0/extensions/vscode-extension/LICENSE +21 -0
  15. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/package.json +1 -1
  16. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/pyproject.toml +1 -1
  17. pytest_language_server-0.7.0/src/fixtures.rs +2254 -0
  18. pytest_language_server-0.7.0/src/main.rs +792 -0
  19. pytest_language_server-0.7.0/tests/test_fixtures.rs +2950 -0
  20. pytest_language_server-0.7.0/tests/test_lsp.rs +1181 -0
  21. pytest_language_server-0.7.0/tests/test_project/conftest.py +44 -0
  22. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/tests/test_project/subdir/conftest.py +4 -4
  23. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/tests/test_project/test_example.py +1 -1
  24. pytest_language_server-0.5.2/demo.gif +0 -0
  25. pytest_language_server-0.5.2/src/fixtures.rs +0 -4499
  26. pytest_language_server-0.5.2/src/main.rs +0 -1872
  27. pytest_language_server-0.5.2/tests/test_parser_api.rs +0 -24
  28. pytest_language_server-0.5.2/tests/test_project/conftest.py +0 -31
  29. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/.github/dependabot.yml +0 -0
  30. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/.github/workflows/ci.yml +0 -0
  31. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/.github/workflows/security.yml +0 -0
  32. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/.gitignore +0 -0
  33. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/.pre-commit-config.yaml +0 -0
  34. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/CODE_ACTION_TESTING.md +0 -0
  35. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/EXTENSION_SETUP.md +0 -0
  36. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/Formula/pytest-language-server.rb +0 -0
  37. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/LICENSE +0 -0
  38. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/PERFORMANCE_ANALYSIS.md +0 -0
  39. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/RELEASE.md +0 -0
  40. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/SECURITY.md +0 -0
  41. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/bump-version.sh +0 -0
  42. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/deny.toml +0 -0
  43. {pytest_language_server-0.5.2/extensions/vscode-extension → pytest_language_server-0.7.0/extensions/intellij-plugin}/LICENSE +0 -0
  44. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/intellij-plugin/README.md +0 -0
  45. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/intellij-plugin/src/main/java/com/github/bellini666/pytestlsp/PytestLanguageServerListener.kt +0 -0
  46. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/intellij-plugin/src/main/java/com/github/bellini666/pytestlsp/PytestLanguageServerService.kt +0 -0
  47. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/intellij-plugin/src/main/resources/META-INF/pluginIcon.png +0 -0
  48. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/intellij-plugin/src/main/resources/META-INF/pluginIcon.svg.png +0 -0
  49. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/README.md +0 -0
  50. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/icon.png +0 -0
  51. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/package-lock.json +0 -0
  52. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/src/extension.ts +0 -0
  53. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/tsconfig.json +0 -0
  54. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/extensions/vscode-extension/webpack.config.js +0 -0
  55. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/src/lib.rs +0 -0
  56. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/tests/manual_test.py +0 -0
  57. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/tests/test_project/subdir/test_hierarchy.py +0 -0
  58. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/tests/test_project/subdir/test_override.py +0 -0
  59. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/tests/test_project/test_parent_usage.py +0 -0
  60. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/tests/test_project/test_undeclared_example.py +0 -0
  61. {pytest_language_server-0.5.2 → pytest_language_server-0.7.0}/uv.lock +0 -0
@@ -244,6 +244,8 @@ jobs:
244
244
  sudo apt-get update
245
245
  sudo apt-get install -y gcc-aarch64-linux-gnu
246
246
  - name: Build binary
247
+ env:
248
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
247
249
  run: |
248
250
  cargo build --release --target ${{ matrix.target }}
249
251
  - name: Rename binary (Unix)
@@ -284,16 +286,16 @@ jobs:
284
286
  ls -lh
285
287
  - name: Install dependencies
286
288
  run: |
287
- cd vscode-extension
289
+ cd extensions/vscode-extension
288
290
  npm install
289
291
  npm install -g @vscode/vsce
290
292
  - name: Package extension
291
293
  run: |
292
- cd vscode-extension
294
+ cd extensions/vscode-extension
293
295
  vsce package
294
296
  - name: Publish to VSCode Marketplace
295
297
  run: |
296
- cd vscode-extension
298
+ cd extensions/vscode-extension
297
299
  vsce publish -p ${{ secrets.VSCE_TOKEN }}
298
300
 
299
301
  publish-intellij:
@@ -341,43 +343,11 @@ jobs:
341
343
  name: Publish Zed extension
342
344
  runs-on: ubuntu-latest
343
345
  if: startsWith(github.ref, 'refs/tags/')
344
- needs: [build-binaries]
345
346
  steps:
346
- - uses: actions/checkout@v4
347
- - name: Install Rust
348
- uses: dtolnay/rust-toolchain@stable
349
- with:
350
- targets: wasm32-wasip1
351
- - name: Download all binaries
352
- uses: actions/download-artifact@v6
353
- with:
354
- pattern: binary-*
355
- path: extensions/zed-extension/bin
356
- - name: Flatten binaries
357
- run: |
358
- cd extensions/zed-extension/bin
359
- find . -type f -name "pytest-language-server*" -exec mv {} . \;
360
- find . -type d -empty -delete
361
- chmod +x pytest-language-server-* || true
362
- ls -lh
363
- - name: Build Zed extension
364
- run: |
365
- cd zed-extension
366
- cargo build --release --target wasm32-wasip1
367
- - name: Package extension
368
- run: |
369
- cd zed-extension
370
- mkdir -p dist
371
- cp target/wasm32-wasip1/release/pytest_language_server.wasm dist/extension.wasm
372
- cp -r bin dist/
373
- cp extension.toml dist/
374
- - name: Publish to Zed Extensions
375
- run: |
376
- cd zed-extension
377
- # Note: Zed extension publishing requires manual submission or API key
378
- # For now, just upload the packaged extension to GitHub releases
379
- tar -czf ../pytest-language-server-zed-extension.tar.gz -C dist .
380
- - name: Upload Zed extension to release
381
- uses: softprops/action-gh-release@v2
347
+ - uses: huacnlee/zed-extension-action@v1
382
348
  with:
383
- files: pytest-language-server-zed-extension.tar.gz
349
+ extension-name: pytest-language-server
350
+ extension-path: extensions/zed-extension
351
+ push-to: bellini666/extensions
352
+ env:
353
+ COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
@@ -7,7 +7,7 @@ This document helps AI agents understand the pytest-language-server codebase str
7
7
  **pytest-language-server** is a Language Server Protocol (LSP) implementation for pytest fixtures, written in Rust. It provides IDE features like go-to-definition, find-references, and hover documentation for pytest fixtures.
8
8
 
9
9
  - **Language**: Rust (Edition 2021, MSRV 1.83)
10
- - **Lines of Code**: ~4,000 lines (2,501 in fixtures.rs, 1,574 in main.rs)
10
+ - **Lines of Code**: ~3,050 lines (2,256 in fixtures.rs, 794 in main.rs)
11
11
  - **Architecture**: Async LSP server using tower-lsp
12
12
  - **Key Features**: Fixture go-to-definition, find-references, hover docs, fixture overriding, undeclared fixture diagnostics
13
13
 
@@ -18,8 +18,8 @@ This document helps AI agents understand the pytest-language-server codebase str
18
18
  ```
19
19
  src/
20
20
  ├── lib.rs # Library exports (3 lines)
21
- ├── main.rs # LSP server implementation (~1,574 lines)
22
- └── fixtures.rs # Fixture analysis engine (~2,501 lines)
21
+ ├── main.rs # LSP server implementation (794 lines)
22
+ └── fixtures.rs # Fixture analysis engine (2,256 lines)
23
23
  ```
24
24
 
25
25
  ### Key Components
@@ -145,32 +145,37 @@ This is handled by `start_char` and `end_char` in `FixtureUsage`.
145
145
  ### Test Structure
146
146
 
147
147
  ```
148
+ src/
149
+ ├── fixtures.rs # Main code (2,256 lines)
150
+ └── main.rs # LSP server (794 lines)
151
+
148
152
  tests/
149
- ├── test_project/ # Fixture test files for integration tests
150
- ├── conftest.py
151
- │ ├── test_example.py
152
- ├── test_parent_usage.py
153
- │ └── subdir/
154
- ├── conftest.py
155
- │ ├── test_hierarchy.py
156
- │ └── test_override.py
157
- └── test_parser_api.rs # Integration tests
153
+ ├── test_fixtures.rs # FixtureDatabase integration tests (60 tests, 2,951 lines)
154
+ ├── test_lsp.rs # LSP protocol tests (13 tests, 1,187 lines)
155
+ └── test_project/ # Fixture test files for integration tests
156
+ ├── conftest.py
157
+ ├── test_example.py
158
+ ├── test_parent_usage.py
159
+ └── subdir/
160
+ ├── conftest.py
161
+ ├── test_hierarchy.py
162
+ └── test_override.py
158
163
  ```
159
164
 
160
165
  ### Running Tests
161
166
 
162
167
  ```bash
163
- cargo test # Run all tests
164
- cargo test --lib # Run library tests (fixtures.rs: 47 tests)
165
- cargo test --bin # Run binary tests (main.rs: 13 tests)
166
- RUST_LOG=debug cargo test # Run with debug logging
168
+ cargo test # Run all tests (73 total)
169
+ cargo test --test test_fixtures # Run FixtureDatabase tests (60 tests)
170
+ cargo test --test test_lsp # Run LSP protocol tests (13 tests)
171
+ RUST_LOG=debug cargo test # Run with debug logging
167
172
  ```
168
173
 
169
174
  ### Test Coverage
170
175
 
171
- - **60 total tests passing** (as of v0.5.1)
172
- - 47 tests in `src/fixtures.rs`
173
- - 13 tests in `src/main.rs`
176
+ - **73 total tests passing** (as of v0.6.0)
177
+ - 60 integration tests in `tests/test_fixtures.rs` (FixtureDatabase API)
178
+ - 13 integration tests in `tests/test_lsp.rs` (LSP protocol handlers)
174
179
 
175
180
  Key test areas:
176
181
  - Fixture definition extraction from various patterns
@@ -753,7 +753,7 @@ dependencies = [
753
753
 
754
754
  [[package]]
755
755
  name = "pytest-language-server"
756
- version = "0.5.2"
756
+ version = "0.7.0"
757
757
  dependencies = [
758
758
  "dashmap 6.1.0",
759
759
  "rustpython-parser",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pytest-language-server"
3
- version = "0.5.2"
3
+ version = "0.7.0"
4
4
  edition = "2021"
5
5
  rust-version = "1.83"
6
6
  authors = ["Thiago Bellini Ribeiro <hackedbellini@gmail.com>"]
@@ -89,17 +89,44 @@ cd extensions/intellij-plugin
89
89
 
90
90
  ### 3. Zed Extension Setup
91
91
 
92
- **Note**: Zed currently uses a manual extension publishing process or requires submitting to their repository.
92
+ **Automated Publishing (via GitHub Action):**
93
93
 
94
- **For Manual Distribution:**
95
- The CI automatically packages the Zed extension as `pytest-language-server-zed-extension.tar.gz` and uploads it to GitHub releases.
94
+ Zed extensions are published by creating PRs to the official Zed extensions repository. This is automated using the `huacnlee/zed-extension-action` GitHub Action.
96
95
 
97
- **For Official Zed Extension Directory:**
98
- 1. Fork https://github.com/zed-industries/extensions
99
- 2. Add extension to `extensions/` directory
100
- 3. Submit PR to Zed extensions repo
96
+ **Setup Steps:**
101
97
 
102
- The extension will still be bundled with binaries in your GitHub releases for users to install manually.
98
+ 1. **Fork the Zed Extensions Repo:**
99
+ ```bash
100
+ # Go to https://github.com/zed-industries/extensions
101
+ # Click "Fork" (fork to your personal account, not an organization)
102
+ ```
103
+
104
+ 2. **Add Your Extension to Your Fork:**
105
+ ```bash
106
+ git clone https://github.com/YOUR_USERNAME/extensions
107
+ cd extensions
108
+ git submodule add https://github.com/bellini666/pytest-language-server.git extensions/pytest-language-server
109
+ ```
110
+
111
+ 3. **Add Entry to extensions.toml:**
112
+ ```toml
113
+ [pytest-language-server]
114
+ submodule = "extensions/pytest-language-server"
115
+ path = "extensions/zed-extension"
116
+ version = "0.5.2"
117
+ ```
118
+
119
+ 4. **Create Initial PR:**
120
+ Submit the initial PR to zed-industries/extensions manually.
121
+
122
+ 5. **Automated Updates:**
123
+ After the initial setup, the GitHub Action automatically creates PRs to update your extension when you create a new release tag.
124
+
125
+ **How It Works:**
126
+ - When you push a new version tag (e.g., `v0.6.0`), the `publish-zed` job runs
127
+ - It uses your `COMMITTER_TOKEN` to create a PR on your fork of zed-industries/extensions
128
+ - The PR updates the submodule commit and version in `extensions.toml`
129
+ - You review and merge the PR to your fork, then submit to zed-industries/extensions
103
130
 
104
131
  ### 4. GitHub Secrets Configuration
105
132
 
@@ -109,8 +136,17 @@ Add these secrets to your GitHub repository (Settings → Secrets and variables
109
136
  VSCE_TOKEN=<your-vscode-marketplace-token>
110
137
  JETBRAINS_TOKEN=<your-jetbrains-marketplace-token>
111
138
  CARGO_REGISTRY_TOKEN=<your-crates-io-token>
139
+ COMMITTER_TOKEN=<your-github-pat-with-repo-and-workflow-scopes>
112
140
  ```
113
141
 
142
+ **COMMITTER_TOKEN Setup (Required for Zed Extension):**
143
+ 1. Go to https://github.com/settings/tokens/new
144
+ 2. Create a **Classic** Personal Access Token with these scopes:
145
+ - `repo` (Full control of private repositories)
146
+ - `workflow` (Update GitHub Action workflows)
147
+ 3. Copy the token and add it as `COMMITTER_TOKEN` secret
148
+ 4. This token allows the Zed extension action to create PRs to your fork of zed-industries/extensions
149
+
114
150
  **Optional IntelliJ Plugin Signing (for paid plugins):**
115
151
  ```
116
152
  CERTIFICATE_CHAIN=<your-certificate-chain>
@@ -277,6 +313,10 @@ If versions get out of sync:
277
313
  - [ ] Create JetBrains plugin listing
278
314
  - [ ] Generate JetBrains token
279
315
  - [ ] Add JETBRAINS_TOKEN to GitHub secrets
316
+ - [ ] Fork zed-industries/extensions repository
317
+ - [ ] Generate GitHub PAT with repo & workflow scopes
318
+ - [ ] Add COMMITTER_TOKEN to GitHub secrets
319
+ - [ ] Add CARGO_REGISTRY_TOKEN to GitHub secrets
280
320
  - [ ] Test VSCode extension locally
281
321
  - [ ] Test IntelliJ plugin locally
282
322
  - [ ] Test Zed extension locally
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-language-server
3
- Version: 0.5.2
3
+ Version: 0.7.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -47,7 +47,7 @@ A blazingly fast Language Server Protocol (LSP) implementation for pytest, built
47
47
 
48
48
  ![pytest-language-server demo](demo.gif)
49
49
 
50
- *Showcasing go-to-definition, find-references, hover documentation, and code actions. Demo also vibed into existence.* ✨
50
+ *Showcasing go-to-definition, code completion, hover documentation, and code actions. Demo also vibed into existence.* ✨
51
51
 
52
52
  ## Features
53
53
 
@@ -58,6 +58,15 @@ Jump directly to fixture definitions from anywhere they're used:
58
58
  - Third-party fixtures from pytest plugins (pytest-mock, pytest-asyncio, etc.)
59
59
  - Respects pytest's fixture shadowing/priority rules
60
60
 
61
+ ### ✨ Code Completion
62
+ Smart auto-completion for pytest fixtures:
63
+ - **Context-aware**: Only triggers inside test functions and fixture functions
64
+ - **Hierarchy-respecting**: Suggests fixtures based on pytest's priority rules (same file > conftest.py > third-party)
65
+ - **Rich information**: Shows fixture source file and docstring
66
+ - **No duplicates**: Automatically filters out shadowed fixtures
67
+ - **Works everywhere**: Completions available in both function parameters and function bodies
68
+ - Supports both sync and async functions
69
+
61
70
  ### 🔍 Find References
62
71
  Find all usages of a fixture across your entire test suite:
63
72
  - Works from fixture definitions or usage sites
@@ -21,7 +21,7 @@ A blazingly fast Language Server Protocol (LSP) implementation for pytest, built
21
21
 
22
22
  ![pytest-language-server demo](demo.gif)
23
23
 
24
- *Showcasing go-to-definition, find-references, hover documentation, and code actions. Demo also vibed into existence.* ✨
24
+ *Showcasing go-to-definition, code completion, hover documentation, and code actions. Demo also vibed into existence.* ✨
25
25
 
26
26
  ## Features
27
27
 
@@ -32,6 +32,15 @@ Jump directly to fixture definitions from anywhere they're used:
32
32
  - Third-party fixtures from pytest plugins (pytest-mock, pytest-asyncio, etc.)
33
33
  - Respects pytest's fixture shadowing/priority rules
34
34
 
35
+ ### ✨ Code Completion
36
+ Smart auto-completion for pytest fixtures:
37
+ - **Context-aware**: Only triggers inside test functions and fixture functions
38
+ - **Hierarchy-respecting**: Suggests fixtures based on pytest's priority rules (same file > conftest.py > third-party)
39
+ - **Rich information**: Shows fixture source file and docstring
40
+ - **No duplicates**: Automatically filters out shadowed fixtures
41
+ - **Works everywhere**: Completions available in both function parameters and function bodies
42
+ - Supports both sync and async functions
43
+
35
44
  ### 🔍 Find References
36
45
  Find all usages of a fixture across your entire test suite:
37
46
  - Works from fixture definitions or usage sites
Binary file
Binary file
@@ -13,10 +13,10 @@ Output demo.mp4
13
13
 
14
14
  Set Shell "bash"
15
15
  Set FontSize 12
16
- Set Width 1200
17
- Set Height 700
16
+ Set Width 800
17
+ Set Height 400
18
18
  Set Padding 10
19
- Set Framerate 20
19
+ Set Framerate 30
20
20
  Set Theme "Dracula"
21
21
 
22
22
  Hide
@@ -24,9 +24,9 @@ Type "cd /Users/bellini/dev/pytest-language-server/tests/test_project" Enter
24
24
  Show
25
25
 
26
26
  # Title
27
- Type 'echo "pytest-language-server Demo"' Enter
27
+ Type 'echo "🐍 pytest-language-server Demo"' Enter
28
28
  Sleep 1.5s
29
- Type 'echo "1. Hover Documentation"' Enter
29
+ Type 'echo "📖 1. Hover Documentation & Go to Definition"' Enter
30
30
  Sleep 1.5s
31
31
 
32
32
  Type "nvim test_example.py" Enter
@@ -36,34 +36,59 @@ Hide
36
36
  Type ":set nu" Enter
37
37
  Show
38
38
 
39
+ # Hover on sample_fixture (position cursor on the fixture name)
39
40
  Type "ggf(w"
40
41
  Sleep 1s
41
42
  Type "K"
42
- Sleep 3.5s
43
- Escape
43
+ Sleep 3s
44
+
45
+ # Go to definition (this will close hover and jump)
46
+ Type "gd"
47
+ Sleep 2.5s
48
+ Ctrl+O
49
+ Sleep 500ms
44
50
 
45
51
  Type "ZQ"
46
52
  Sleep 300ms
47
53
 
48
- Type 'echo "2. Go to Definition"' Enter
54
+ Type 'echo "2. Code Completion"' Enter
49
55
  Sleep 1.5s
50
56
 
51
57
  Type "nvim test_example.py" Enter
52
- Sleep 2s
58
+ Sleep 2.5s
53
59
 
54
60
  Hide
55
61
  Type ":set nu" Enter
56
62
  Show
57
63
 
58
- Type "ggf(w"
59
- Type "gd"
60
- Sleep 2.5s
64
+ # Navigate to first test function and go to end of parameters
65
+ Type "gg"
66
+ Sleep 300ms
67
+ Type "f)"
68
+ Sleep 300ms
69
+ Type "i, "
70
+ Sleep 500ms
71
+
72
+ # Trigger completion
73
+ Ctrl+X
61
74
  Ctrl+O
75
+ Sleep 2.5s
62
76
 
63
- Type "ZQ"
77
+ # Navigate down in completion menu
78
+ Down
79
+ Sleep 500ms
80
+ Down
81
+ Sleep 500ms
82
+ Enter
83
+ Sleep 1.5s
84
+
85
+ # Exit without saving
86
+ Escape
87
+ Sleep 300ms
88
+ Type ":q!" Enter
64
89
  Sleep 300ms
65
90
 
66
- Type 'echo "3. Code Actions"' Enter
91
+ Type 'echo "🔧 3. Code Actions (Quick Fixes)"' Enter
67
92
  Sleep 1.5s
68
93
 
69
94
  Type "nvim test_undeclared_example.py" Enter
@@ -86,6 +111,7 @@ Type ":9" Enter
86
111
  Sleep 2s
87
112
 
88
113
  Type "ZQ"
114
+ Sleep 300ms
89
115
 
90
- Type 'echo "github.com/bellini666/pytest-language-server"' Enter
116
+ Type 'echo "github.com/bellini666/pytest-language-server"' Enter
91
117
  Sleep 2s
@@ -2,7 +2,10 @@
2
2
  # Simple build script for IntelliJ plugin without Gradle
3
3
  set -e
4
4
 
5
- echo "Building pytest-language-server IntelliJ plugin..."
5
+ # Extract version from plugin.xml
6
+ VERSION=$(grep -o '<version>[^<]*</version>' src/main/resources/META-INF/plugin.xml | sed 's/<version>\(.*\)<\/version>/\1/')
7
+
8
+ echo "Building pytest-language-server IntelliJ plugin v${VERSION}..."
6
9
 
7
10
  # Clean previous builds
8
11
  rm -rf build
@@ -15,6 +18,13 @@ echo "Copying resources..."
15
18
  cp src/main/resources/META-INF/plugin.xml build/META-INF/
16
19
  cp src/main/resources/META-INF/pluginIcon.png build/META-INF/
17
20
 
21
+ # Copy bundled binaries if they exist
22
+ if [ -d "src/main/resources/bin" ] && [ -n "$(ls -A src/main/resources/bin 2>/dev/null)" ]; then
23
+ echo "Copying bundled binaries..."
24
+ mkdir -p build/bin
25
+ cp -r src/main/resources/bin/* build/bin/
26
+ fi
27
+
18
28
  # Compile Kotlin files (simple compilation without dependencies for now)
19
29
  # Note: For a real LSP plugin, you'd need proper IntelliJ SDK compilation
20
30
  # For CI, we'll just package the source files which JetBrains can compile
@@ -24,7 +34,11 @@ cp -r src/main/java/com/github/bellini666/pytestlsp/*.kt build/classes/com/githu
24
34
  # Create JAR
25
35
  echo "Creating plugin JAR..."
26
36
  cd build
27
- jar cf ../pytest-language-server.jar META-INF/ classes/
37
+ if [ -d "bin" ]; then
38
+ jar cf ../pytest-language-server.jar META-INF/ classes/ bin/
39
+ else
40
+ jar cf ../pytest-language-server.jar META-INF/ classes/
41
+ fi
28
42
 
29
43
  # Create distribution ZIP
30
44
  cd ..
@@ -33,7 +47,7 @@ cp pytest-language-server.jar dist/
33
47
  cd dist
34
48
  mkdir -p pytest-language-server/lib
35
49
  mv pytest-language-server.jar pytest-language-server/lib/
36
- zip -r pytest-language-server-0.5.1.zip pytest-language-server/
50
+ zip -r pytest-language-server-${VERSION}.zip pytest-language-server/
37
51
 
38
- echo "✓ Plugin built successfully: dist/pytest-language-server-0.5.1.zip"
39
- ls -lh pytest-language-server-0.5.1.zip
52
+ echo "✓ Plugin built successfully: dist/pytest-language-server-${VERSION}.zip"
53
+ ls -lh pytest-language-server-${VERSION}.zip
@@ -1,7 +1,7 @@
1
1
  <idea-plugin>
2
2
  <id>com.github.bellini666.pytest-language-server</id>
3
3
  <name>pytest Language Server</name>
4
- <version>0.5.2</version>
4
+ <version>0.7.0</version>
5
5
  <vendor email="hackedbellini@gmail.com" url="https://github.com/bellini666/pytest-language-server">Thiago Bellini Ribeiro</vendor>
6
6
 
7
7
  <description><![CDATA[
@@ -12,3 +12,6 @@ node_modules/**
12
12
  out/**
13
13
  .eslintrc.json
14
14
  tsconfig.json
15
+
16
+ # Include bundled binaries
17
+ !bin/**
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Patrick Arminio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -2,7 +2,7 @@
2
2
  "name": "pytest-language-server",
3
3
  "displayName": "pytest Language Server",
4
4
  "description": "A blazingly fast Language Server Protocol implementation for pytest fixtures",
5
- "version": "0.5.2",
5
+ "version": "0.7.0",
6
6
  "publisher": "bellini666",
7
7
  "license": "MIT",
8
8
  "author": "Thiago Bellini Ribeiro <hackedbellini@gmail.com>",
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "pytest-language-server"
7
- version = "0.5.2"
7
+ version = "0.7.0"
8
8
  description = "A blazingly fast Language Server Protocol implementation for pytest"
9
9
  authors = [{name = "Thiago Bellini Ribeiro", email = "hackedbellini@gmail.com"}]
10
10
  readme = "README.md"