ruby-lsp-typeprof 0.2.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d6205b59c4d03e2deab702b463991aa376f26105be75ae7c0ffc5d154d9fe2a
4
- data.tar.gz: 0ed3ffed58873686298a87ea548c1a82199da616da97d08955bc328c49f7a127
3
+ metadata.gz: e970087c448a7fdf79627b8023da3d4172f5882709cfaa22ceebc61d627cae39
4
+ data.tar.gz: a2ab61b7d4a2b16db5b3e8d4788b016f92c258a083f1d39b3d697f672678ca86
5
5
  SHA512:
6
- metadata.gz: 63edefab59f8261ef245c61e145d013dd0728acdc1cd79e6bdac2fe6e695ff10bbe3edd0374d2ee854d5488d78b891d0d97ab689ba855330793b8ecee43bd780
7
- data.tar.gz: ffa2d4612940a332550574c8c4bea47efcd64ca6d0b3440abf069df86ebeb9da75e8d171908b0255a21adcc84bf12e1b5dfcb2e1fd45548bba9f54e2e9bb17e3
6
+ metadata.gz: 9b2fc7138694f993b4e80f98fc3496a914cbe4d03ae67bddc5a16ff6792709561a8f51a42d45b0041b3dca45975ef1cb677eb908503c8584334ae603148e2b38
7
+ data.tar.gz: 97a2e1aaf9d0e9c6fec4211764dbd26ea5a0e862b3ee3b099e6d863ae48da35e6edbfde577edda4dca8e1b0510221683317f7116ec198f3d22587876e58eb19a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## [v0.3.0](https://github.com/sinsoku/ruby-lsp-typeprof/compare/v0.2.0...v0.3.0) - 2026-05-08
2
+ - feat: Add enabled setting to toggle the entire add-on by @sinsoku in https://github.com/sinsoku/ruby-lsp-typeprof/pull/5
3
+
1
4
  ## [v0.2.0](https://github.com/sinsoku/ruby-lsp-typeprof/compare/v0.1.1...v0.2.0) - 2026-05-03
2
5
  - feat: Add enableCodeLens setting via addonSettings by @sinsoku in https://github.com/sinsoku/ruby-lsp-typeprof/pull/4
3
6
 
data/README.md CHANGED
@@ -26,6 +26,7 @@ Configure them in VS Code's `settings.json`:
26
26
  {
27
27
  "rubyLsp.addonSettings": {
28
28
  "TypeProf": {
29
+ "enabled": false,
29
30
  "enableCodeLens": false
30
31
  }
31
32
  }
@@ -42,7 +43,8 @@ You can place this configuration in either:
42
43
 
43
44
  | Key | Type | Default | Description |
44
45
  | --- | --- | --- | --- |
45
- | `enableCodeLens` | boolean | `true` | Show inferred type signatures as code lens above method definitions. |
46
+ | `enabled` | boolean | `true` | Master switch. When `false`, the add-on skips loading TypeProf entirely and disables every feature. |
47
+ | `enableCodeLens` | boolean | `true` | Show inferred type signatures as code lens above method definitions. Has no effect when `enabled` is `false`. |
46
48
 
47
49
  After changing the setting, restart Ruby LSP via the "Ruby LSP: Restart"
48
50
  command for it to take effect.
@@ -13,13 +13,17 @@ module RubyLsp
13
13
  super
14
14
  @service = nil
15
15
  @mutex = Mutex.new
16
+ @enabled = true
16
17
  @code_lens_enabled = true
17
18
  end
18
19
 
19
20
  def activate(global_state, _outgoing_queue)
21
+ settings = global_state.settings_for_addon(name)
22
+ @enabled = settings&.dig(:enabled) != false
23
+ return unless @enabled
24
+
20
25
  require "typeprof"
21
26
 
22
- settings = global_state.settings_for_addon(name)
23
27
  @code_lens_enabled = settings&.dig(:enableCodeLens) != false
24
28
  @service = build_service(global_state.workspace_path)
25
29
  rescue StandardError => e
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyLsp
4
4
  module Typeprof
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  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.2.0
4
+ version: 0.3.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.2.0
64
- changelog_uri: https://github.com/sinsoku/ruby-lsp-typeprof/blob/v0.2.0/CHANGELOG.md
63
+ source_code_uri: https://github.com/sinsoku/ruby-lsp-typeprof/tree/v0.3.0
64
+ changelog_uri: https://github.com/sinsoku/ruby-lsp-typeprof/blob/v0.3.0/CHANGELOG.md
65
65
  rubygems_mfa_required: 'true'
66
66
  rdoc_options: []
67
67
  require_paths: