ruby-lsp-typeprof 0.1.1 → 0.2.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +30 -0
- data/lib/ruby_lsp/ruby_lsp_typeprof/addon.rb +4 -0
- data/lib/ruby_lsp_typeprof/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d6205b59c4d03e2deab702b463991aa376f26105be75ae7c0ffc5d154d9fe2a
|
|
4
|
+
data.tar.gz: 0ed3ffed58873686298a87ea548c1a82199da616da97d08955bc328c49f7a127
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 63edefab59f8261ef245c61e145d013dd0728acdc1cd79e6bdac2fe6e695ff10bbe3edd0374d2ee854d5488d78b891d0d97ab689ba855330793b8ecee43bd780
|
|
7
|
+
data.tar.gz: ffa2d4612940a332550574c8c4bea47efcd64ca6d0b3440abf069df86ebeb9da75e8d171908b0255a21adcc84bf12e1b5dfcb2e1fd45548bba9f54e2e9bb17e3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
## [v0.2.0](https://github.com/sinsoku/ruby-lsp-typeprof/compare/v0.1.1...v0.2.0) - 2026-05-03
|
|
2
|
+
- feat: Add enableCodeLens setting via addonSettings by @sinsoku in https://github.com/sinsoku/ruby-lsp-typeprof/pull/4
|
|
3
|
+
|
|
1
4
|
## [v0.1.1](https://github.com/sinsoku/ruby-lsp-typeprof/compare/v0.1.0...v0.1.1) - 2026-04-27
|
|
2
5
|
|
|
3
6
|
## [0.1.0] - 2026-04-27
|
data/README.md
CHANGED
|
@@ -17,6 +17,36 @@ end
|
|
|
17
17
|
|
|
18
18
|
After running `bundle install`, restart Ruby LSP.
|
|
19
19
|
|
|
20
|
+
## Configuration
|
|
21
|
+
|
|
22
|
+
The add-on reads its settings from Ruby LSP's `addonSettings` mechanism.
|
|
23
|
+
Configure them in VS Code's `settings.json`:
|
|
24
|
+
|
|
25
|
+
```jsonc
|
|
26
|
+
{
|
|
27
|
+
"rubyLsp.addonSettings": {
|
|
28
|
+
"TypeProf": {
|
|
29
|
+
"enableCodeLens": false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You can place this configuration in either:
|
|
36
|
+
|
|
37
|
+
- **Workspace settings** (`.vscode/settings.json` at the repository root) —
|
|
38
|
+
applies only to this project.
|
|
39
|
+
- **User settings** — applies to every workspace. See
|
|
40
|
+
[User and Workspace Settings](https://code.visualstudio.com/docs/configure/settings)
|
|
41
|
+
for the file location on each OS.
|
|
42
|
+
|
|
43
|
+
| Key | Type | Default | Description |
|
|
44
|
+
| --- | --- | --- | --- |
|
|
45
|
+
| `enableCodeLens` | boolean | `true` | Show inferred type signatures as code lens above method definitions. |
|
|
46
|
+
|
|
47
|
+
After changing the setting, restart Ruby LSP via the "Ruby LSP: Restart"
|
|
48
|
+
command for it to take effect.
|
|
49
|
+
|
|
20
50
|
## Development
|
|
21
51
|
|
|
22
52
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
@@ -13,11 +13,14 @@ module RubyLsp
|
|
|
13
13
|
super
|
|
14
14
|
@service = nil
|
|
15
15
|
@mutex = Mutex.new
|
|
16
|
+
@code_lens_enabled = true
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
def activate(global_state, _outgoing_queue)
|
|
19
20
|
require "typeprof"
|
|
20
21
|
|
|
22
|
+
settings = global_state.settings_for_addon(name)
|
|
23
|
+
@code_lens_enabled = settings&.dig(:enableCodeLens) != false
|
|
21
24
|
@service = build_service(global_state.workspace_path)
|
|
22
25
|
rescue StandardError => e
|
|
23
26
|
warn "ruby-lsp-typeprof: Failed to activate: #{e.message}"
|
|
@@ -37,6 +40,7 @@ module RubyLsp
|
|
|
37
40
|
|
|
38
41
|
def create_code_lens_listener(response_builder, uri, dispatcher)
|
|
39
42
|
return unless @service
|
|
43
|
+
return unless @code_lens_enabled
|
|
40
44
|
|
|
41
45
|
CodeLensListener.new(response_builder, uri, dispatcher, @service, @mutex)
|
|
42
46
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-lsp-typeprof
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takumi Shotoku
|
|
@@ -60,8 +60,8 @@ licenses:
|
|
|
60
60
|
- MIT
|
|
61
61
|
metadata:
|
|
62
62
|
homepage_uri: https://github.com/sinsoku/ruby-lsp-typeprof
|
|
63
|
-
source_code_uri: https://github.com/sinsoku/ruby-lsp-typeprof/tree/v0.
|
|
64
|
-
changelog_uri: https://github.com/sinsoku/ruby-lsp-typeprof/blob/v0.
|
|
63
|
+
source_code_uri: https://github.com/sinsoku/ruby-lsp-typeprof/tree/v0.2.0
|
|
64
|
+
changelog_uri: https://github.com/sinsoku/ruby-lsp-typeprof/blob/v0.2.0/CHANGELOG.md
|
|
65
65
|
rubygems_mfa_required: 'true'
|
|
66
66
|
rdoc_options: []
|
|
67
67
|
require_paths:
|