From a0b54227866ea406291f6cc412353d702a8beb80 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 11 Jan 2024 16:47:11 -0500 Subject: [PATCH 1/9] Fix CI --- .github/workflows/ci.yml | 8 ++++---- Gemfile-rails-main => gemfiles/Gemfile-rails-main | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename Gemfile-rails-main => gemfiles/Gemfile-rails-main (97%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73d37071..377f0ab1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,12 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] gemfile: - Gemfile - - Gemfile-rails-main + - gemfiles/Gemfile-rails-main ruby: ["3.0", "3.1", "3.2", "3.3", "head"] include: - ruby: "head" experimental: true - - gemfile: "Gemfile-rails-main" + - gemfile: "gemfiles/Gemfile-rails-main" experimental: true exclude: - os: "windows-latest" @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v3 - name: Remove Gemfile.lock - if: (matrix.ruby == 'head' ) || (matrix.os == 'windows-latest' && matrix.ruby == '3.1') + if: (matrix.gemfile == 'Gemfile') && ((matrix.ruby == 'head' ) || (matrix.os == 'windows-latest' && matrix.ruby == '3.1')) run: "rm ${{ matrix.gemfile }}.lock" - name: Set up Ruby @@ -36,7 +36,7 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - cache-version: 6 + cache-version: 7 - name: Check if documentation is up to date run: bundle exec rake ruby_lsp:check_docs diff --git a/Gemfile-rails-main b/gemfiles/Gemfile-rails-main similarity index 97% rename from Gemfile-rails-main rename to gemfiles/Gemfile-rails-main index fad25a75..d893660f 100644 --- a/Gemfile-rails-main +++ b/gemfiles/Gemfile-rails-main @@ -4,7 +4,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } # Specify your gem's dependencies in ruby_lsp_rails.gemspec. -gemspec +gemspec path: ".." gem "puma" gem "sqlite3" From 7e29976935f6f848bd1c8e3deb7a9607da920af2 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 11 Jan 2024 16:52:24 -0500 Subject: [PATCH 2/9] Use latest Ruby LSP --- Gemfile.lock | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 31807056..b55fa642 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -136,8 +136,6 @@ GEM nio4r (2.7.0) nokogiri (1.16.0-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.0-x64-mingw-ucrt) - racc (~> 1.4) nokogiri (1.16.0-x86_64-darwin) racc (~> 1.4) nokogiri (1.16.0-x86_64-linux) @@ -223,7 +221,7 @@ GEM rubocop (~> 1.51) rubocop-sorbet (0.7.6) rubocop (>= 0.90.0) - ruby-lsp (0.13.2) + ruby-lsp (0.13.3) language_server-protocol (~> 3.17.0) prism (>= 0.19.0, < 0.20) sorbet-runtime (>= 0.5.5685) @@ -243,7 +241,6 @@ GEM syntax_tree (>= 6.1.1) thor (>= 0.19.2) sqlite3 (1.7.0-arm64-darwin) - sqlite3 (1.7.0-x64-mingw-ucrt) sqlite3 (1.7.0-x86_64-darwin) sqlite3 (1.7.0-x86_64-linux) stringio (3.1.0) @@ -262,8 +259,6 @@ GEM timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2023.4) - tzinfo (>= 1.0.0) unicode-display_width (2.5.0) webrick (1.8.1) websocket-driver (0.7.6) @@ -277,7 +272,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt x86_64-darwin x86_64-linux From aa4b944d059d6cf24c58f26645b348dab62fe671 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 11 Jan 2024 21:08:06 +0000 Subject: [PATCH 3/9] Update hover test case to reflect the change in the latest ruby-lsp After https://github.com/Shopify/ruby-lsp/pull/1280, the hover request will now contain information about the class's information too. This previously was not the case because this project has Sorbet in the depdenencies. --- test/ruby_lsp_rails/hover_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/ruby_lsp_rails/hover_test.rb b/test/ruby_lsp_rails/hover_test.rb index 13b7e26a..e7321715 100644 --- a/test/ruby_lsp_rails/hover_test.rb +++ b/test/ruby_lsp_rails/hover_test.rb @@ -45,6 +45,14 @@ class User < ApplicationRecord RUBY assert_equal(<<~CONTENT, response.contents.value) + ```ruby + User + ``` + + **Definitions**: [fake.rb](file:///fake.rb#L1,1-2,4) + + + [Schema](file://#{@client.root}/db/schema.rb) **id**: integer From 8165cebeb03a63445559bee1b90682f075d8e0c9 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 11 Jan 2024 21:06:43 +0000 Subject: [PATCH 4/9] Update rbi files --- ...{parser@3.2.2.4.rbi => parser@3.3.0.2.rbi} | 456 ++-- .../gems/{puma@6.4.0.rbi => puma@6.4.2.rbi} | 442 ++-- ...rser@2.8.3.rbi => regexp_parser@2.9.0.rbi} | 282 +- ...0.34.3.rbi => rubocop-minitest@0.34.4.rbi} | 10 +- ...uby-lsp@0.13.2.rbi => ruby-lsp@0.13.3.rbi} | 2334 +++++++++-------- ...apioca@0.11.14.rbi => tapioca@0.11.15.rbi} | 134 +- 6 files changed, 1952 insertions(+), 1706 deletions(-) rename sorbet/rbi/gems/{parser@3.2.2.4.rbi => parser@3.3.0.2.rbi} (92%) rename sorbet/rbi/gems/{puma@6.4.0.rbi => puma@6.4.2.rbi} (93%) rename sorbet/rbi/gems/{regexp_parser@2.8.3.rbi => regexp_parser@2.9.0.rbi} (97%) rename sorbet/rbi/gems/{rubocop-minitest@0.34.3.rbi => rubocop-minitest@0.34.4.rbi} (99%) rename sorbet/rbi/gems/{ruby-lsp@0.13.2.rbi => ruby-lsp@0.13.3.rbi} (77%) rename sorbet/rbi/gems/{tapioca@0.11.14.rbi => tapioca@0.11.15.rbi} (97%) diff --git a/sorbet/rbi/gems/parser@3.2.2.4.rbi b/sorbet/rbi/gems/parser@3.3.0.2.rbi similarity index 92% rename from sorbet/rbi/gems/parser@3.2.2.4.rbi rename to sorbet/rbi/gems/parser@3.3.0.2.rbi index 24afd614..3803bbea 100644 --- a/sorbet/rbi/gems/parser@3.2.2.4.rbi +++ b/sorbet/rbi/gems/parser@3.3.0.2.rbi @@ -869,7 +869,7 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#243 def initialize; end - # source://parser/lib/parser/builders/default.rb#690 + # source://parser/lib/parser/builders/default.rb#703 def __ENCODING__(__ENCODING__t); end # source://parser/lib/parser/builders/default.rb#348 @@ -878,79 +878,79 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#312 def __LINE__(__LINE__t); end - # source://parser/lib/parser/builders/default.rb#616 + # source://parser/lib/parser/builders/default.rb#622 def accessible(node); end - # source://parser/lib/parser/builders/default.rb#865 + # source://parser/lib/parser/builders/default.rb#878 def alias(alias_t, to, from); end - # source://parser/lib/parser/builders/default.rb#904 + # source://parser/lib/parser/builders/default.rb#917 def arg(name_t); end - # source://parser/lib/parser/builders/default.rb#994 + # source://parser/lib/parser/builders/default.rb#1007 def arg_expr(expr); end - # source://parser/lib/parser/builders/default.rb#874 + # source://parser/lib/parser/builders/default.rb#887 def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end # source://parser/lib/parser/builders/default.rb#440 def array(begin_t, elements, end_t); end - # source://parser/lib/parser/builders/default.rb#1577 + # source://parser/lib/parser/builders/default.rb#1590 def array_pattern(lbrack_t, elements, rbrack_t); end - # source://parser/lib/parser/builders/default.rb#754 + # source://parser/lib/parser/builders/default.rb#767 def assign(lhs, eql_t, rhs); end - # source://parser/lib/parser/builders/default.rb#699 + # source://parser/lib/parser/builders/default.rb#712 def assignable(node); end # source://parser/lib/parser/builders/default.rb#540 def associate(begin_t, pairs, end_t); end - # source://parser/lib/parser/builders/default.rb#1158 + # source://parser/lib/parser/builders/default.rb#1171 def attr_asgn(receiver, dot_t, selector_t); end - # source://parser/lib/parser/builders/default.rb#606 + # source://parser/lib/parser/builders/default.rb#612 def back_ref(token); end - # source://parser/lib/parser/builders/default.rb#1422 + # source://parser/lib/parser/builders/default.rb#1435 def begin(begin_t, body, end_t); end - # source://parser/lib/parser/builders/default.rb#1364 + # source://parser/lib/parser/builders/default.rb#1377 def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1440 + # source://parser/lib/parser/builders/default.rb#1453 def begin_keyword(begin_t, body, end_t); end - # source://parser/lib/parser/builders/default.rb#1192 + # source://parser/lib/parser/builders/default.rb#1205 def binary_op(receiver, operator_t, arg); end - # source://parser/lib/parser/builders/default.rb#1109 + # source://parser/lib/parser/builders/default.rb#1122 def block(method_call, begin_t, args, body, end_t); end - # source://parser/lib/parser/builders/default.rb#1144 + # source://parser/lib/parser/builders/default.rb#1157 def block_pass(amper_t, arg); end - # source://parser/lib/parser/builders/default.rb#969 + # source://parser/lib/parser/builders/default.rb#982 def blockarg(amper_t, name_t); end - # source://parser/lib/parser/builders/default.rb#1014 + # source://parser/lib/parser/builders/default.rb#1027 def blockarg_expr(amper_t, expr); end - # source://parser/lib/parser/builders/default.rb#1100 + # source://parser/lib/parser/builders/default.rb#1113 def call_lambda(lambda_t); end - # source://parser/lib/parser/builders/default.rb#1083 + # source://parser/lib/parser/builders/default.rb#1096 def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1055 + # source://parser/lib/parser/builders/default.rb#1068 def call_type_for_dot(dot_t); end - # source://parser/lib/parser/builders/default.rb#1297 + # source://parser/lib/parser/builders/default.rb#1310 def case(case_t, expr, when_bodies, else_t, else_body, end_t); end - # source://parser/lib/parser/builders/default.rb#1460 + # source://parser/lib/parser/builders/default.rb#1473 def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end # source://parser/lib/parser/builders/default.rb#343 @@ -959,55 +959,55 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#284 def complex(complex_t); end - # source://parser/lib/parser/builders/default.rb#1410 + # source://parser/lib/parser/builders/default.rb#1423 def compstmt(statements); end - # source://parser/lib/parser/builders/default.rb#1273 + # source://parser/lib/parser/builders/default.rb#1286 def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end - # source://parser/lib/parser/builders/default.rb#1279 + # source://parser/lib/parser/builders/default.rb#1292 def condition_mod(if_true, if_false, cond_t, cond); end - # source://parser/lib/parser/builders/default.rb#673 + # source://parser/lib/parser/builders/default.rb#686 def const(name_t); end - # source://parser/lib/parser/builders/default.rb#685 + # source://parser/lib/parser/builders/default.rb#698 def const_fetch(scope, t_colon2, name_t); end - # source://parser/lib/parser/builders/default.rb#678 + # source://parser/lib/parser/builders/default.rb#691 def const_global(t_colon3, name_t); end - # source://parser/lib/parser/builders/default.rb#750 + # source://parser/lib/parser/builders/default.rb#763 def const_op_assignable(node); end - # source://parser/lib/parser/builders/default.rb#1607 + # source://parser/lib/parser/builders/default.rb#1620 def const_pattern(const, ldelim_t, pattern, rdelim_t); end - # source://parser/lib/parser/builders/default.rb#601 + # source://parser/lib/parser/builders/default.rb#607 def cvar(token); end # source://parser/lib/parser/builders/default.rb#388 def dedent_string(node, dedent_level); end - # source://parser/lib/parser/builders/default.rb#801 + # source://parser/lib/parser/builders/default.rb#814 def def_class(class_t, name, lt_t, superclass, body, end_t); end - # source://parser/lib/parser/builders/default.rb#832 + # source://parser/lib/parser/builders/default.rb#845 def def_endless_method(def_t, name_t, args, assignment_t, body); end - # source://parser/lib/parser/builders/default.rb#850 + # source://parser/lib/parser/builders/default.rb#863 def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - # source://parser/lib/parser/builders/default.rb#824 + # source://parser/lib/parser/builders/default.rb#837 def def_method(def_t, name_t, args, body, end_t); end - # source://parser/lib/parser/builders/default.rb#814 + # source://parser/lib/parser/builders/default.rb#827 def def_module(module_t, name, body, end_t); end - # source://parser/lib/parser/builders/default.rb#808 + # source://parser/lib/parser/builders/default.rb#821 def def_sclass(class_t, lshft_t, expr, body, end_t); end - # source://parser/lib/parser/builders/default.rb#840 + # source://parser/lib/parser/builders/default.rb#853 def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end # source://parser/lib/parser/builders/default.rb#237 @@ -1019,52 +1019,52 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#265 def false(false_t); end - # source://parser/lib/parser/builders/default.rb#1598 + # source://parser/lib/parser/builders/default.rb#1611 def find_pattern(lbrack_t, elements, rbrack_t); end # source://parser/lib/parser/builders/default.rb#276 def float(float_t); end - # source://parser/lib/parser/builders/default.rb#1318 + # source://parser/lib/parser/builders/default.rb#1331 def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - # source://parser/lib/parser/builders/default.rb#900 + # source://parser/lib/parser/builders/default.rb#913 def forward_arg(dots_t); end - # source://parser/lib/parser/builders/default.rb#890 + # source://parser/lib/parser/builders/default.rb#903 def forward_only_args(begin_t, dots_t, end_t); end - # source://parser/lib/parser/builders/default.rb#1071 + # source://parser/lib/parser/builders/default.rb#1084 def forwarded_args(dots_t); end - # source://parser/lib/parser/builders/default.rb#1079 + # source://parser/lib/parser/builders/default.rb#1092 def forwarded_kwrestarg(dstar_t); end - # source://parser/lib/parser/builders/default.rb#1075 + # source://parser/lib/parser/builders/default.rb#1088 def forwarded_restarg(star_t); end # source://parser/lib/parser/builders/default.rb#596 def gvar(token); end - # source://parser/lib/parser/builders/default.rb#1571 + # source://parser/lib/parser/builders/default.rb#1584 def hash_pattern(lbrace_t, kwargs, rbrace_t); end # source://parser/lib/parser/builders/default.rb#586 def ident(token); end - # source://parser/lib/parser/builders/default.rb#1487 + # source://parser/lib/parser/builders/default.rb#1500 def if_guard(if_t, if_body); end - # source://parser/lib/parser/builders/default.rb#1466 + # source://parser/lib/parser/builders/default.rb#1479 def in_match(lhs, in_t, rhs); end - # source://parser/lib/parser/builders/default.rb#1481 + # source://parser/lib/parser/builders/default.rb#1494 def in_pattern(in_t, pattern, guard, then_t, body); end - # source://parser/lib/parser/builders/default.rb#1167 + # source://parser/lib/parser/builders/default.rb#1180 def index(receiver, lbrack_t, indexes, rbrack_t); end - # source://parser/lib/parser/builders/default.rb#1181 + # source://parser/lib/parser/builders/default.rb#1194 def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end # source://parser/lib/parser/builders/default.rb#272 @@ -1073,103 +1073,103 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#591 def ivar(token); end - # source://parser/lib/parser/builders/default.rb#1326 + # source://parser/lib/parser/builders/default.rb#1339 def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#931 + # source://parser/lib/parser/builders/default.rb#944 def kwarg(name_t); end - # source://parser/lib/parser/builders/default.rb#957 + # source://parser/lib/parser/builders/default.rb#970 def kwnilarg(dstar_t, nil_t); end - # source://parser/lib/parser/builders/default.rb#938 + # source://parser/lib/parser/builders/default.rb#951 def kwoptarg(name_t, value); end - # source://parser/lib/parser/builders/default.rb#945 + # source://parser/lib/parser/builders/default.rb#958 def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end # source://parser/lib/parser/builders/default.rb#535 def kwsplat(dstar_t, arg); end - # source://parser/lib/parser/builders/default.rb#1266 + # source://parser/lib/parser/builders/default.rb#1279 def logical_op(type, lhs, op_t, rhs); end - # source://parser/lib/parser/builders/default.rb#1304 + # source://parser/lib/parser/builders/default.rb#1317 def loop(type, keyword_t, cond, do_t, body, end_t); end - # source://parser/lib/parser/builders/default.rb#1309 + # source://parser/lib/parser/builders/default.rb#1322 def loop_mod(type, body, keyword_t, cond); end - # source://parser/lib/parser/builders/default.rb#1621 + # source://parser/lib/parser/builders/default.rb#1634 def match_alt(left, pipe_t, right); end - # source://parser/lib/parser/builders/default.rb#1628 + # source://parser/lib/parser/builders/default.rb#1641 def match_as(value, assoc_t, as); end - # source://parser/lib/parser/builders/default.rb#1507 + # source://parser/lib/parser/builders/default.rb#1520 def match_hash_var(name_t); end - # source://parser/lib/parser/builders/default.rb#1521 + # source://parser/lib/parser/builders/default.rb#1534 def match_hash_var_from_str(begin_t, strings, end_t); end - # source://parser/lib/parser/builders/default.rb#1659 + # source://parser/lib/parser/builders/default.rb#1672 def match_label(label_type, label); end - # source://parser/lib/parser/builders/default.rb#1635 + # source://parser/lib/parser/builders/default.rb#1648 def match_nil_pattern(dstar_t, nil_t); end - # source://parser/lib/parser/builders/default.rb#1214 + # source://parser/lib/parser/builders/default.rb#1227 def match_op(receiver, match_t, arg); end - # source://parser/lib/parser/builders/default.rb#1640 + # source://parser/lib/parser/builders/default.rb#1653 def match_pair(label_type, label, value); end - # source://parser/lib/parser/builders/default.rb#1471 + # source://parser/lib/parser/builders/default.rb#1484 def match_pattern(lhs, match_t, rhs); end - # source://parser/lib/parser/builders/default.rb#1476 + # source://parser/lib/parser/builders/default.rb#1489 def match_pattern_p(lhs, match_t, rhs); end - # source://parser/lib/parser/builders/default.rb#1560 + # source://parser/lib/parser/builders/default.rb#1573 def match_rest(star_t, name_t = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1495 + # source://parser/lib/parser/builders/default.rb#1508 def match_var(name_t); end - # source://parser/lib/parser/builders/default.rb#1603 + # source://parser/lib/parser/builders/default.rb#1616 def match_with_trailing_comma(match, comma_t); end - # source://parser/lib/parser/builders/default.rb#792 + # source://parser/lib/parser/builders/default.rb#805 def multi_assign(lhs, eql_t, rhs); end - # source://parser/lib/parser/builders/default.rb#787 + # source://parser/lib/parser/builders/default.rb#800 def multi_lhs(begin_t, items, end_t); end # source://parser/lib/parser/builders/default.rb#255 def nil(nil_t); end - # source://parser/lib/parser/builders/default.rb#1242 + # source://parser/lib/parser/builders/default.rb#1255 def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#611 + # source://parser/lib/parser/builders/default.rb#617 def nth_ref(token); end - # source://parser/lib/parser/builders/default.rb#886 + # source://parser/lib/parser/builders/default.rb#899 def numargs(max_numparam); end - # source://parser/lib/parser/builders/default.rb#1025 + # source://parser/lib/parser/builders/default.rb#1038 def objc_kwarg(kwname_t, assoc_t, name_t); end - # source://parser/lib/parser/builders/default.rb#1039 + # source://parser/lib/parser/builders/default.rb#1052 def objc_restarg(star_t, name = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1149 + # source://parser/lib/parser/builders/default.rb#1162 def objc_varargs(pair, rest_of_varargs); end - # source://parser/lib/parser/builders/default.rb#761 + # source://parser/lib/parser/builders/default.rb#774 def op_assign(lhs, op_t, rhs); end - # source://parser/lib/parser/builders/default.rb#911 + # source://parser/lib/parser/builders/default.rb#924 def optarg(name_t, eql_t, value); end # source://parser/lib/parser/builders/default.rb#488 @@ -1193,16 +1193,16 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#225 def parser=(_arg0); end - # source://parser/lib/parser/builders/default.rb#1616 + # source://parser/lib/parser/builders/default.rb#1629 def pin(pin_t, var); end - # source://parser/lib/parser/builders/default.rb#1349 + # source://parser/lib/parser/builders/default.rb#1362 def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end - # source://parser/lib/parser/builders/default.rb#1344 + # source://parser/lib/parser/builders/default.rb#1357 def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - # source://parser/lib/parser/builders/default.rb#979 + # source://parser/lib/parser/builders/default.rb#992 def procarg0(arg); end # source://parser/lib/parser/builders/default.rb#572 @@ -1220,19 +1220,19 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#417 def regexp_options(regopt_t); end - # source://parser/lib/parser/builders/default.rb#1356 + # source://parser/lib/parser/builders/default.rb#1369 def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end - # source://parser/lib/parser/builders/default.rb#920 + # source://parser/lib/parser/builders/default.rb#933 def restarg(star_t, name_t = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1003 + # source://parser/lib/parser/builders/default.rb#1016 def restarg_expr(star_t, expr = T.unsafe(nil)); end # source://parser/lib/parser/builders/default.rb#581 def self(token); end - # source://parser/lib/parser/builders/default.rb#962 + # source://parser/lib/parser/builders/default.rb#975 def shadowarg(name_t); end # source://parser/lib/parser/builders/default.rb#445 @@ -1259,7 +1259,7 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#469 def symbols_compose(begin_t, parts, end_t); end - # source://parser/lib/parser/builders/default.rb#1284 + # source://parser/lib/parser/builders/default.rb#1297 def ternary(cond, question_t, if_true, colon_t, if_false); end # source://parser/lib/parser/builders/default.rb#260 @@ -1268,16 +1268,16 @@ class Parser::Builders::Default # source://parser/lib/parser/builders/default.rb#294 def unary_num(unary_t, numeric); end - # source://parser/lib/parser/builders/default.rb#1230 + # source://parser/lib/parser/builders/default.rb#1243 def unary_op(op_t, receiver); end - # source://parser/lib/parser/builders/default.rb#860 + # source://parser/lib/parser/builders/default.rb#873 def undef_method(undef_t, names); end - # source://parser/lib/parser/builders/default.rb#1491 + # source://parser/lib/parser/builders/default.rb#1504 def unless_guard(unless_t, unless_body); end - # source://parser/lib/parser/builders/default.rb#1291 + # source://parser/lib/parser/builders/default.rb#1304 def when(when_t, patterns, then_t, body); end # source://parser/lib/parser/builders/default.rb#455 @@ -1291,184 +1291,184 @@ class Parser::Builders::Default private - # source://parser/lib/parser/builders/default.rb#1808 + # source://parser/lib/parser/builders/default.rb#1821 def arg_name_collides?(this_name, that_name); end - # source://parser/lib/parser/builders/default.rb#2004 + # source://parser/lib/parser/builders/default.rb#2017 def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1978 + # source://parser/lib/parser/builders/default.rb#1991 def binary_op_map(left_e, op_t, right_e); end - # source://parser/lib/parser/builders/default.rb#2106 + # source://parser/lib/parser/builders/default.rb#2119 def block_map(receiver_l, begin_t, end_t); end - # source://parser/lib/parser/builders/default.rb#1783 + # source://parser/lib/parser/builders/default.rb#1796 def check_assignment_to_numparam(name, loc); end - # source://parser/lib/parser/builders/default.rb#1675 + # source://parser/lib/parser/builders/default.rb#1688 def check_condition(cond); end - # source://parser/lib/parser/builders/default.rb#1754 + # source://parser/lib/parser/builders/default.rb#1767 def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1729 + # source://parser/lib/parser/builders/default.rb#1742 def check_duplicate_args(args, map = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1841 + # source://parser/lib/parser/builders/default.rb#1854 def check_duplicate_pattern_key(name, loc); end - # source://parser/lib/parser/builders/default.rb#1831 + # source://parser/lib/parser/builders/default.rb#1844 def check_duplicate_pattern_variable(name, loc); end - # source://parser/lib/parser/builders/default.rb#1823 + # source://parser/lib/parser/builders/default.rb#1836 def check_lvar_name(name, loc); end - # source://parser/lib/parser/builders/default.rb#1798 + # source://parser/lib/parser/builders/default.rb#1811 def check_reserved_for_numparam(name, loc); end - # source://parser/lib/parser/builders/default.rb#2263 + # source://parser/lib/parser/builders/default.rb#2280 def collapse_string_parts?(parts); end - # source://parser/lib/parser/builders/default.rb#1929 + # source://parser/lib/parser/builders/default.rb#1942 def collection_map(begin_t, parts, end_t); end - # source://parser/lib/parser/builders/default.rb#2133 + # source://parser/lib/parser/builders/default.rb#2146 def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end - # source://parser/lib/parser/builders/default.rb#1964 + # source://parser/lib/parser/builders/default.rb#1977 def constant_map(scope, colon2_t, name_t); end - # source://parser/lib/parser/builders/default.rb#2037 + # source://parser/lib/parser/builders/default.rb#2050 def definition_map(keyword_t, operator_t, name_t, end_t); end - # source://parser/lib/parser/builders/default.rb#1870 + # source://parser/lib/parser/builders/default.rb#1883 def delimited_string_map(string_t); end - # source://parser/lib/parser/builders/default.rb#2285 + # source://parser/lib/parser/builders/default.rb#2302 def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#2177 + # source://parser/lib/parser/builders/default.rb#2190 def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - # source://parser/lib/parser/builders/default.rb#2043 + # source://parser/lib/parser/builders/default.rb#2056 def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end - # source://parser/lib/parser/builders/default.rb#1925 + # source://parser/lib/parser/builders/default.rb#1938 def expr_map(loc); end - # source://parser/lib/parser/builders/default.rb#2158 + # source://parser/lib/parser/builders/default.rb#2171 def for_map(keyword_t, in_t, begin_t, end_t); end - # source://parser/lib/parser/builders/default.rb#2205 + # source://parser/lib/parser/builders/default.rb#2218 def guard_map(keyword_t, guard_body_e); end - # source://parser/lib/parser/builders/default.rb#2095 + # source://parser/lib/parser/builders/default.rb#2108 def index_map(receiver_e, lbrack_t, rbrack_t); end - # source://parser/lib/parser/builders/default.rb#1861 + # source://parser/lib/parser/builders/default.rb#1874 def join_exprs(left_expr, right_expr); end - # source://parser/lib/parser/builders/default.rb#2111 + # source://parser/lib/parser/builders/default.rb#2124 def keyword_map(keyword_t, begin_t, args, end_t); end - # source://parser/lib/parser/builders/default.rb#2128 + # source://parser/lib/parser/builders/default.rb#2141 def keyword_mod_map(pre_e, keyword_t, post_e); end - # source://parser/lib/parser/builders/default.rb#2014 + # source://parser/lib/parser/builders/default.rb#2027 def kwarg_map(name_t, value_e = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#2316 + # source://parser/lib/parser/builders/default.rb#2333 def kwargs?(node); end - # source://parser/lib/parser/builders/default.rb#2280 + # source://parser/lib/parser/builders/default.rb#2297 def loc(token); end - # source://parser/lib/parser/builders/default.rb#2027 + # source://parser/lib/parser/builders/default.rb#2040 def module_definition_map(keyword_t, name_e, operator_t, end_t); end - # source://parser/lib/parser/builders/default.rb#1853 + # source://parser/lib/parser/builders/default.rb#1866 def n(type, children, source_map); end - # source://parser/lib/parser/builders/default.rb#1857 + # source://parser/lib/parser/builders/default.rb#1870 def n0(type, source_map); end # source://parser/lib/parser/builders/default.rb#288 def numeric(kind, token); end - # source://parser/lib/parser/builders/default.rb#1895 + # source://parser/lib/parser/builders/default.rb#1908 def pair_keyword_map(key_t, value_e); end - # source://parser/lib/parser/builders/default.rb#1910 + # source://parser/lib/parser/builders/default.rb#1923 def pair_quoted_map(begin_t, end_t, value_e); end - # source://parser/lib/parser/builders/default.rb#1881 + # source://parser/lib/parser/builders/default.rb#1894 def prefix_string_map(symbol); end - # source://parser/lib/parser/builders/default.rb#1992 + # source://parser/lib/parser/builders/default.rb#2005 def range_map(start_e, op_t, end_e); end - # source://parser/lib/parser/builders/default.rb#1959 + # source://parser/lib/parser/builders/default.rb#1972 def regexp_map(begin_t, end_t, options_e); end - # source://parser/lib/parser/builders/default.rb#2164 + # source://parser/lib/parser/builders/default.rb#2177 def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end - # source://parser/lib/parser/builders/default.rb#2306 + # source://parser/lib/parser/builders/default.rb#2323 def rewrite_hash_args_to_kwargs(args); end - # source://parser/lib/parser/builders/default.rb#2077 + # source://parser/lib/parser/builders/default.rb#2090 def send_binary_op_map(lhs_e, selector_t, rhs_e); end - # source://parser/lib/parser/builders/default.rb#2100 + # source://parser/lib/parser/builders/default.rb#2113 def send_index_map(receiver_e, lbrack_t, rbrack_t); end - # source://parser/lib/parser/builders/default.rb#2051 + # source://parser/lib/parser/builders/default.rb#2064 def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#2083 + # source://parser/lib/parser/builders/default.rb#2096 def send_unary_op_map(selector_t, arg_e); end - # source://parser/lib/parser/builders/default.rb#2236 + # source://parser/lib/parser/builders/default.rb#2249 def static_regexp(parts, options); end - # source://parser/lib/parser/builders/default.rb#2256 + # source://parser/lib/parser/builders/default.rb#2269 def static_regexp_node(node); end - # source://parser/lib/parser/builders/default.rb#2219 + # source://parser/lib/parser/builders/default.rb#2232 def static_string(nodes); end - # source://parser/lib/parser/builders/default.rb#1945 + # source://parser/lib/parser/builders/default.rb#1958 def string_map(begin_t, parts, end_t); end - # source://parser/lib/parser/builders/default.rb#2272 + # source://parser/lib/parser/builders/default.rb#2289 def string_value(token); end - # source://parser/lib/parser/builders/default.rb#2153 + # source://parser/lib/parser/builders/default.rb#2166 def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end - # source://parser/lib/parser/builders/default.rb#1866 + # source://parser/lib/parser/builders/default.rb#1879 def token_map(token); end - # source://parser/lib/parser/builders/default.rb#1982 + # source://parser/lib/parser/builders/default.rb#1995 def unary_op_map(op_t, arg_e = T.unsafe(nil)); end - # source://parser/lib/parser/builders/default.rb#1890 + # source://parser/lib/parser/builders/default.rb#1903 def unquoted_map(token); end - # source://parser/lib/parser/builders/default.rb#2294 + # source://parser/lib/parser/builders/default.rb#2311 def validate_definee(definee); end - # source://parser/lib/parser/builders/default.rb#1768 + # source://parser/lib/parser/builders/default.rb#1781 def validate_no_forward_arg_after_restarg(args); end - # source://parser/lib/parser/builders/default.rb#2268 + # source://parser/lib/parser/builders/default.rb#2285 def value(token); end - # source://parser/lib/parser/builders/default.rb#2071 + # source://parser/lib/parser/builders/default.rb#2084 def var_send_map(variable_e); end - # source://parser/lib/parser/builders/default.rb#1974 + # source://parser/lib/parser/builders/default.rb#1987 def variable_map(name_t); end class << self @@ -2080,69 +2080,69 @@ class Parser::Lexer protected - # source://parser/lib/parser/lexer-F1.rb#14631 + # source://parser/lib/parser/lexer-F1.rb#14692 def arg_or_cmdarg(cmd_state); end - # source://parser/lib/parser/lexer-F1.rb#14693 + # source://parser/lib/parser/lexer-F1.rb#14754 def check_ambiguous_slash(tm); end - # source://parser/lib/parser/lexer-F1.rb#14655 + # source://parser/lib/parser/lexer-F1.rb#14716 def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14661 + # source://parser/lib/parser/lexer-F1.rb#14722 def e_lbrace; end - # source://parser/lib/parser/lexer-F1.rb#14605 + # source://parser/lib/parser/lexer-F1.rb#14666 def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14714 + # source://parser/lib/parser/lexer-F1.rb#14775 def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14742 + # source://parser/lib/parser/lexer-F1.rb#14803 def emit_colon_with_digits(p, tm, diag_msg); end - # source://parser/lib/parser/lexer-F1.rb#14639 + # source://parser/lib/parser/lexer-F1.rb#14700 def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14651 + # source://parser/lib/parser/lexer-F1.rb#14712 def emit_comment_from_range(p, pe); end - # source://parser/lib/parser/lexer-F1.rb#14621 + # source://parser/lib/parser/lexer-F1.rb#14682 def emit_do(do_block = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14704 + # source://parser/lib/parser/lexer-F1.rb#14765 def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14722 + # source://parser/lib/parser/lexer-F1.rb#14783 def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14730 + # source://parser/lib/parser/lexer-F1.rb#14791 def emit_rbrace_rparen_rbrack; end - # source://parser/lib/parser/lexer-F1.rb#14752 + # source://parser/lib/parser/lexer-F1.rb#14813 def emit_singleton_class; end - # source://parser/lib/parser/lexer-F1.rb#14615 + # source://parser/lib/parser/lexer-F1.rb#14676 def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14670 + # source://parser/lib/parser/lexer-F1.rb#14731 def numeric_literal_int; end - # source://parser/lib/parser/lexer-F1.rb#14689 + # source://parser/lib/parser/lexer-F1.rb#14750 def on_newline(p); end - # source://parser/lib/parser/lexer-F1.rb#14601 + # source://parser/lib/parser/lexer-F1.rb#14662 def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser/lib/parser/lexer-F1.rb#14592 + # source://parser/lib/parser/lexer-F1.rb#14653 def stack_pop; end - # source://parser/lib/parser/lexer-F1.rb#14597 + # source://parser/lib/parser/lexer-F1.rb#14658 def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end # @return [Boolean] # - # source://parser/lib/parser/lexer-F1.rb#14588 + # source://parser/lib/parser/lexer-F1.rb#14649 def version?(*versions); end class << self @@ -2489,13 +2489,13 @@ end # source://parser/lib/parser/lexer/dedenter.rb#7 Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) -# source://parser/lib/parser/lexer-F1.rb#14799 +# source://parser/lib/parser/lexer-F1.rb#14860 Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) -# source://parser/lib/parser/lexer-F1.rb#14785 +# source://parser/lib/parser/lexer-F1.rb#14846 Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) -# source://parser/lib/parser/lexer-F1.rb#14792 +# source://parser/lib/parser/lexer-F1.rb#14853 Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser/lib/parser/lexer-F1.rb#8362 @@ -2503,108 +2503,111 @@ Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) # source://parser/lib/parser/lexer/literal.rb#6 class Parser::Lexer::Literal - # source://parser/lib/parser/lexer/literal.rb#40 + # source://parser/lib/parser/lexer/literal.rb#41 def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end - # source://parser/lib/parser/lexer/literal.rb#114 + # source://parser/lib/parser/lexer/literal.rb#115 def backslash_delimited?; end - # source://parser/lib/parser/lexer/literal.rb#37 + # source://parser/lib/parser/lexer/literal.rb#38 def dedent_level; end - # source://parser/lib/parser/lexer/literal.rb#189 + # source://parser/lib/parser/lexer/literal.rb#190 def end_interp_brace_and_try_closing; end - # source://parser/lib/parser/lexer/literal.rb#216 + # source://parser/lib/parser/lexer/literal.rb#217 def extend_content; end - # source://parser/lib/parser/lexer/literal.rb#220 + # source://parser/lib/parser/lexer/literal.rb#221 def extend_space(ts, te); end - # source://parser/lib/parser/lexer/literal.rb#195 + # source://parser/lib/parser/lexer/literal.rb#196 def extend_string(string, ts, te); end - # source://parser/lib/parser/lexer/literal.rb#202 + # source://parser/lib/parser/lexer/literal.rb#203 def flush_string; end - # source://parser/lib/parser/lexer/literal.rb#102 + # source://parser/lib/parser/lexer/literal.rb#103 def heredoc?; end - # source://parser/lib/parser/lexer/literal.rb#37 + # source://parser/lib/parser/lexer/literal.rb#38 def heredoc_e; end - # source://parser/lib/parser/lexer/literal.rb#166 + # source://parser/lib/parser/lexer/literal.rb#167 def infer_indent_level(line); end - # source://parser/lib/parser/lexer/literal.rb#89 + # source://parser/lib/parser/lexer/literal.rb#90 def interpolate?; end - # source://parser/lib/parser/lexer/literal.rb#122 + # source://parser/lib/parser/lexer/literal.rb#123 def munge_escape?(character); end - # source://parser/lib/parser/lexer/literal.rb#132 + # source://parser/lib/parser/lexer/literal.rb#133 def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end - # source://parser/lib/parser/lexer/literal.rb#106 + # source://parser/lib/parser/lexer/literal.rb#107 def plain_heredoc?; end - # source://parser/lib/parser/lexer/literal.rb#98 + # source://parser/lib/parser/lexer/literal.rb#99 def regexp?; end - # source://parser/lib/parser/lexer/literal.rb#38 + # source://parser/lib/parser/lexer/literal.rb#39 def saved_herebody_s; end - # source://parser/lib/parser/lexer/literal.rb#38 + # source://parser/lib/parser/lexer/literal.rb#39 def saved_herebody_s=(_arg0); end - # source://parser/lib/parser/lexer/literal.rb#110 + # source://parser/lib/parser/lexer/literal.rb#111 def squiggly_heredoc?; end - # source://parser/lib/parser/lexer/literal.rb#185 + # source://parser/lib/parser/lexer/literal.rb#186 def start_interp_brace; end - # source://parser/lib/parser/lexer/literal.rb#37 + # source://parser/lib/parser/lexer/literal.rb#38 def str_s; end - # source://parser/lib/parser/lexer/literal.rb#230 + # source://parser/lib/parser/lexer/literal.rb#231 def supports_line_continuation_via_slash?; end - # source://parser/lib/parser/lexer/literal.rb#118 + # source://parser/lib/parser/lexer/literal.rb#119 def type; end - # source://parser/lib/parser/lexer/literal.rb#93 + # source://parser/lib/parser/lexer/literal.rb#94 def words?; end protected - # source://parser/lib/parser/lexer/literal.rb#248 + # source://parser/lib/parser/lexer/literal.rb#262 def clear_buffer; end - # source://parser/lib/parser/lexer/literal.rb#244 + # source://parser/lib/parser/lexer/literal.rb#258 def coerce_encoding(string); end - # source://parser/lib/parser/lexer/literal.rb#236 + # source://parser/lib/parser/lexer/literal.rb#237 def delimiter?(delimiter); end - # source://parser/lib/parser/lexer/literal.rb#264 + # source://parser/lib/parser/lexer/literal.rb#278 def emit(token, type, s, e); end - # source://parser/lib/parser/lexer/literal.rb#259 + # source://parser/lib/parser/lexer/literal.rb#273 def emit_start_tok; end end # source://parser/lib/parser/lexer/literal.rb#7 Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) -# source://parser/lib/parser/lexer/literal.rb#9 +# source://parser/lib/parser/lexer/literal.rb#8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + +# source://parser/lib/parser/lexer/literal.rb#10 Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) # Mapping of strings to parser tokens. # -# source://parser/lib/parser/lexer-F1.rb#14759 +# source://parser/lib/parser/lexer-F1.rb#14820 Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) -# source://parser/lib/parser/lexer-F1.rb#14779 +# source://parser/lib/parser/lexer-F1.rb#14840 Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser/lib/parser/lexer/stack_state.rb#5 @@ -3190,7 +3193,7 @@ Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) # @api private # -# source://parser/lib/parser/messages.rb#107 +# source://parser/lib/parser/messages.rb#112 module Parser::Messages class << self # Formats the message, returns a raw template if there's nothing to interpolate @@ -3200,7 +3203,7 @@ module Parser::Messages # # @api private # - # source://parser/lib/parser/messages.rb#114 + # source://parser/lib/parser/messages.rb#119 def compile(reason, arguments); end end end @@ -5218,10 +5221,10 @@ class Parser::StaticEnvironment # source://parser/lib/parser/static_environment.rb#58 def declare_anonymous_blockarg; end - # source://parser/lib/parser/static_environment.rb#74 + # source://parser/lib/parser/static_environment.rb#82 def declare_anonymous_kwrestarg; end - # source://parser/lib/parser/static_environment.rb#66 + # source://parser/lib/parser/static_environment.rb#70 def declare_anonymous_restarg; end # source://parser/lib/parser/static_environment.rb#50 @@ -5239,12 +5242,12 @@ class Parser::StaticEnvironment # @return [Boolean] # - # source://parser/lib/parser/static_environment.rb#78 + # source://parser/lib/parser/static_environment.rb#86 def declared_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser/lib/parser/static_environment.rb#70 + # source://parser/lib/parser/static_environment.rb#74 def declared_anonymous_restarg?; end # @return [Boolean] @@ -5254,7 +5257,7 @@ class Parser::StaticEnvironment # @return [Boolean] # - # source://parser/lib/parser/static_environment.rb#82 + # source://parser/lib/parser/static_environment.rb#94 def empty?; end # source://parser/lib/parser/static_environment.rb#27 @@ -5263,6 +5266,21 @@ class Parser::StaticEnvironment # source://parser/lib/parser/static_environment.rb#20 def extend_static; end + # @return [Boolean] + # + # source://parser/lib/parser/static_environment.rb#66 + def parent_has_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser/lib/parser/static_environment.rb#90 + def parent_has_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser/lib/parser/static_environment.rb#78 + def parent_has_anonymous_restarg?; end + # source://parser/lib/parser/static_environment.rb#15 def reset; end diff --git a/sorbet/rbi/gems/puma@6.4.0.rbi b/sorbet/rbi/gems/puma@6.4.2.rbi similarity index 93% rename from sorbet/rbi/gems/puma@6.4.0.rbi rename to sorbet/rbi/gems/puma@6.4.2.rbi index 4a18ff84..49a494d4 100644 --- a/sorbet/rbi/gems/puma@6.4.0.rbi +++ b/sorbet/rbi/gems/puma@6.4.2.rbi @@ -17,23 +17,23 @@ module Puma # @return [Boolean] # @version 5.0.0 # - # source://puma/lib/puma/detect.rb#43 + # source://puma/lib/puma/detect.rb#42 def forkable?; end # @return [Boolean] # - # source://puma/lib/puma/detect.rb#25 + # source://puma/lib/puma/detect.rb#24 def jruby?; end # @return [Boolean] # @version 5.0.0 # - # source://puma/lib/puma/detect.rb#38 + # source://puma/lib/puma/detect.rb#37 def mri?; end # @return [Boolean] # - # source://puma/lib/puma/detect.rb#29 + # source://puma/lib/puma/detect.rb#28 def osx?; end # source://puma/lib/puma.rb#75 @@ -57,7 +57,7 @@ module Puma # @return [Boolean] # - # source://puma/lib/puma/detect.rb#33 + # source://puma/lib/puma/detect.rb#32 def windows?; end end end @@ -239,18 +239,18 @@ class Puma::Client # @return [Client] a new instance of Client # - # source://puma/lib/puma/client.rb#65 + # source://puma/lib/puma/client.rb#73 def initialize(io, env = T.unsafe(nil)); end # Returns the value of attribute body. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def body; end # For the hijack protocol (allows us to just put the Client object # into the env) # - # source://puma/lib/puma/client.rb#130 + # source://puma/lib/puma/client.rb#138 def call; end # Returns true if the persistent connection can be closed immediately @@ -259,64 +259,64 @@ class Puma::Client # @return [Boolean] # @version 5.0.0 # - # source://puma/lib/puma/client.rb#325 + # source://puma/lib/puma/client.rb#333 def can_close?; end - # source://puma/lib/puma/client.rb#189 + # source://puma/lib/puma/client.rb#197 def close; end # Remove in Puma 7? # # @return [Boolean] # - # source://puma/lib/puma/client.rb#113 + # source://puma/lib/puma/client.rb#121 def closed?; end - # source://puma/lib/puma/client.rb#276 + # source://puma/lib/puma/client.rb#284 def eagerly_finish; end # Returns the value of attribute env. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def env; end - # source://puma/lib/puma/client.rb#330 + # source://puma/lib/puma/client.rb#338 def expect_proxy_proto=(val); end - # source://puma/lib/puma/client.rb#282 + # source://puma/lib/puma/client.rb#290 def finish(timeout); end # Returns the value of attribute hijacked. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def hijacked; end # Sets the attribute http_content_length_limit # # @param value the value to set the attribute http_content_length_limit to. # - # source://puma/lib/puma/client.rb#108 + # source://puma/lib/puma/client.rb#116 def http_content_length_limit=(_arg0); end # Returns the value of attribute http_content_length_limit_exceeded. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def http_content_length_limit_exceeded; end - # source://puma/lib/puma/client.rb#136 + # source://puma/lib/puma/client.rb#144 def in_data_phase; end - # source://puma/lib/puma/client.rb#124 + # source://puma/lib/puma/client.rb#132 def inspect; end # Returns the value of attribute io. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def io; end # Returns the value of attribute io_buffer. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def io_buffer; end # Test to see if io meets a bare minimum of functioning, @to_io needs to be @@ -324,120 +324,120 @@ class Puma::Client # # @return [Boolean] # - # source://puma/lib/puma/client.rb#119 + # source://puma/lib/puma/client.rb#127 def io_ok?; end # Returns the value of attribute listener. # - # source://puma/lib/puma/client.rb#110 + # source://puma/lib/puma/client.rb#118 def listener; end # Sets the attribute listener # # @param value the value to set the attribute listener to. # - # source://puma/lib/puma/client.rb#110 + # source://puma/lib/puma/client.rb#118 def listener=(_arg0); end - # source://puma/lib/puma/client.rb#311 + # source://puma/lib/puma/client.rb#319 def peer_family; end - # source://puma/lib/puma/client.rb#299 + # source://puma/lib/puma/client.rb#307 def peerip; end # Sets the attribute peerip # # @param value the value to set the attribute peerip to. # - # source://puma/lib/puma/client.rb#108 + # source://puma/lib/puma/client.rb#116 def peerip=(_arg0); end # Returns the value of attribute ready. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def ready; end # Returns the value of attribute remote_addr_header. # - # source://puma/lib/puma/client.rb#110 + # source://puma/lib/puma/client.rb#118 def remote_addr_header; end # Sets the attribute remote_addr_header # # @param value the value to set the attribute remote_addr_header to. # - # source://puma/lib/puma/client.rb#110 + # source://puma/lib/puma/client.rb#118 def remote_addr_header=(_arg0); end - # source://puma/lib/puma/client.rb#149 + # source://puma/lib/puma/client.rb#157 def reset(fast_check = T.unsafe(nil)); end - # source://puma/lib/puma/client.rb#140 + # source://puma/lib/puma/client.rb#148 def set_timeout(val); end # Returns the value of attribute tempfile. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def tempfile; end # Number of seconds until the timeout elapses. # - # source://puma/lib/puma/client.rb#145 + # source://puma/lib/puma/client.rb#153 def timeout; end # @raise [ConnectionError] # - # source://puma/lib/puma/client.rb#287 + # source://puma/lib/puma/client.rb#295 def timeout!; end # Returns the value of attribute timeout_at. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def timeout_at; end # Returns the value of attribute to_io. # - # source://puma/lib/puma/client.rb#105 + # source://puma/lib/puma/client.rb#113 def to_io; end - # source://puma/lib/puma/client.rb#221 + # source://puma/lib/puma/client.rb#229 def try_to_finish; end # If necessary, read the PROXY protocol from the buffer. Returns # false if more data is needed. # - # source://puma/lib/puma/client.rb#199 + # source://puma/lib/puma/client.rb#207 def try_to_parse_proxy_protocol; end - # source://puma/lib/puma/client.rb#292 + # source://puma/lib/puma/client.rb#300 def write_error(status_code); end private - # source://puma/lib/puma/client.rb#628 + # source://puma/lib/puma/client.rb#655 def above_http_content_limit(value); end - # source://puma/lib/puma/client.rb#517 + # source://puma/lib/puma/client.rb#526 def decode_chunk(chunk); end - # source://puma/lib/puma/client.rb#425 + # source://puma/lib/puma/client.rb#433 def read_body; end - # source://puma/lib/puma/client.rb#470 + # source://puma/lib/puma/client.rb#478 def read_chunked_body; end - # source://puma/lib/puma/client.rb#620 + # source://puma/lib/puma/client.rb#647 def set_ready; end - # source://puma/lib/puma/client.rb#343 + # source://puma/lib/puma/client.rb#351 def setup_body; end - # source://puma/lib/puma/client.rb#495 + # source://puma/lib/puma/client.rb#503 def setup_chunked_body(body); end # @version 5.0.0 # - # source://puma/lib/puma/client.rb#513 + # source://puma/lib/puma/client.rb#522 def write_chunk(str); end end @@ -459,16 +459,28 @@ Puma::Client::CHUNK_VALID_ENDING_SIZE = T.let(T.unsafe(nil), Integer) # Content-Length header value validation # -# source://puma/lib/puma/client.rb#55 +# source://puma/lib/puma/client.rb#63 Puma::Client::CONTENT_LENGTH_VALUE_INVALID = T.let(T.unsafe(nil), Regexp) # The object used for a request with no body. All requests with # no body share this one object since it has no state. # -# source://puma/lib/puma/client.rb#61 +# source://puma/lib/puma/client.rb#69 Puma::Client::EmptyBody = T.let(T.unsafe(nil), Puma::NullIO) -# source://puma/lib/puma/client.rb#57 +# The maximum amount of excess data the client sends +# using chunk size extensions before we abort the connection. +# +# source://puma/lib/puma/client.rb#60 +Puma::Client::MAX_CHUNK_EXCESS = T.let(T.unsafe(nil), Integer) + +# The maximum number of bytes we'll buffer looking for a valid +# chunk header. +# +# source://puma/lib/puma/client.rb#56 +Puma::Client::MAX_CHUNK_HEADER_SIZE = T.let(T.unsafe(nil), Integer) + +# source://puma/lib/puma/client.rb#65 Puma::Client::TE_ERR_MSG = T.let(T.unsafe(nil), String) # This class is instantiated by the `Puma::Launcher` and used @@ -488,58 +500,68 @@ class Puma::Cluster < ::Puma::Runner # @return [Boolean] # - # source://puma/lib/puma/cluster.rb#151 + # source://puma/lib/puma/cluster.rb#153 def all_workers_booted?; end - # source://puma/lib/puma/cluster.rb#155 + # @return [Boolean] + # + # source://puma/lib/puma/cluster.rb#161 + def all_workers_idle_timed_out?; end + + # @return [Boolean] + # + # source://puma/lib/puma/cluster.rb#157 + def all_workers_in_phase?; end + + # source://puma/lib/puma/cluster.rb#165 def check_workers; end - # source://puma/lib/puma/cluster.rb#134 + # source://puma/lib/puma/cluster.rb#132 def cull_start_index(diff); end - # source://puma/lib/puma/cluster.rb#110 + # source://puma/lib/puma/cluster.rb#108 def cull_workers; end # @version 5.0.0 # - # source://puma/lib/puma/cluster.rb#278 + # source://puma/lib/puma/cluster.rb#288 def fork_worker!; end - # source://puma/lib/puma/cluster.rb#235 + # source://puma/lib/puma/cluster.rb#245 def halt; end - # source://puma/lib/puma/cluster.rb#144 + # source://puma/lib/puma/cluster.rb#142 def next_worker_index; end - # source://puma/lib/puma/cluster.rb#214 + # source://puma/lib/puma/cluster.rb#224 def phased_restart(refork = T.unsafe(nil)); end # @return [Boolean] # - # source://puma/lib/puma/cluster.rb#273 + # source://puma/lib/puma/cluster.rb#283 def preload?; end # source://puma/lib/puma/cluster.rb#59 def redirect_io; end - # source://puma/lib/puma/cluster.rb#240 + # source://puma/lib/puma/cluster.rb#250 def reload_worker_directory; end - # source://puma/lib/puma/cluster.rb#209 + # source://puma/lib/puma/cluster.rb#219 def restart; end - # source://puma/lib/puma/cluster.rb#338 + # source://puma/lib/puma/cluster.rb#348 def run; end # We do this in a separate method to keep the lambda scope # of the signals handlers as small as possible. # - # source://puma/lib/puma/cluster.rb#287 + # source://puma/lib/puma/cluster.rb#297 def setup_signals; end # @version 5.0.0 # - # source://puma/lib/puma/cluster.rb#96 + # source://puma/lib/puma/cluster.rb#94 def spawn_worker(idx, master); end # source://puma/lib/puma/cluster.rb#65 @@ -551,21 +573,24 @@ class Puma::Cluster < ::Puma::Runner # Inside of a child process, this will return all zeroes, as @workers is only populated in # the master process. # - # source://puma/lib/puma/cluster.rb#249 + # source://puma/lib/puma/cluster.rb#259 def stats; end - # source://puma/lib/puma/cluster.rb#223 + # source://puma/lib/puma/cluster.rb#233 def stop; end - # source://puma/lib/puma/cluster.rb#228 + # source://puma/lib/puma/cluster.rb#238 def stop_blocked; end # source://puma/lib/puma/cluster.rb#32 def stop_workers; end - # source://puma/lib/puma/cluster.rb#187 + # source://puma/lib/puma/cluster.rb#197 def worker(index, master); end + # source://puma/lib/puma/cluster.rb#149 + def worker_at(idx); end + # Returns the list of cluster worker handles. # # @return [Array] @@ -573,23 +598,26 @@ class Puma::Cluster < ::Puma::Runner # source://puma/lib/puma/cluster.rb#30 def workers; end - # source://puma/lib/puma/cluster.rb#124 + # source://puma/lib/puma/cluster.rb#122 def workers_to_cull(diff); end private - # source://puma/lib/puma/cluster.rb#500 + # source://puma/lib/puma/cluster.rb#604 + def idle_timed_out_worker_pids; end + + # source://puma/lib/puma/cluster.rb#532 def single_worker_warning; end # @version 5.0.0 # - # source://puma/lib/puma/cluster.rb#535 + # source://puma/lib/puma/cluster.rb#590 def timeout_workers; end # loops thru @workers, removing workers that exited, and calling # `#term` if needed # - # source://puma/lib/puma/cluster.rb#511 + # source://puma/lib/puma/cluster.rb#543 def wait_workers; end end @@ -1390,7 +1418,7 @@ class Puma::DSL # @example # directory '/u/apps/lolcat' # - # source://puma/lib/puma/dsl.rb#785 + # source://puma/lib/puma/dsl.rb#796 def directory(dir); end # When shutting down, drain the accept socket of pending connections and @@ -1429,7 +1457,7 @@ class Puma::DSL # extra_runtime_dependencies ['puma_worker_killer', 'puma-heroku'] # @see Puma::Launcher#extra_runtime_deps_directories # - # source://puma/lib/puma/dsl.rb#862 + # source://puma/lib/puma/dsl.rb#873 def extra_runtime_dependencies(answer = T.unsafe(nil)); end # Define how long the tcp socket stays open, if no data has been received. @@ -1465,7 +1493,7 @@ class Puma::DSL # @note Cluster mode only. # @version 5.0.0 # - # source://puma/lib/puma/dsl.rb#1070 + # source://puma/lib/puma/dsl.rb#1081 def fork_worker(after_requests = T.unsafe(nil)); end # source://puma/lib/puma/dsl.rb#162 @@ -1473,7 +1501,7 @@ class Puma::DSL # The default value for http_content_length_limit is nil. # - # source://puma/lib/puma/dsl.rb#1113 + # source://puma/lib/puma/dsl.rb#1124 def http_content_length_limit(limit); end # If a new request is not received within this number of seconds, begin shutting down. @@ -1501,7 +1529,7 @@ class Puma::DSL # # @see https://github.com/socketry/nio4r/blob/master/lib/nio/selector.rb # - # source://puma/lib/puma/dsl.rb#1096 + # source://puma/lib/puma/dsl.rb#1107 def io_selector_backend(backend); end # Load additional configuration from a file @@ -1526,16 +1554,16 @@ class Puma::DSL # [200, {}, ["error page"]] # end # - # source://puma/lib/puma/dsl.rb#806 + # source://puma/lib/puma/dsl.rb#817 def lowlevel_error_handler(obj = T.unsafe(nil), &block); end # The number of requests to attempt inline before sending a client back to # the reactor to be subject to normal ordering. # - # source://puma/lib/puma/dsl.rb#1077 + # source://puma/lib/puma/dsl.rb#1088 def max_fast_inline(num_of_requests); end - # source://puma/lib/puma/dsl.rb#1100 + # source://puma/lib/puma/dsl.rb#1111 def mutate_stdout_and_stderr_to_sync_on_write(enabled = T.unsafe(nil)); end # Code to run after puma is booted (works for both: single and clustered) @@ -1582,8 +1610,15 @@ class Puma::DSL # source://puma/lib/puma/dsl.rb#392 def on_restart(&block); end - # Code to run immediately before a thread exits. The worker does not - # accept new requests until this code finishes. + # Provide a block to be executed after a thread is trimmed from the thread + # pool. Be careful: while this block executes, Puma's main loop is + # blocked, so no new requests will be picked up. + # + # This hook only runs when a thread in the threadpool is trimmed by Puma. + # It does not run when a thread dies due to exceptions or any other cause. + # + # Return values are ignored. + # Raising an exception will log a warning. # # This hook is useful for cleaning up thread local resources when a thread # is trimmed. @@ -1595,14 +1630,18 @@ class Puma::DSL # puts 'On thread exit...' # end # - # source://puma/lib/puma/dsl.rb#761 + # source://puma/lib/puma/dsl.rb#772 def on_thread_exit(&block); end - # Code to run immediately before a thread starts. The worker does not - # start new threads until this code finishes. + # Provide a block to be executed just before a thread is added to the thread + # pool. Be careful: while the block executes, thread creation is delayed, and + # probably a request will have to wait too! The new thread will not be added to + # the threadpool until the provided block returns. # - # This hook is useful for doing something when a thread - # starts. + # Return values are ignored. + # Raising an exception will log a warning. + # + # This hook is useful for doing something when the thread pool grows. # # This can be called multiple times to add several hooks. # @@ -1611,7 +1650,7 @@ class Puma::DSL # puts 'On thread start...' # end # - # source://puma/lib/puma/dsl.rb#744 + # source://puma/lib/puma/dsl.rb#748 def on_thread_start(&block); end # Code to run in a worker when it boots to setup @@ -1668,7 +1707,7 @@ class Puma::DSL # # This can be called multiple times to add several hooks. # - # source://puma/lib/puma/dsl.rb#775 + # source://puma/lib/puma/dsl.rb#786 def out_of_band(&block); end # Define how long persistent connections can be idle before Puma closes them. @@ -1706,7 +1745,7 @@ class Puma::DSL # preload_app! # @note Cluster mode only. # - # source://puma/lib/puma/dsl.rb#795 + # source://puma/lib/puma/dsl.rb#806 def preload_app!(answer = T.unsafe(nil)); end # This option is used to allow your app and its gems to be @@ -1726,7 +1765,7 @@ class Puma::DSL # @note This is only supported for RubyGems 2.2+ # @see extra_runtime_dependencies # - # source://puma/lib/puma/dsl.rb#829 + # source://puma/lib/puma/dsl.rb#840 def prune_bundler(answer = T.unsafe(nil)); end # When set to true (the default), workers accept all requests @@ -1745,7 +1784,7 @@ class Puma::DSL # # @see Puma::Server # - # source://puma/lib/puma/dsl.rb#977 + # source://puma/lib/puma/dsl.rb#988 def queue_requests(answer = T.unsafe(nil)); end # Disable request logging, if this isn't used it'll be enabled by default. @@ -1785,7 +1824,7 @@ class Puma::DSL # @see Puma::Launcher#setup_signals # @see Puma::Cluster#setup_signals # - # source://puma/lib/puma/dsl.rb#845 + # source://puma/lib/puma/dsl.rb#856 def raise_exception_on_sigterm(answer = T.unsafe(nil)); end # Command to use to restart Puma. This should be just how to @@ -1826,14 +1865,14 @@ class Puma::DSL # you wish. Because Puma never uses this field anyway, it's format is # entirely in your hands. # - # source://puma/lib/puma/dsl.rb#1028 + # source://puma/lib/puma/dsl.rb#1039 def set_remote_address(val = T.unsafe(nil)); end # When a shutdown is requested, the backtraces of all the # threads will be written to $stdout. This can help figure # out why shutdown is hanging. # - # source://puma/lib/puma/dsl.rb#985 + # source://puma/lib/puma/dsl.rb#996 def shutdown_debug(val = T.unsafe(nil)); end # Disable warning message when running single mode with callback hook defined. @@ -1956,7 +1995,7 @@ class Puma::DSL # @note If the `methods` value is `:any`, no method check with be performed, # similar to Puma v5 and earlier. # - # source://puma/lib/puma/dsl.rb#1138 + # source://puma/lib/puma/dsl.rb#1149 def supported_http_methods(methods); end # Additional text to display in process listing. @@ -1969,7 +2008,7 @@ class Puma::DSL # @example # tag '' # - # source://puma/lib/puma/dsl.rb#875 + # source://puma/lib/puma/dsl.rb#886 def tag(string); end # Configure +min+ to be the minimum number of threads to use to answer @@ -1998,7 +2037,7 @@ class Puma::DSL # @see Puma::ThreadPool#wait_for_less_busy_worker # @version 5.0.0 # - # source://puma/lib/puma/dsl.rb#999 + # source://puma/lib/puma/dsl.rb#1010 def wait_for_less_busy_worker(val = T.unsafe(nil)); end # Change the default worker timeout for booting. @@ -2010,7 +2049,7 @@ class Puma::DSL # @note Cluster mode only. # @see Puma::Cluster::Worker#ping_timeout # - # source://puma/lib/puma/dsl.rb#926 + # source://puma/lib/puma/dsl.rb#937 def worker_boot_timeout(timeout); end # Change the default interval for checking workers. @@ -2022,7 +2061,7 @@ class Puma::DSL # @note Cluster mode only. # @see Puma::Cluster#check_workers # - # source://puma/lib/puma/dsl.rb#888 + # source://puma/lib/puma/dsl.rb#899 def worker_check_interval(interval); end # Set the strategy for worker culling. @@ -2039,7 +2078,7 @@ class Puma::DSL # @note Cluster mode only. # @see Puma::Cluster#cull_workers # - # source://puma/lib/puma/dsl.rb#953 + # source://puma/lib/puma/dsl.rb#964 def worker_culling_strategy(strategy); end # Set the timeout for worker shutdown. @@ -2047,7 +2086,7 @@ class Puma::DSL # @note Cluster mode only. # @see Puma::Cluster::Worker#term # - # source://puma/lib/puma/dsl.rb#935 + # source://puma/lib/puma/dsl.rb#946 def worker_shutdown_timeout(timeout); end # Verifies that all workers have checked in to the master process within @@ -2063,7 +2102,7 @@ class Puma::DSL # @note Cluster mode only. # @see Puma::Cluster::Worker#ping_timeout # - # source://puma/lib/puma/dsl.rb#905 + # source://puma/lib/puma/dsl.rb#916 def worker_timeout(timeout); end # How many worker processes to run. Typically this is set to @@ -2083,13 +2122,13 @@ class Puma::DSL # To avoid adding cert_pem and key_pem as URI params, we store them on the # options[:store] from where Puma binder knows how to find and extract them. # - # source://puma/lib/puma/dsl.rb#1153 + # source://puma/lib/puma/dsl.rb#1164 def add_pem_values_to_options_store(opts); end - # source://puma/lib/puma/dsl.rb#1169 + # source://puma/lib/puma/dsl.rb#1180 def process_hook(options_key, key, block, meth); end - # source://puma/lib/puma/dsl.rb#1180 + # source://puma/lib/puma/dsl.rb#1191 def warn_if_in_single_mode(hook_name); end class << self @@ -2296,12 +2335,12 @@ end # source://puma/lib/puma/detect.rb#13 Puma::IS_JRUBY = T.let(T.unsafe(nil), FalseClass) -# source://puma/lib/puma/detect.rb#20 +# source://puma/lib/puma/detect.rb#19 Puma::IS_LINUX = T.let(T.unsafe(nil), FalseClass) # @version 5.2.0 # -# source://puma/lib/puma/detect.rb#23 +# source://puma/lib/puma/detect.rb#22 Puma::IS_MRI = T.let(T.unsafe(nil), TrueClass) # source://puma/lib/puma/detect.rb#15 @@ -2759,105 +2798,105 @@ module Puma::MiniSSL end end -# source://puma/lib/puma/minissl.rb#203 +# source://puma/lib/puma/minissl.rb#208 class Puma::MiniSSL::Context # @return [Context] a new instance of Context # - # source://puma/lib/puma/minissl.rb#207 + # source://puma/lib/puma/minissl.rb#212 def initialize; end # Returns the value of attribute ca. # - # source://puma/lib/puma/minissl.rb#283 + # source://puma/lib/puma/minissl.rb#288 def ca; end - # source://puma/lib/puma/minissl.rb#305 + # source://puma/lib/puma/minissl.rb#310 def ca=(ca); end # Returns the value of attribute cert. # - # source://puma/lib/puma/minissl.rb#282 + # source://puma/lib/puma/minissl.rb#287 def cert; end - # source://puma/lib/puma/minissl.rb#300 + # source://puma/lib/puma/minissl.rb#305 def cert=(cert); end # Returns the value of attribute cert_pem. # - # source://puma/lib/puma/minissl.rb#284 + # source://puma/lib/puma/minissl.rb#289 def cert_pem; end # @raise [ArgumentError] # - # source://puma/lib/puma/minissl.rb#310 + # source://puma/lib/puma/minissl.rb#315 def cert_pem=(cert_pem); end - # source://puma/lib/puma/minissl.rb#320 + # source://puma/lib/puma/minissl.rb#325 def check; end # @raise [ArgumentError] # - # source://puma/lib/puma/minissl.rb#219 + # source://puma/lib/puma/minissl.rb#224 def check_file(file, desc); end # non-jruby Context properties # - # source://puma/lib/puma/minissl.rb#280 + # source://puma/lib/puma/minissl.rb#285 def key; end - # source://puma/lib/puma/minissl.rb#291 + # source://puma/lib/puma/minissl.rb#296 def key=(key); end # Executes the command to return the password needed to decrypt the key. # - # source://puma/lib/puma/minissl.rb#326 + # source://puma/lib/puma/minissl.rb#331 def key_password; end # Returns the value of attribute key_password_command. # - # source://puma/lib/puma/minissl.rb#281 + # source://puma/lib/puma/minissl.rb#286 def key_password_command; end - # source://puma/lib/puma/minissl.rb#296 + # source://puma/lib/puma/minissl.rb#301 def key_password_command=(key_password_command); end # Returns the value of attribute key_pem. # - # source://puma/lib/puma/minissl.rb#285 + # source://puma/lib/puma/minissl.rb#290 def key_pem; end # @raise [ArgumentError] # - # source://puma/lib/puma/minissl.rb#315 + # source://puma/lib/puma/minissl.rb#320 def key_pem=(key_pem); end # Returns the value of attribute no_tlsv1. # - # source://puma/lib/puma/minissl.rb#205 + # source://puma/lib/puma/minissl.rb#210 def no_tlsv1; end # disables TLSv1 # # @raise [ArgumentError] # - # source://puma/lib/puma/minissl.rb#368 + # source://puma/lib/puma/minissl.rb#373 def no_tlsv1=(tlsv1); end # Returns the value of attribute no_tlsv1_1. # - # source://puma/lib/puma/minissl.rb#205 + # source://puma/lib/puma/minissl.rb#210 def no_tlsv1_1; end # disables TLSv1 and TLSv1.1. Overrides `#no_tlsv1=` # # @raise [ArgumentError] # - # source://puma/lib/puma/minissl.rb#375 + # source://puma/lib/puma/minissl.rb#380 def no_tlsv1_1=(tlsv1_1); end # Returns the value of attribute reuse. # - # source://puma/lib/puma/minissl.rb#289 + # source://puma/lib/puma/minissl.rb#294 def reuse; end # Controls session reuse. Allowed values are as follows: @@ -2869,53 +2908,53 @@ class Puma::MiniSSL::Context # * 's' - where s is an integer strings for size. # * ',t' - where t is an integer strings for timeout. # - # source://puma/lib/puma/minissl.rb#345 + # source://puma/lib/puma/minissl.rb#350 def reuse=(reuse_str); end # Returns the value of attribute reuse_cache_size. # - # source://puma/lib/puma/minissl.rb#289 + # source://puma/lib/puma/minissl.rb#294 def reuse_cache_size; end # Returns the value of attribute reuse_timeout. # - # source://puma/lib/puma/minissl.rb#289 + # source://puma/lib/puma/minissl.rb#294 def reuse_timeout; end # Returns the value of attribute ssl_cipher_filter. # - # source://puma/lib/puma/minissl.rb#286 + # source://puma/lib/puma/minissl.rb#291 def ssl_cipher_filter; end # Sets the attribute ssl_cipher_filter # # @param value the value to set the attribute ssl_cipher_filter to. # - # source://puma/lib/puma/minissl.rb#286 + # source://puma/lib/puma/minissl.rb#291 def ssl_cipher_filter=(_arg0); end # Returns the value of attribute verification_flags. # - # source://puma/lib/puma/minissl.rb#287 + # source://puma/lib/puma/minissl.rb#292 def verification_flags; end # Sets the attribute verification_flags # # @param value the value to set the attribute verification_flags to. # - # source://puma/lib/puma/minissl.rb#287 + # source://puma/lib/puma/minissl.rb#292 def verification_flags=(_arg0); end # Returns the value of attribute verify_mode. # - # source://puma/lib/puma/minissl.rb#204 + # source://puma/lib/puma/minissl.rb#209 def verify_mode; end # Sets the attribute verify_mode # # @param value the value to set the attribute verify_mode to. # - # source://puma/lib/puma/minissl.rb#204 + # source://puma/lib/puma/minissl.rb#209 def verify_mode=(_arg0); end end @@ -2933,12 +2972,12 @@ class Puma::MiniSSL::ContextBuilder # Returns the value of attribute log_writer. # - # source://puma/lib/puma/minissl/context_builder.rb#90 + # source://puma/lib/puma/minissl/context_builder.rb#92 def log_writer; end # Returns the value of attribute params. # - # source://puma/lib/puma/minissl/context_builder.rb#90 + # source://puma/lib/puma/minissl/context_builder.rb#92 def params; end end @@ -2980,33 +3019,33 @@ end # without ssl support, as Server and Reactor use it in rescue statements. class Puma::MiniSSL::SSLError < ::StandardError; end -# source://puma/lib/puma/minissl.rb#412 +# source://puma/lib/puma/minissl.rb#417 class Puma::MiniSSL::Server # @return [Server] a new instance of Server # - # source://puma/lib/puma/minissl.rb#413 + # source://puma/lib/puma/minissl.rb#418 def initialize(socket, ctx); end - # source://puma/lib/puma/minissl.rb#419 + # source://puma/lib/puma/minissl.rb#424 def accept; end - # source://puma/lib/puma/minissl.rb#426 + # source://puma/lib/puma/minissl.rb#431 def accept_nonblock; end # @version 5.0.0 # - # source://puma/lib/puma/minissl.rb#440 + # source://puma/lib/puma/minissl.rb#445 def addr; end - # source://puma/lib/puma/minissl.rb#444 + # source://puma/lib/puma/minissl.rb#449 def close; end # @return [Boolean] # - # source://puma/lib/puma/minissl.rb#448 + # source://puma/lib/puma/minissl.rb#453 def closed?; end - # source://puma/lib/puma/minissl.rb#434 + # source://puma/lib/puma/minissl.rb#439 def to_io; end end @@ -3037,7 +3076,14 @@ class Puma::MiniSSL::Socket # source://puma/lib/puma/minissl.rb#183 def peeraddr; end - # source://puma/lib/puma/minissl.rb#188 + # OpenSSL is loaded in `MiniSSL::ContextBuilder` when + # `MiniSSL::Context#verify_mode` is not `VERIFY_NONE`. + # When `VERIFY_NONE`, `MiniSSL::Engine#peercert` is nil, regardless of + # whether the client sends a cert. + # + # @return [OpenSSL::X509::Certificate, nil] + # + # source://puma/lib/puma/minissl.rb#193 def peercert; end # source://puma/lib/puma/minissl.rb#85 @@ -3095,16 +3141,16 @@ end # https://github.com/openssl/openssl/blob/master/include/openssl/x509_vfy.h.in # /* Certificate verify flags */ # -# source://puma/lib/puma/minissl.rb#388 +# source://puma/lib/puma/minissl.rb#393 Puma::MiniSSL::VERIFICATION_FLAGS = T.let(T.unsafe(nil), Hash) -# source://puma/lib/puma/minissl.rb#384 +# source://puma/lib/puma/minissl.rb#389 Puma::MiniSSL::VERIFY_FAIL_IF_NO_PEER_CERT = T.let(T.unsafe(nil), Integer) -# source://puma/lib/puma/minissl.rb#382 +# source://puma/lib/puma/minissl.rb#387 Puma::MiniSSL::VERIFY_NONE = T.let(T.unsafe(nil), Integer) -# source://puma/lib/puma/minissl.rb#383 +# source://puma/lib/puma/minissl.rb#388 Puma::MiniSSL::VERIFY_PEER = T.let(T.unsafe(nil), Integer) # Provides an IO-like object that always appears to contain no data. @@ -3112,14 +3158,14 @@ Puma::MiniSSL::VERIFY_PEER = T.let(T.unsafe(nil), Integer) # # source://puma/lib/puma/null_io.rb#7 class Puma::NullIO - # source://puma/lib/puma/null_io.rb#28 + # source://puma/lib/puma/null_io.rb#42 def close; end # This is used as singleton class, so can't have state. # # @return [Boolean] # - # source://puma/lib/puma/null_io.rb#57 + # source://puma/lib/puma/null_io.rb#71 def closed?; end # source://puma/lib/puma/null_io.rb#16 @@ -3127,39 +3173,39 @@ class Puma::NullIO # @return [Boolean] # - # source://puma/lib/puma/null_io.rb#35 + # source://puma/lib/puma/null_io.rb#49 def eof?; end - # source://puma/lib/puma/null_io.rb#52 + # source://puma/lib/puma/null_io.rb#66 def flush; end # source://puma/lib/puma/null_io.rb#8 def gets; end - # source://puma/lib/puma/null_io.rb#46 + # source://puma/lib/puma/null_io.rb#60 def puts(*ary); end # Mimics IO#read with no data. # # source://puma/lib/puma/null_io.rb#21 - def read(count = T.unsafe(nil), _buffer = T.unsafe(nil)); end + def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - # source://puma/lib/puma/null_io.rb#25 + # source://puma/lib/puma/null_io.rb#39 def rewind; end - # source://puma/lib/puma/null_io.rb#31 + # source://puma/lib/puma/null_io.rb#45 def size; end # source://puma/lib/puma/null_io.rb#12 def string; end - # source://puma/lib/puma/null_io.rb#39 + # source://puma/lib/puma/null_io.rb#53 def sync; end - # source://puma/lib/puma/null_io.rb#43 + # source://puma/lib/puma/null_io.rb#57 def sync=(v); end - # source://puma/lib/puma/null_io.rb#49 + # source://puma/lib/puma/null_io.rb#63 def write(*ary); end end @@ -3734,13 +3780,13 @@ class Puma::Server # source://puma/lib/puma/server.rb#68 def initialize(app, events = T.unsafe(nil), options = T.unsafe(nil)); end - # source://puma/lib/puma/server.rb#642 + # source://puma/lib/puma/server.rb#663 def add_ssl_listener(host, port, ctx, optimize_for_latency = T.unsafe(nil), backlog = T.unsafe(nil)); end - # source://puma/lib/puma/server.rb#638 + # source://puma/lib/puma/server.rb#659 def add_tcp_listener(host, port, optimize_for_latency = T.unsafe(nil), backlog = T.unsafe(nil)); end - # source://puma/lib/puma/server.rb#647 + # source://puma/lib/puma/server.rb#668 def add_unix_listener(path, umask = T.unsafe(nil), mode = T.unsafe(nil), backlog = T.unsafe(nil)); end # Returns the value of attribute app. @@ -3760,10 +3806,10 @@ class Puma::Server # source://puma/lib/puma/server.rb#42 def auto_trim_time; end - # source://puma/lib/puma/server.rb#206 + # source://puma/lib/puma/server.rb#210 def backlog; end - # source://puma/lib/puma/server.rb#614 + # source://puma/lib/puma/server.rb#635 def begin_restart(sync = T.unsafe(nil)); end # Returns the value of attribute binder. @@ -3780,22 +3826,22 @@ class Puma::Server # Handle various error types thrown by Client I/O operations. # - # source://puma/lib/puma/server.rb#507 + # source://puma/lib/puma/server.rb#528 def client_error(e, client, requests = T.unsafe(nil)); end # @return [Boolean] # - # source://puma/lib/puma/server.rb#200 + # source://puma/lib/puma/server.rb#204 def closed_socket?(socket); end - # source://puma/lib/puma/server.rb#652 + # source://puma/lib/puma/server.rb#673 def connected_ports; end # 6 == Socket::IPPROTO_TCP # 3 == TCP_CORK # 1/0 == turn on/off # - # source://puma/lib/puma/server.rb#173 + # source://puma/lib/puma/server.rb#177 def cork_socket(socket); end # @todo the following may be deprecated in the future @@ -3815,19 +3861,19 @@ class Puma::Server # Wait for all outstanding requests to finish. # - # source://puma/lib/puma/server.rb#557 + # source://puma/lib/puma/server.rb#578 def graceful_shutdown; end - # source://puma/lib/puma/server.rb#609 + # source://puma/lib/puma/server.rb#630 def halt(sync = T.unsafe(nil)); end - # source://puma/lib/puma/server.rb#389 + # source://puma/lib/puma/server.rb#410 def handle_check; end - # source://puma/lib/puma/server.rb#308 + # source://puma/lib/puma/server.rb#312 def handle_servers; end - # source://puma/lib/puma/server.rb#122 + # source://puma/lib/puma/server.rb#126 def inherit_binder(bind); end # @todo the following may be deprecated in the future @@ -3842,7 +3888,7 @@ class Puma::Server # A fallback rack response if +@app+ raises as exception. # - # source://puma/lib/puma/server.rb#529 + # source://puma/lib/puma/server.rb#550 def lowlevel_error(e, env, status = T.unsafe(nil)); end # for #stats @@ -3868,7 +3914,7 @@ class Puma::Server # a request. If one request comes in, then the # value would be 4 until it finishes processing. # - # source://puma/lib/puma/server.rb#224 + # source://puma/lib/puma/server.rb#228 def pool_capacity; end # Given a connection on +client+, handle the incoming requests, @@ -3882,7 +3928,7 @@ class Puma::Server # # Return true if one or more requests were processed. # - # source://puma/lib/puma/server.rb#417 + # source://puma/lib/puma/server.rb#438 def process_client(client); end # This method is called from the Reactor thread when a queued Client receives data, @@ -3911,7 +3957,7 @@ class Puma::Server # (return `false`). When the client sends more data to the socket the `Puma::Client` object # will wake up and again be checked to see if it's ready to be passed to the thread pool. # - # source://puma/lib/puma/server.rb#292 + # source://puma/lib/puma/server.rb#296 def reactor_wakeup(client); end # @todo the following may be deprecated in the future @@ -3930,28 +3976,28 @@ class Puma::Server # up in the background to handle requests. Otherwise requests # are handled synchronously. # - # source://puma/lib/puma/server.rb#234 + # source://puma/lib/puma/server.rb#238 def run(background = T.unsafe(nil), thread_name: T.unsafe(nil)); end - # source://puma/lib/puma/server.rb#211 + # source://puma/lib/puma/server.rb#215 def running; end # @return [Boolean] # - # source://puma/lib/puma/server.rb#619 + # source://puma/lib/puma/server.rb#640 def shutting_down?; end # Returns a hash of stats about the running server for reporting purposes. # # @version 5.0.0 # - # source://puma/lib/puma/server.rb#630 + # source://puma/lib/puma/server.rb#651 def stats; end # Stops the acceptor thread and then causes the worker threads to finish # off the request queue before finally exiting. # - # source://puma/lib/puma/server.rb#604 + # source://puma/lib/puma/server.rb#625 def stop(sync = T.unsafe(nil)); end # Returns the value of attribute thread. @@ -3959,25 +4005,25 @@ class Puma::Server # source://puma/lib/puma/server.rb#35 def thread; end - # source://puma/lib/puma/server.rb#176 + # source://puma/lib/puma/server.rb#180 def uncork_socket(socket); end # Triggers a client timeout if the thread-pool shuts down # during execution of the provided block. # - # source://puma/lib/puma/server.rb#498 + # source://puma/lib/puma/server.rb#519 def with_force_shutdown(client, &block); end private - # source://puma/lib/puma/server.rb#586 + # source://puma/lib/puma/server.rb#607 def notify_safely(message); end - # source://puma/lib/puma/server.rb#548 + # source://puma/lib/puma/server.rb#569 def response_to_error(client, requests, err, status_code); end class << self - # source://puma/lib/puma/server.rb#128 + # source://puma/lib/puma/server.rb#132 def current; end private @@ -3985,13 +4031,13 @@ class Puma::Server # @return [Boolean] # @version 5.0.0 # - # source://puma/lib/puma/server.rb#140 + # source://puma/lib/puma/server.rb#144 def closed_socket_supported?; end # @return [Boolean] # @version 5.0.0 # - # source://puma/lib/puma/server.rb#134 + # source://puma/lib/puma/server.rb#138 def tcp_cork_supported?; end end end @@ -4000,7 +4046,7 @@ end # # @version 5.0.0 # -# source://puma/lib/puma/server.rb#625 +# source://puma/lib/puma/server.rb#646 Puma::Server::STAT_METHODS = T.let(T.unsafe(nil), Array) # source://puma/lib/puma/server.rb#49 diff --git a/sorbet/rbi/gems/regexp_parser@2.8.3.rbi b/sorbet/rbi/gems/regexp_parser@2.9.0.rbi similarity index 97% rename from sorbet/rbi/gems/regexp_parser@2.8.3.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.0.rbi index 735007b1..2fa8dc31 100644 --- a/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.9.0.rbi @@ -94,6 +94,9 @@ end class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base # source://regexp_parser/lib/regexp_parser/expression/methods/human_name.rb#17 def human_name; end + + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#13 + def negative?; end end # source://regexp_parser/lib/regexp_parser/expression/classes/anchor.rb#13 @@ -127,12 +130,18 @@ end class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base # source://regexp_parser/lib/regexp_parser/expression/methods/human_name.rb#21 def human_name; end + + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#14 + def negative?; end end # source://regexp_parser/lib/regexp_parser/expression/classes/group.rb#71 class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base # source://regexp_parser/lib/regexp_parser/expression/methods/human_name.rb#22 def human_name; end + + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#15 + def negative?; end end # alias for symmetry between token symbol and Expression class name @@ -574,10 +583,10 @@ end class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # @return [CharacterSet] a new instance of CharacterSet # - # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#9 + # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#6 def initialize(token, options = T.unsafe(nil)); end - # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#19 + # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#16 def close; end # Returns the value of attribute closed. @@ -600,14 +609,9 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # source://regexp_parser/lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#15 + # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#12 def negate; end - # Returns the value of attribute negative. - # - # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#3 - def negated?; end - # Returns the value of attribute negative. # # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#3 @@ -620,9 +624,7 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#3 def negative=(_arg0); end - # Returns the value of attribute negative. - # - # source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#3 + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#16 def negative?; end # source://regexp_parser/lib/regexp_parser/expression/methods/parts.rb#15 @@ -686,6 +688,9 @@ end class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base # source://regexp_parser/lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end + + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#17 + def negative?; end end # source://regexp_parser/lib/regexp_parser/expression/classes/character_type.rb#6 @@ -1151,10 +1156,10 @@ end # source://regexp_parser/lib/regexp_parser/expression/methods/match_length.rb#85 Regexp::Expression::MatchLength = Regexp::MatchLength -# source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#14 +# source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#10 Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#121 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#118 Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty # source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#2 @@ -1162,23 +1167,21 @@ class Regexp::Expression::PosixClass < ::Regexp::Expression::Base # source://regexp_parser/lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#7 + # source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#3 def name; end - # @return [Boolean] - # - # source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#3 + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#18 def negative?; end end # alias for symmetry between token symbol and Expression class name # -# source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#13 +# source://regexp_parser/lib/regexp_parser/expression/classes/posix_class.rb#9 Regexp::Expression::Posixclass = Regexp::Expression::PosixClass # alias for symmetry between token symbol and Expression class name # -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#120 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#117 Regexp::Expression::Property = Regexp::Expression::UnicodeProperty # TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and @@ -1370,7 +1373,7 @@ end # alias for symmetry between token symbol and Expression class name # -# source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#25 +# source://regexp_parser/lib/regexp_parser/expression/classes/character_set.rb#22 Regexp::Expression::Set = Regexp::Expression::CharacterSet # source://regexp_parser/lib/regexp_parser/expression/shared.rb#2 @@ -1453,6 +1456,18 @@ module Regexp::Expression::Shared # source://regexp_parser/lib/regexp_parser/expression/methods/tests.rb#36 def is?(test_token, test_type = T.unsafe(nil)); end + # not an alias so as to respect overrides of #negative? + # + # @return [Boolean] + # + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#8 + def negated?; end + + # @return [Boolean] + # + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#3 + def negative?; end + # source://regexp_parser/lib/regexp_parser/expression/shared.rb#100 def nesting_level=(lvl); end @@ -1794,22 +1809,22 @@ end # source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#2 module Regexp::Expression::UnicodeProperty; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#112 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#108 class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#17 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#13 class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#18 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#14 class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#35 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#31 class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#19 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#15 class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#36 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#32 class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end # source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#3 @@ -1817,226 +1832,227 @@ class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base # source://regexp_parser/lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#8 + # source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#4 def name; end - # @return [Boolean] - # - # source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#4 + # source://regexp_parser/lib/regexp_parser/expression/methods/negative.rb#19 def negative?; end - # source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#12 + # source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#8 def shortcut; end end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#20 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#16 class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#116 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#109 class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#21 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#17 class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#101 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#97 module Regexp::Expression::UnicodeProperty::Codepoint; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#104 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#100 class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#102 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#98 class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#105 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#101 class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#106 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#102 class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#108 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#104 class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#107 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#103 class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#109 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#105 class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#113 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#110 class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#22 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#18 class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#114 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#111 class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#23 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#112 +class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#19 class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#38 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#34 module Regexp::Expression::UnicodeProperty::Letter; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#41 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#37 class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#39 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#35 class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#42 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#38 class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#44 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#40 class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#46 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#42 class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#47 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#43 class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#45 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#41 class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#43 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#39 class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#24 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#20 class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#50 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#46 module Regexp::Expression::UnicodeProperty::Mark; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#53 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#49 class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#51 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#47 class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#54 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#50 class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#57 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#53 class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#55 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#51 class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#56 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#52 class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#33 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#29 class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#60 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#56 module Regexp::Expression::UnicodeProperty::Number; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#63 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#59 class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#61 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#57 class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#64 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#60 class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#65 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#61 class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#66 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#62 class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#25 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#21 class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#26 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#22 class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#69 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#65 module Regexp::Expression::UnicodeProperty::Punctuation; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#72 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#68 class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#70 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#66 class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#76 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#72 class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#73 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#69 class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#74 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#70 class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#78 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#74 class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#77 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#73 class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#75 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#71 class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#79 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#75 class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#115 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#113 class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#82 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#78 module Regexp::Expression::UnicodeProperty::Separator; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#85 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#81 class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#83 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#79 class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#87 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#83 class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#88 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#84 class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#86 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#82 class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#27 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#23 class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#91 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#87 module Regexp::Expression::UnicodeProperty::Symbol; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#94 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#90 class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#92 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#88 class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#96 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#92 class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#95 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#91 class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#97 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#93 class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#98 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#94 class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#28 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#24 class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#29 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#25 class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#31 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#27 class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#30 +# source://regexp_parser/lib/regexp_parser/expression/classes/unicode_property.rb#26 class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end # source://regexp_parser/lib/regexp_parser/expression/classes/free_space.rb#11 @@ -2343,7 +2359,7 @@ class Regexp::Parser private - # source://regexp_parser/lib/regexp_parser/parser.rb#573 + # source://regexp_parser/lib/regexp_parser/parser.rb#574 def active_opts; end # source://regexp_parser/lib/regexp_parser/parser.rb#99 @@ -2356,7 +2372,7 @@ class Regexp::Parser # an instance of Backreference::Number, its #referenced_expression is set to # the instance of Group::Capture that it refers to via its number. # - # source://regexp_parser/lib/regexp_parser/parser.rb#580 + # source://regexp_parser/lib/regexp_parser/parser.rb#581 def assign_referenced_expressions; end # source://regexp_parser/lib/regexp_parser/parser.rb#227 @@ -2377,13 +2393,13 @@ class Regexp::Parser # source://regexp_parser/lib/regexp_parser/parser.rb#56 def captured_group_counts=(_arg0); end - # source://regexp_parser/lib/regexp_parser/parser.rb#569 + # source://regexp_parser/lib/regexp_parser/parser.rb#570 def close_completed_character_set_range; end # source://regexp_parser/lib/regexp_parser/parser.rb#210 def close_group; end - # source://regexp_parser/lib/regexp_parser/parser.rb#537 + # source://regexp_parser/lib/regexp_parser/parser.rb#538 def close_set; end # source://regexp_parser/lib/regexp_parser/parser.rb#269 @@ -2421,10 +2437,10 @@ class Regexp::Parser # source://regexp_parser/lib/regexp_parser/parser.rb#114 def group(token); end - # source://regexp_parser/lib/regexp_parser/parser.rb#508 + # source://regexp_parser/lib/regexp_parser/parser.rb#509 def increase_group_level(exp); end - # source://regexp_parser/lib/regexp_parser/parser.rb#548 + # source://regexp_parser/lib/regexp_parser/parser.rb#549 def intersection(token); end # source://regexp_parser/lib/regexp_parser/parser.rb#360 @@ -2436,7 +2452,7 @@ class Regexp::Parser # source://regexp_parser/lib/regexp_parser/parser.rb#368 def meta(token); end - # source://regexp_parser/lib/regexp_parser/parser.rb#533 + # source://regexp_parser/lib/regexp_parser/parser.rb#534 def negate_set; end # source://regexp_parser/lib/regexp_parser/parser.rb#299 @@ -2472,7 +2488,7 @@ class Regexp::Parser # source://regexp_parser/lib/regexp_parser/parser.rb#165 def open_group(token); end - # source://regexp_parser/lib/regexp_parser/parser.rb#526 + # source://regexp_parser/lib/regexp_parser/parser.rb#527 def open_set(token); end # source://regexp_parser/lib/regexp_parser/parser.rb#130 @@ -2499,10 +2515,10 @@ class Regexp::Parser # source://regexp_parser/lib/regexp_parser/parser.rb#397 def property(token); end - # source://regexp_parser/lib/regexp_parser/parser.rb#478 + # source://regexp_parser/lib/regexp_parser/parser.rb#479 def quantifier(token); end - # source://regexp_parser/lib/regexp_parser/parser.rb#541 + # source://regexp_parser/lib/regexp_parser/parser.rb#542 def range(token); end # Returns the value of attribute root. @@ -2520,7 +2536,7 @@ class Regexp::Parser # source://regexp_parser/lib/regexp_parser/parser.rb#379 def sequence_operation(klass, token); end - # source://regexp_parser/lib/regexp_parser/parser.rb#514 + # source://regexp_parser/lib/regexp_parser/parser.rb#515 def set(token); end # Returns the value of attribute switching_options. @@ -2538,7 +2554,7 @@ class Regexp::Parser # source://regexp_parser/lib/regexp_parser/parser.rb#198 def total_captured_group_count; end - # source://regexp_parser/lib/regexp_parser/parser.rb#552 + # source://regexp_parser/lib/regexp_parser/parser.rb#553 def type(token); end class << self @@ -3355,7 +3371,7 @@ Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) # alias for symmetry between token symbol and Token module name # -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#731 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#749 Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty # source://regexp_parser/lib/regexp_parser/syntax/token/quantifier.rb#3 @@ -3452,7 +3468,7 @@ Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#62 Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#721 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#739 Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#13 @@ -3503,7 +3519,7 @@ Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Ar # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#129 Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#706 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#724 Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#694 @@ -3512,7 +3528,13 @@ Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Arra # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#702 Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#724 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#722 +Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) + +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#706 +Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#742 Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#11 @@ -3554,7 +3576,7 @@ Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Arr # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#322 Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#723 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#741 Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#692 @@ -3590,40 +3612,40 @@ Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil # source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#670 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#708 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#726 Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#709 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#727 Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#710 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#728 Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#711 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#729 Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#712 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#730 Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#713 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#731 Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#714 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#732 Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#715 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#733 Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#716 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#734 Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#717 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#735 Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#718 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#736 Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#719 +# source://regexp_parser/lib/regexp_parser/syntax/token/unicode_property.rb#737 Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) # source://regexp_parser/lib/regexp_parser/syntax/version_lookup.rb#12 diff --git a/sorbet/rbi/gems/rubocop-minitest@0.34.3.rbi b/sorbet/rbi/gems/rubocop-minitest@0.34.4.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-minitest@0.34.3.rbi rename to sorbet/rbi/gems/rubocop-minitest@0.34.4.rbi index 104d6637..4b5199e3 100644 --- a/sorbet/rbi/gems/rubocop-minitest@0.34.3.rbi +++ b/sorbet/rbi/gems/rubocop-minitest@0.34.4.rbi @@ -1246,10 +1246,10 @@ class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base # source://rubocop-minitest/lib/rubocop/cop/minitest/multiple_assertions.rb#76 def assertions_count_in_assignment(node); end - # source://rubocop-minitest/lib/rubocop/cop/minitest/multiple_assertions.rb#84 + # source://rubocop-minitest/lib/rubocop/cop/minitest/multiple_assertions.rb#94 def assertions_count_in_branches(branches); end - # source://rubocop-minitest/lib/rubocop/cop/minitest/multiple_assertions.rb#88 + # source://rubocop-minitest/lib/rubocop/cop/minitest/multiple_assertions.rb#98 def max_assertions; end end @@ -1379,14 +1379,16 @@ class RuboCop::Cop::Minitest::NonExecutableTestMethod < ::RuboCop::Cop::Base # source://rubocop-minitest/lib/rubocop/cop/minitest/non_executable_test_method.rb#32 def on_def(node); end + private + # @return [Boolean] # - # source://rubocop-minitest/lib/rubocop/cop/minitest/non_executable_test_method.rb#45 + # source://rubocop-minitest/lib/rubocop/cop/minitest/non_executable_test_method.rb#47 def possible_test_class?(node); end # @return [Boolean] # - # source://rubocop-minitest/lib/rubocop/cop/minitest/non_executable_test_method.rb#39 + # source://rubocop-minitest/lib/rubocop/cop/minitest/non_executable_test_method.rb#41 def use_test_class?; end end diff --git a/sorbet/rbi/gems/ruby-lsp@0.13.2.rbi b/sorbet/rbi/gems/ruby-lsp@0.13.3.rbi similarity index 77% rename from sorbet/rbi/gems/ruby-lsp@0.13.2.rbi rename to sorbet/rbi/gems/ruby-lsp@0.13.3.rbi index d562ecd8..af67b7a9 100644 --- a/sorbet/rbi/gems/ruby-lsp@0.13.2.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.13.3.rbi @@ -360,7 +360,7 @@ class RubyIndexer::Entry::Parameter # # @return [Symbol] # - # source://sorbet-runtime/0.5.11164lib/types/private/methods/_methods.rb#252 + # source://sorbet-runtime/0.5.11180lib/types/private/methods/_methods.rb#252 def decorated_name(*args, **_arg1, &blk); end # Name includes just the name of the parameter, excluding symbols like splats @@ -843,7 +843,7 @@ class RubyLsp::DependencyDetector sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/requests/support/dependency_detector.rb#68 + # source://ruby-lsp/lib/ruby_lsp/requests/support/dependency_detector.rb#70 sig { returns(T::Array[::String]) } def dependencies; end @@ -871,7 +871,7 @@ class RubyLsp::DependencyDetector sig { params(gem_pattern: ::Regexp).returns(T::Boolean) } def direct_dependency?(gem_pattern); end - # source://ruby-lsp/lib/ruby_lsp/requests/support/dependency_detector.rb#81 + # source://ruby-lsp/lib/ruby_lsp/requests/support/dependency_detector.rb#83 sig { returns(T::Array[::String]) } def gemspec_dependencies; end @@ -966,6 +966,10 @@ class RubyLsp::Document sig { params(edits: T::Array[T::Hash[::Symbol, T.untyped]], version: ::Integer).void } def push_edits(edits, version:); end + # source://ruby-lsp/lib/ruby_lsp/document.rb#177 + sig { returns(T::Boolean) } + def sorbet_sigil_is_true_or_higher; end + # source://ruby-lsp/lib/ruby_lsp/document.rb#15 sig { returns(::String) } def source; end @@ -978,6 +982,10 @@ class RubyLsp::Document sig { returns(::Prism::ProgramNode) } def tree; end + # source://ruby-lsp/lib/ruby_lsp/document.rb#184 + sig { returns(T::Boolean) } + def typechecker_enabled?; end + # source://ruby-lsp/lib/ruby_lsp/document.rb#21 sig { returns(::URI::Generic) } def uri; end @@ -987,32 +995,32 @@ class RubyLsp::Document def version; end end -# source://ruby-lsp/lib/ruby_lsp/document.rb#176 +# source://ruby-lsp/lib/ruby_lsp/document.rb#188 class RubyLsp::Document::Scanner - # source://ruby-lsp/lib/ruby_lsp/document.rb#184 + # source://ruby-lsp/lib/ruby_lsp/document.rb#196 sig { params(source: ::String, encoding: ::String).void } def initialize(source, encoding); end # Finds the character index inside the source string for a given line and column # - # source://ruby-lsp/lib/ruby_lsp/document.rb#193 + # source://ruby-lsp/lib/ruby_lsp/document.rb#205 sig { params(position: T::Hash[::Symbol, T.untyped]).returns(::Integer) } def find_char_position(position); end # Subtract 1 for each character after 0xFFFF in the current line from the column position, so that we hit the # right character in the UTF-8 representation # - # source://ruby-lsp/lib/ruby_lsp/document.rb#215 + # source://ruby-lsp/lib/ruby_lsp/document.rb#227 sig { params(current_position: ::Integer, requested_position: ::Integer).returns(::Integer) } def utf_16_character_position_correction(current_position, requested_position); end end -# source://ruby-lsp/lib/ruby_lsp/document.rb#179 +# source://ruby-lsp/lib/ruby_lsp/document.rb#191 RubyLsp::Document::Scanner::LINE_BREAK = T.let(T.unsafe(nil), Integer) # After character 0xFFFF, UTF-16 considers characters to have length 2 and we have to account for that # -# source://ruby-lsp/lib/ruby_lsp/document.rb#181 +# source://ruby-lsp/lib/ruby_lsp/document.rb#193 RubyLsp::Document::Scanner::SURROGATE_PAIR_START = T.let(T.unsafe(nil), Integer) # This class dispatches a request execution to the right request class. No IO should happen anywhere here! @@ -1029,15 +1037,15 @@ class RubyLsp::Executor private - # source://ruby-lsp/lib/ruby_lsp/executor.rb#564 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#438 sig { params(id: ::String, title: ::String, percentage: ::Integer).void } def begin_progress(id, title, percentage: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#805 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#616 sig { void } def check_formatter_is_available; end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#449 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#374 sig do params( uri: ::URI::Generic, @@ -1047,29 +1055,11 @@ class RubyLsp::Executor end def code_action(uri, range, context); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#456 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#381 sig { params(params: T::Hash[::Symbol, T.untyped]).returns(::LanguageServer::Protocol::Interface::CodeAction) } def code_action_resolve(params); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#518 - sig do - params( - uri: ::URI::Generic, - position: T::Hash[::Symbol, T.untyped] - ).returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::CompletionItem])) - end - def completion(uri, position); end - - # source://ruby-lsp/lib/ruby_lsp/executor.rb#294 - sig do - params( - uri: ::URI::Generic, - position: T::Hash[::Symbol, T.untyped] - ).returns(T.nilable(T.any(::LanguageServer::Protocol::Interface::Location, T::Array[::LanguageServer::Protocol::Interface::Location]))) - end - def definition(uri, position); end - - # source://ruby-lsp/lib/ruby_lsp/executor.rb#486 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#411 sig do params( uri: ::URI::Generic @@ -1077,50 +1067,23 @@ class RubyLsp::Executor end def diagnostic(uri); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#189 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#231 sig { params(changes: T::Array[{uri: ::String, type: ::Integer}]).returns(::Object) } def did_change_watched_files(changes); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#413 - sig do - params( - uri: ::URI::Generic, - position: T::Hash[::Symbol, T.untyped] - ).returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::DocumentHighlight])) - end - def document_highlight(uri, position); end - - # source://ruby-lsp/lib/ruby_lsp/executor.rb#604 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#478 sig { params(id: ::String).void } def end_progress(id); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#384 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#344 sig { params(uri: ::URI::Generic).returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::TextEdit])) } def formatting(uri); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#315 - sig do - params( - uri: ::URI::Generic, - position: T::Hash[::Symbol, T.untyped] - ).returns(T.nilable(::LanguageServer::Protocol::Interface::Hover)) - end - def hover(uri, position); end - - # source://ruby-lsp/lib/ruby_lsp/executor.rb#620 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#494 sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T::Hash[::Symbol, T.untyped]) } def initialize_request(options); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#429 - sig do - params( - uri: ::URI::Generic, - range: T::Hash[::Symbol, T.untyped] - ).returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::InlayHint])) - end - def inlay_hint(uri, range); end - - # source://ruby-lsp/lib/ruby_lsp/executor.rb#403 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#363 sig do params( uri: ::URI::Generic, @@ -1130,11 +1093,11 @@ class RubyLsp::Executor end def on_type_formatting(uri, position, character); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#214 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#256 sig { void } def perform_initial_indexing; end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#587 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#461 sig { params(id: ::String, percentage: ::Integer).void } def progress(id, percentage); end @@ -1142,7 +1105,7 @@ class RubyLsp::Executor sig { params(request: T::Hash[::Symbol, T.untyped]).returns(T.untyped) } def run(request); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#364 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#324 sig do params( uri: ::URI::Generic, @@ -1151,7 +1114,7 @@ class RubyLsp::Executor end def selection_range(uri, positions); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#500 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#425 sig do params( uri: ::URI::Generic, @@ -1160,21 +1123,11 @@ class RubyLsp::Executor end def semantic_tokens_range(uri, range); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#284 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#294 sig { params(uri: ::URI::Generic, range: T.nilable(T::Hash[::Symbol, T.untyped])).returns({ast: ::String}) } def show_syntax_tree(uri, range); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#253 - sig do - params( - uri: ::URI::Generic, - position: T::Hash[::Symbol, T.untyped], - context: T::Hash[::Symbol, T.untyped] - ).returns(T.nilable(T.any(::LanguageServer::Protocol::Interface::SignatureHelp, T::Hash[::Symbol, T.untyped]))) - end - def signature_help(uri, position, context); end - - # source://ruby-lsp/lib/ruby_lsp/executor.rb#341 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#301 sig do params( uri: ::URI::Generic, @@ -1184,86 +1137,42 @@ class RubyLsp::Executor end def text_document_did_change(uri, content_changes, version); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#353 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#313 sig { params(uri: ::URI::Generic).returns(::Object) } def text_document_did_close(uri); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#347 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#307 sig { params(uri: ::URI::Generic, text: ::String, version: ::Integer).returns(::Object) } def text_document_did_open(uri, text, version); end - # source://ruby-lsp/lib/ruby_lsp/executor.rb#279 + # source://ruby-lsp/lib/ruby_lsp/executor.rb#289 sig { params(query: T.nilable(::String)).returns(T::Array[::LanguageServer::Protocol::Interface::WorkspaceSymbol]) } def workspace_symbol(query); end end -# ExtensibleListener is an abstract class to be used by requests that accept addons. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://ruby-lsp/lib/ruby_lsp/listener.rb#34 -class RubyLsp::ExtensibleListener < ::RubyLsp::Listener - extend T::Generic - - abstract! - - ResponseType = type_member - - # When inheriting from ExtensibleListener, the `super` of constructor must be called **after** the subclass's own - # ivars have been initialized. This is because the constructor of ExtensibleListener calls - # `initialize_external_listener` which may depend on the subclass's ivars. - # - # source://ruby-lsp/lib/ruby_lsp/listener.rb#46 - sig { params(dispatcher: ::Prism::Dispatcher).void } - def initialize(dispatcher); end - - # @abstract - # - # source://ruby-lsp/lib/ruby_lsp/listener.rb#73 - sig { abstract.params(addon: ::RubyLsp::Addon).returns(T.nilable(RubyLsp::Listener[ResponseType])) } - def initialize_external_listener(addon); end - - # Merge responses from all external listeners into the base listener's response. We do this to return a single - # response to the editor including the results of all addons - # - # source://ruby-lsp/lib/ruby_lsp/listener.rb#60 - sig { void } - def merge_external_listeners_responses!; end - - # Does nothing by default. Requests that accept addons should override this method to define how to merge responses - # coming from external listeners - # - # @abstract - # - # source://ruby-lsp/lib/ruby_lsp/listener.rb#78 - sig { abstract.params(other: RubyLsp::Listener[T.untyped]).returns(T.self_type) } - def merge_response!(other); end - - # source://ruby-lsp/lib/ruby_lsp/listener.rb#65 - sig { returns(ResponseType) } - def response; end -end +# source://ruby-lsp/lib/ruby_lsp/utils.rb#15 +RubyLsp::GEMFILE_NAME = T.let(T.unsafe(nil), String) # source://ruby-lsp/lib/ruby_lsp/server.rb#6 RubyLsp::Interface = LanguageServer::Protocol::Interface # A request that will sit in the queue until it's executed # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#57 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#65 class RubyLsp::Job - # source://ruby-lsp/lib/ruby_lsp/utils.rb#67 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#75 sig { params(request: T::Hash[::Symbol, T.untyped], cancelled: T::Boolean).void } def initialize(request:, cancelled:); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#73 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#81 sig { void } def cancel; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#64 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#72 sig { returns(T::Boolean) } def cancelled; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#61 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#69 sig { returns(T::Hash[::Symbol, T.untyped]) } def request; end end @@ -1291,405 +1200,151 @@ class RubyLsp::Listener # # @abstract # - # source://ruby-lsp/lib/ruby_lsp/listener.rb#30 + # source://ruby-lsp/lib/ruby_lsp/listener.rb#31 sig { abstract.returns(ResponseType) } def _response; end - # source://ruby-lsp/lib/ruby_lsp/listener.rb#23 + # source://ruby-lsp/lib/ruby_lsp/listener.rb#24 sig { returns(ResponseType) } def response; end end -# A notification to be sent to the client -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://ruby-lsp/lib/ruby_lsp/utils.rb#17 -class RubyLsp::Message - abstract! +# source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#5 +module RubyLsp::Listeners; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#30 - sig { params(message: ::String, params: ::Object).void } - def initialize(message:, params:); end +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#9 +class RubyLsp::Listeners::CodeLens < ::RubyLsp::Listener + extend T::Generic - # source://ruby-lsp/lib/ruby_lsp/utils.rb#24 - sig { returns(::String) } - def message; end + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::CodeLens] } } - # source://ruby-lsp/lib/ruby_lsp/utils.rb#27 - sig { returns(::Object) } - def params; end -end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#37 + sig do + params( + uri: ::URI::Generic, + lenses_configuration: ::RubyLsp::RequestConfig, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(uri, lenses_configuration, dispatcher); end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#36 -class RubyLsp::Notification < ::RubyLsp::Message; end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#28 + sig { override.returns(ResponseType) } + def _response; end -# source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#5 -class RubyLsp::ParameterScope - # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#12 - sig { params(parent: T.nilable(::RubyLsp::ParameterScope)).void } - def initialize(parent = T.unsafe(nil)); end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#106 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#18 - sig { params(name: T.any(::String, ::Symbol)).void } - def <<(name); end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#137 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#28 - sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } - def parameter?(name); end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#61 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#9 - sig { returns(T.nilable(::RubyLsp::ParameterScope)) } - def parent; end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#80 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#23 - sig { params(name: T.any(::String, ::Symbol)).returns(::Symbol) } - def type_for(name); end -end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#87 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#37 -class RubyLsp::Request < ::RubyLsp::Message; end + private -# A request configuration, to turn on/off features -# -# source://ruby-lsp/lib/ruby_lsp/utils.rb#79 -class RubyLsp::RequestConfig - # source://ruby-lsp/lib/ruby_lsp/utils.rb#86 - sig { params(configuration: T::Hash[::Symbol, T::Boolean]).void } - def initialize(configuration); end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#222 + sig { params(node: ::Prism::CallNode, remote: ::String).void } + def add_open_gem_remote_code_lens(node, remote); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#83 - sig { returns(T::Hash[::Symbol, T::Boolean]) } - def configuration; end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#145 + sig { params(node: ::Prism::Node, name: ::String, command: ::String, kind: ::Symbol).void } + def add_test_code_lens(node, name:, command:, kind:); end - # @return [Hash{Symbol => Boolean}] - # - # source://ruby-lsp/lib/ruby_lsp/utils.rb#83 - def configuration=(_arg0); end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#200 + sig { params(class_name: ::String, method_name: T.nilable(::String)).returns(::String) } + def generate_test_command(class_name:, method_name: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#91 - sig { params(feature: ::Symbol).returns(T.nilable(T::Boolean)) } - def enabled?(feature); end + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#190 + sig { params(gem_name: ::Prism::StringNode).returns(T.nilable(::String)) } + def resolve_gem_remote(gem_name); end end -# Supported features -# -# - [DocumentSymbol](rdoc-ref:RubyLsp::Requests::DocumentSymbol) -# - [DocumentLink](rdoc-ref:RubyLsp::Requests::DocumentLink) -# - [Hover](rdoc-ref:RubyLsp::Requests::Hover) -# - [FoldingRange](rdoc-ref:RubyLsp::Requests::FoldingRanges) -# - [SelectionRange](rdoc-ref:RubyLsp::Requests::SelectionRanges) -# - [SemanticHighlighting](rdoc-ref:RubyLsp::Requests::SemanticHighlighting) -# - [Formatting](rdoc-ref:RubyLsp::Requests::Formatting) -# - [OnTypeFormatting](rdoc-ref:RubyLsp::Requests::OnTypeFormatting) -# - [Diagnostic](rdoc-ref:RubyLsp::Requests::Diagnostics) -# - [CodeAction](rdoc-ref:RubyLsp::Requests::CodeActions) -# - [CodeActionResolve](rdoc-ref:RubyLsp::Requests::CodeActionResolve) -# - [DocumentHighlight](rdoc-ref:RubyLsp::Requests::DocumentHighlight) -# - [InlayHint](rdoc-ref:RubyLsp::Requests::InlayHints) -# - [Completion](rdoc-ref:RubyLsp::Requests::Completion) -# - [CodeLens](rdoc-ref:RubyLsp::Requests::CodeLens) -# - [Definition](rdoc-ref:RubyLsp::Requests::Definition) -# - [ShowSyntaxTree](rdoc-ref:RubyLsp::Requests::ShowSyntaxTree) -# - [WorkspaceSymbol](rdoc-ref:RubyLsp::Requests::WorkspaceSymbol) -# - [SignatureHelp](rdoc-ref:RubyLsp::Requests::SignatureHelp) -# -# source://ruby-lsp/lib/ruby_lsp/requests.rb#27 -module RubyLsp::Requests; end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://ruby-lsp/lib/ruby_lsp/requests/base_request.rb#7 -class RubyLsp::Requests::BaseRequest < ::Prism::Visitor - include ::RubyLsp::Requests::Support::Common +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#22 +RubyLsp::Listeners::CodeLens::ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) - abstract! +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#13 +RubyLsp::Listeners::CodeLens::BASE_COMMAND = T.let(T.unsafe(nil), String) - # source://ruby-lsp/lib/ruby_lsp/requests/base_request.rb#15 - sig { params(document: ::RubyLsp::Document).void } - def initialize(document); end +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#23 +RubyLsp::Listeners::CodeLens::SUPPORTED_TEST_LIBRARIES = T.let(T.unsafe(nil), Array) - # @abstract - # - # source://ruby-lsp/lib/ruby_lsp/requests/base_request.rb#21 - sig { abstract.returns(::Object) } - def run; end -end +# source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#6 +class RubyLsp::Listeners::Completion < ::RubyLsp::Listener + extend T::Generic -# ![Code action resolve demo](../../code_action_resolve.gif) -# -# The [code action resolve](https://microsoft.github.io/language-server-protocol/specification#codeAction_resolve) -# request is used to to resolve the edit field for a given code action, if it is not already provided in the -# textDocument/codeAction response. We can use it for scenarios that require more computation such as refactoring. -# -# # Example: Extract to variable -# -# ```ruby -# # Before: -# 1 + 1 # Select the text and use Refactor: Extract Variable -# -# # After: -# new_variable = 1 + 1 -# new_variable -# -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#24 -class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::BaseRequest - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#38 - sig { params(document: ::RubyLsp::Document, code_action: T::Hash[::Symbol, T.untyped]).void } - def initialize(document, code_action); end + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::CompletionItem] } } - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#45 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#23 sig do - override - .returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) + params( + index: ::RubyIndexer::Index, + nesting: T::Array[::String], + typechecker_enabled: T::Boolean, + dispatcher: ::Prism::Dispatcher + ).void end - def run; end + def initialize(index, nesting, typechecker_enabled, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#13 + sig { override.returns(ResponseType) } + def _response; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#110 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # Handle completion on namespaced constant references (e.g. `Foo::Bar`) + # + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#67 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # Handle completion on regular constant references (e.g. `Bar`) + # + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#48 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#40 + sig { params(node: ::Prism::StringNode).void } + def on_string_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#141 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#155 sig do params( - range: T::Hash[::Symbol, T.untyped], - new_text: ::String - ).returns(::LanguageServer::Protocol::Interface::TextEdit) + label: ::String, + node: ::Prism::StringNode + ).returns(::LanguageServer::Protocol::Interface::CompletionItem) end - def create_text_edit(range, new_text); end -end - -# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#28 -class RubyLsp::Requests::CodeActionResolve::CodeActionError < ::StandardError; end + def build_completion(label, node); end -# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#30 -class RubyLsp::Requests::CodeActionResolve::Error < ::T::Enum - enums do - EmptySelection = new - InvalidTargetRange = new - end -end - -# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#26 -RubyLsp::Requests::CodeActionResolve::NEW_VARIABLE_NAME = T.let(T.unsafe(nil), String) - -# ![Code actions demo](../../code_actions.gif) -# -# The [code actions](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction) -# request informs the editor of RuboCop quick fixes that can be applied. These are accessible by hovering over a -# specific diagnostic. -# -# # Example -# -# ```ruby -# def say_hello -# puts "Hello" # --> code action: quick fix indentation -# end -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#19 -class RubyLsp::Requests::CodeActions < ::RubyLsp::Requests::BaseRequest - # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#29 - sig do - params( - document: ::RubyLsp::Document, - range: T::Hash[::Symbol, T.untyped], - context: T::Hash[::Symbol, T.untyped] - ).void - end - def initialize(document, range, context); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#38 - sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::CodeAction]))) } - def run; end - - private - - # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#53 - sig do - params( - range: T::Hash[::Symbol, T.untyped], - uri: ::URI::Generic - ).returns(::LanguageServer::Protocol::Interface::CodeAction) - end - def refactor_code_action(range, uri); end -end - -# ![Code lens demo](../../code_lens.gif) -# -# The -# [code lens](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens) -# request informs the editor of runnable commands such as tests -# -# # Configuration -# -# To disable gem code lenses, set `rubyLsp.featuresConfiguration.codeLens.gemfileLinks` to `false`. -# -# # Example -# -# ```ruby -# # Run -# class Test < Minitest::Test -# end -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#25 -class RubyLsp::Requests::CodeLens < ::RubyLsp::ExtensibleListener - extend T::Generic - - ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::CodeLens] } } - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#61 - sig do - params( - uri: ::URI::Generic, - lenses_configuration: ::RubyLsp::RequestConfig, - dispatcher: ::Prism::Dispatcher - ).void - end - def initialize(uri, lenses_configuration, dispatcher); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#52 - sig { override.returns(ResponseType) } - def _response; end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#167 - sig { override.params(addon: ::RubyLsp::Addon).returns(T.nilable(RubyLsp::Listener[ResponseType])) } - def initialize_external_listener(addon); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#172 - sig { override.params(other: RubyLsp::Listener[ResponseType]).returns(T.self_type) } - def merge_response!(other); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#130 - sig { params(node: ::Prism::CallNode).void } - def on_call_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#161 - sig { params(node: ::Prism::CallNode).void } - def on_call_node_leave(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#85 - sig { params(node: ::Prism::ClassNode).void } - def on_class_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#104 - sig { params(node: ::Prism::ClassNode).void } - def on_class_node_leave(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#111 - sig { params(node: ::Prism::DefNode).void } - def on_def_node_enter(node); end - - private - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#257 - sig { params(node: ::Prism::CallNode, remote: ::String).void } - def add_open_gem_remote_code_lens(node, remote); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#180 - sig { params(node: ::Prism::Node, name: ::String, command: ::String, kind: ::Symbol).void } - def add_test_code_lens(node, name:, command:, kind:); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#235 - sig { params(class_name: ::String, method_name: T.nilable(::String)).returns(::String) } - def generate_test_command(class_name:, method_name: T.unsafe(nil)); end - - # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#225 - sig { params(gem_name: ::Prism::StringNode).returns(T.nilable(::String)) } - def resolve_gem_remote(gem_name); end -end - -# source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#48 -RubyLsp::Requests::CodeLens::ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) - -# source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#31 -RubyLsp::Requests::CodeLens::BASE_COMMAND = T.let(T.unsafe(nil), String) - -# source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#40 -RubyLsp::Requests::CodeLens::GEMFILE_NAME = T.let(T.unsafe(nil), String) - -# source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#49 -RubyLsp::Requests::CodeLens::SUPPORTED_TEST_LIBRARIES = T.let(T.unsafe(nil), Array) - -# ![Completion demo](../../completion.gif) -# -# The [completion](https://microsoft.github.io/language-server-protocol/specification#textDocument_completion) -# suggests possible completions according to what the developer is typing. -# -# Currently supported targets: -# - Classes -# - Modules -# - Constants -# - Require paths -# - Methods invoked on self only -# -# # Example -# -# ```ruby -# require "ruby_lsp/requests" # --> completion: suggests `base_request`, `code_actions`, ... -# -# RubyLsp::Requests:: # --> completion: suggests `Completion`, `Hover`, ... -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#25 -class RubyLsp::Requests::Completion < ::RubyLsp::Listener - extend T::Generic - - ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::CompletionItem] } } - - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#41 - sig { params(index: ::RubyIndexer::Index, nesting: T::Array[::String], dispatcher: ::Prism::Dispatcher).void } - def initialize(index, nesting, dispatcher); end - - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#32 - sig { override.returns(ResponseType) } - def _response; end - - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#127 - sig { params(node: ::Prism::CallNode).void } - def on_call_node_enter(node); end - - # Handle completion on namespaced constant references (e.g. `Foo::Bar`) - # - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#84 - sig { params(node: ::Prism::ConstantPathNode).void } - def on_constant_path_node_enter(node); end - - # Handle completion on regular constant references (e.g. `Bar`) - # - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#65 - sig { params(node: ::Prism::ConstantReadNode).void } - def on_constant_read_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#57 - sig { params(node: ::Prism::StringNode).void } - def on_string_node_enter(node); end - - private - - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#171 - sig do - params( - label: ::String, - node: ::Prism::StringNode - ).returns(::LanguageServer::Protocol::Interface::CompletionItem) - end - def build_completion(label, node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#194 - sig do - params( - real_name: ::String, - incomplete_name: ::String, - node: ::Prism::Node, - entries: T::Array[::RubyIndexer::Entry], - top_level: T::Boolean - ).returns(::LanguageServer::Protocol::Interface::CompletionItem) + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#178 + sig do + params( + real_name: ::String, + incomplete_name: ::String, + node: ::Prism::Node, + entries: T::Array[::RubyIndexer::Entry], + top_level: T::Boolean + ).returns(::LanguageServer::Protocol::Interface::CompletionItem) end def build_entry_completion(real_name, incomplete_name, node, entries, top_level); end - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#155 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#138 sig do params( entry: ::RubyIndexer::Entry::Member, @@ -1713,145 +1368,67 @@ class RubyLsp::Requests::Completion < ::RubyLsp::Listener # end # ``` # - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#278 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#262 sig { params(entry_name: ::String).returns(T::Boolean) } def top_level?(entry_name); end end -# ![Definition demo](../../definition.gif) -# -# The [definition -# request](https://microsoft.github.io/language-server-protocol/specification#textDocument_definition) jumps to the -# definition of the symbol under the cursor. -# -# Currently supported targets: -# - Classes -# - Modules -# - Constants -# - Require paths -# - Methods invoked on self only -# -# # Example -# -# ```ruby -# require "some_gem/file" # <- Request go to definition on this string will take you to the file -# Product.new # <- Request go to definition on this class name will take you to its declaration. -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#25 -class RubyLsp::Requests::Definition < ::RubyLsp::ExtensibleListener +# source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#6 +class RubyLsp::Listeners::Definition < ::RubyLsp::Listener extend T::Generic ResponseType = type_member { { fixed: T.nilable(T.any(::LanguageServer::Protocol::Interface::Location, T::Array[::LanguageServer::Protocol::Interface::Location])) } } - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#42 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#24 sig do params( uri: ::URI::Generic, nesting: T::Array[::String], index: ::RubyIndexer::Index, - dispatcher: ::Prism::Dispatcher + dispatcher: ::Prism::Dispatcher, + typechecker_enabled: T::Boolean ).void end - def initialize(uri, nesting, index, dispatcher); end + def initialize(uri, nesting, index, dispatcher, typechecker_enabled); end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#32 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#13 sig { override.returns(ResponseType) } def _response; end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#59 - sig { override.params(addon: ::RubyLsp::Addon).returns(T.nilable(RubyLsp::Listener[ResponseType])) } - def initialize_external_listener(addon); end - - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#64 - sig { override.params(other: RubyLsp::Listener[ResponseType]).returns(T.self_type) } - def merge_response!(other); end - - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#80 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#42 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#91 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#53 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#96 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#58 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#168 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#130 sig { params(value: ::String).void } def find_in_index(value); end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#103 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#65 sig { params(node: ::Prism::CallNode).void } def handle_method_definition(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#126 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#88 sig { params(node: ::Prism::CallNode).void } def handle_require_definition(node); end end -# ![Diagnostics demo](../../diagnostics.gif) -# -# The -# [diagnostics](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics) -# request informs the editor of RuboCop offenses for a given file. -# -# # Example -# -# ```ruby -# def say_hello -# puts "Hello" # --> diagnostics: incorrect indentation -# end -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#21 -class RubyLsp::Requests::Diagnostics < ::RubyLsp::Requests::BaseRequest - # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#25 - sig { params(document: ::RubyLsp::Document).void } - def initialize(document); end - - # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#32 - sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::Diagnostic]))) } - def run; end - - private - - # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#43 - sig { returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::Diagnostic])) } - def syntax_error_diagnostics; end -end - -# ![Document highlight demo](../../document_highlight.gif) -# -# The [document highlight](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight) -# informs the editor all relevant elements of the currently pointed item for highlighting. For example, when -# the cursor is on the `F` of the constant `FOO`, the editor should identify other occurrences of `FOO` -# and highlight them. -# -# For writable elements like constants or variables, their read/write occurrences should be highlighted differently. -# This is achieved by sending different "kind" attributes to the editor (2 for read and 3 for write). -# -# # Example -# -# ```ruby -# FOO = 1 # should be highlighted as "write" -# -# def foo -# FOO # should be highlighted as "read" -# end -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#25 -class RubyLsp::Requests::DocumentHighlight < ::RubyLsp::Listener +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#6 +class RubyLsp::Listeners::DocumentHighlight < ::RubyLsp::Listener extend T::Generic ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::DocumentHighlight] } } - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#119 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#100 sig do params( target: T.nilable(::Prism::Node), @@ -1861,282 +1438,268 @@ class RubyLsp::Requests::DocumentHighlight < ::RubyLsp::Listener end def initialize(target, parent, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#110 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#91 sig { override.returns(ResponseType) } def _response; end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#260 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#241 sig { params(node: ::Prism::BlockParameterNode).void } def on_block_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#204 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#185 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#274 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#255 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#444 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#425 sig { params(node: ::Prism::ClassVariableAndWriteNode).void } def on_class_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#437 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#418 sig { params(node: ::Prism::ClassVariableOperatorWriteNode).void } def on_class_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#430 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#411 sig { params(node: ::Prism::ClassVariableOrWriteNode).void } def on_class_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#316 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#297 sig { params(node: ::Prism::ClassVariableReadNode).void } def on_class_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#246 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#227 sig { params(node: ::Prism::ClassVariableTargetNode).void } def on_class_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#423 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#404 sig { params(node: ::Prism::ClassVariableWriteNode).void } def on_class_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#500 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#481 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#465 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#446 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#458 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#439 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#344 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#325 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#295 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#276 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#351 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#332 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#337 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#318 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#232 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#213 sig { params(node: ::Prism::ConstantPathTargetNode).void } def on_constant_path_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#330 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#311 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#302 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#283 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#239 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#220 sig { params(node: ::Prism::ConstantTargetNode).void } def on_constant_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#451 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#432 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#211 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#192 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#521 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#502 sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } def on_global_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#528 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#509 sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } def on_global_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#514 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#495 sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } def on_global_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#323 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#304 sig { params(node: ::Prism::GlobalVariableReadNode).void } def on_global_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#218 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#199 sig { params(node: ::Prism::GlobalVariableTargetNode).void } def on_global_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#507 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#488 sig { params(node: ::Prism::GlobalVariableWriteNode).void } def on_global_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#486 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#467 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#493 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#474 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#479 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#460 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#309 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#290 sig { params(node: ::Prism::InstanceVariableReadNode).void } def on_instance_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#225 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#206 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#472 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#453 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#394 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#375 sig { params(node: ::Prism::KeywordRestParameterNode).void } def on_keyword_rest_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#402 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#383 sig { params(node: ::Prism::LocalVariableAndWriteNode).void } def on_local_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#409 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#390 sig { params(node: ::Prism::LocalVariableOperatorWriteNode).void } def on_local_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#416 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#397 sig { params(node: ::Prism::LocalVariableOrWriteNode).void } def on_local_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#288 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#269 sig { params(node: ::Prism::LocalVariableReadNode).void } def on_local_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#253 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#234 sig { params(node: ::Prism::LocalVariableTargetNode).void } def on_local_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#358 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#339 sig { params(node: ::Prism::LocalVariableWriteNode).void } def on_local_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#281 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#262 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#372 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#353 sig { params(node: ::Prism::OptionalKeywordParameterNode).void } def on_optional_keyword_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#387 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#368 sig { params(node: ::Prism::OptionalParameterNode).void } def on_optional_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#365 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#346 sig { params(node: ::Prism::RequiredKeywordParameterNode).void } def on_required_keyword_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#267 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#248 sig { params(node: ::Prism::RequiredParameterNode).void } def on_required_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#379 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#360 sig { params(node: ::Prism::RestParameterNode).void } def on_rest_parameter_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#542 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#523 sig { params(kind: ::Integer, location: ::Prism::Location).void } def add_highlight(kind, location); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#537 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#518 sig { params(node: ::Prism::Node, classes: T::Array[T.class_of(Prism::Node)]).returns(T.nilable(T::Boolean)) } def matches?(node, classes); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#547 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#528 sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } def node_value(node); end end -# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#78 -RubyLsp::Requests::DocumentHighlight::CLASS_VARIABLE_NODES = T.let(T.unsafe(nil), Array) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#59 +RubyLsp::Listeners::DocumentHighlight::CLASS_VARIABLE_NODES = T.let(T.unsafe(nil), Array) -# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#54 -RubyLsp::Requests::DocumentHighlight::CONSTANT_NODES = T.let(T.unsafe(nil), Array) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#35 +RubyLsp::Listeners::DocumentHighlight::CONSTANT_NODES = T.let(T.unsafe(nil), Array) -# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#66 -RubyLsp::Requests::DocumentHighlight::CONSTANT_PATH_NODES = T.let(T.unsafe(nil), Array) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#47 +RubyLsp::Listeners::DocumentHighlight::CONSTANT_PATH_NODES = T.let(T.unsafe(nil), Array) -# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#30 -RubyLsp::Requests::DocumentHighlight::GLOBAL_VARIABLE_NODES = T.let(T.unsafe(nil), Array) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#11 +RubyLsp::Listeners::DocumentHighlight::GLOBAL_VARIABLE_NODES = T.let(T.unsafe(nil), Array) -# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#42 -RubyLsp::Requests::DocumentHighlight::INSTANCE_VARIABLE_NODES = T.let(T.unsafe(nil), Array) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#23 +RubyLsp::Listeners::DocumentHighlight::INSTANCE_VARIABLE_NODES = T.let(T.unsafe(nil), Array) -# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#90 -RubyLsp::Requests::DocumentHighlight::LOCAL_NODES = T.let(T.unsafe(nil), Array) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#71 +RubyLsp::Listeners::DocumentHighlight::LOCAL_NODES = T.let(T.unsafe(nil), Array) -# ![Document link demo](../../document_link.gif) -# -# The [document link](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentLink) -# makes `# source://PATH_TO_FILE#line` comments in a Ruby/RBI file clickable if the file exists. -# When the user clicks the link, it'll open that location. -# -# # Example -# -# ```ruby -# # source://syntax_tree/3.2.1/lib/syntax_tree.rb#51 <- it will be clickable and will take the user to that location -# def format(source, maxwidth = T.unsafe(nil)) -# end -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#21 -class RubyLsp::Requests::DocumentLink < ::RubyLsp::Listener +# source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#8 +class RubyLsp::Listeners::DocumentLink < ::RubyLsp::Listener extend T::Generic ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::DocumentLink] } } - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#85 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#72 sig { params(uri: ::URI::Generic, comments: T::Array[::Prism::Comment], dispatcher: ::Prism::Dispatcher).void } def initialize(uri, comments, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#76 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#63 sig { override.returns(ResponseType) } def _response; end - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#117 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#104 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#132 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#119 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#127 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#114 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#112 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#99 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#122 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#109 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#139 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#126 sig { params(node: ::Prism::Node).void } def extract_document_link(node); end @@ -2145,123 +1708,89 @@ class RubyLsp::Requests::DocumentLink < ::RubyLsp::Listener # 2. The version in the RBI file name # 3. The version from the gemspec # - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#165 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#152 sig { params(uri: ::URI::Source).returns(T.nilable(::String)) } def resolve_version(uri); end class << self - # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#38 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#25 sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, ::String]]]) } def gem_paths; end end end -# source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#27 -RubyLsp::Requests::DocumentLink::GEM_TO_VERSION_MAP = T.let(T.unsafe(nil), Hash) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#14 +RubyLsp::Listeners::DocumentLink::GEM_TO_VERSION_MAP = T.let(T.unsafe(nil), Hash) -# ![Document symbol demo](../../document_symbol.gif) -# -# The [document -# symbol](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol) request -# informs the editor of all the important symbols, such as classes, variables, and methods, defined in a file. With -# this information, the editor can populate breadcrumbs, file outline and allow for fuzzy symbol searches. -# -# In VS Code, fuzzy symbol search can be accessed by opening the command palette and inserting an `@` symbol. -# -# # Example -# -# ```ruby -# class Person # --> document symbol: class -# attr_reader :age # --> document symbol: field -# -# def initialize -# @age = 0 # --> document symbol: variable -# end -# -# def age # --> document symbol: method -# end -# end -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#29 -class RubyLsp::Requests::DocumentSymbol < ::RubyLsp::ExtensibleListener +# source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#6 +class RubyLsp::Listeners::DocumentSymbol < ::RubyLsp::Listener extend T::Generic ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol] } } - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#53 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#30 sig { params(dispatcher: ::Prism::Dispatcher).void } def initialize(dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#50 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#27 sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } def _response; end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#82 - sig { override.params(addon: ::RubyLsp::Addon).returns(T.nilable(RubyLsp::Listener[ResponseType])) } - def initialize_external_listener(addon); end - - # Merges responses from other listeners - # - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#88 - sig { override.params(other: RubyLsp::Listener[ResponseType]).returns(T.self_type) } - def merge_response!(other); end - - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#126 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#91 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#94 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#59 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#104 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#69 sig { params(node: ::Prism::ClassNode).void } def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#224 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#189 sig { params(node: ::Prism::ClassVariableWriteNode).void } def on_class_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#148 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#113 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#158 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#123 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#183 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#148 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#168 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#133 sig { params(node: ::Prism::DefNode).void } def on_def_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#214 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#179 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#173 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#138 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#209 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#174 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#109 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#74 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#121 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#86 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_leave(node); end private - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#243 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#208 sig do params( name: ::String, @@ -2273,164 +1802,969 @@ class RubyLsp::Requests::DocumentSymbol < ::RubyLsp::ExtensibleListener def create_document_symbol(name:, kind:, range_location:, selection_range_location:); end end -# source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#35 -RubyLsp::Requests::DocumentSymbol::ATTR_ACCESSORS = T.let(T.unsafe(nil), Array) +# source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#12 +RubyLsp::Listeners::DocumentSymbol::ATTR_ACCESSORS = T.let(T.unsafe(nil), Array) -# source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#37 -class RubyLsp::Requests::DocumentSymbol::SymbolHierarchyRoot - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#44 +# source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#14 +class RubyLsp::Listeners::DocumentSymbol::SymbolHierarchyRoot + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#21 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#41 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#18 sig { returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } def children; end end -# ![Folding ranges demo](../../folding_ranges.gif) -# -# The [folding ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange) -# request informs the editor of the ranges where and how code can be folded. -# -# # Example -# -# ```ruby -# def say_hello # <-- folding range start -# puts "Hello" -# end # <-- folding range end -# ``` -# -# source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#18 -class RubyLsp::Requests::FoldingRanges < ::RubyLsp::Listener +# source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#6 +class RubyLsp::Listeners::FoldingRanges < ::RubyLsp::Listener extend T::Generic ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::FoldingRange] } } - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#25 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#13 sig { params(comments: T::Array[::Prism::Comment], dispatcher: ::Prism::Dispatcher).void } def initialize(comments, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#62 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#50 sig { override.returns(ResponseType) } def _response; end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#101 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#89 sig { params(node: ::Prism::ArrayNode).void } def on_array_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#171 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#159 sig { params(node: ::Prism::BeginNode).void } def on_begin_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#106 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#94 sig { params(node: ::Prism::BlockNode).void } def on_block_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#191 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#179 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#116 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#104 sig { params(node: ::Prism::CaseMatchNode).void } def on_case_match_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#111 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#99 sig { params(node: ::Prism::CaseNode).void } def on_case_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#121 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#109 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#176 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#164 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#161 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#149 sig { params(node: ::Prism::ElseNode).void } def on_else_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#166 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#154 sig { params(node: ::Prism::EnsureNode).void } def on_ensure_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#131 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#119 sig { params(node: ::Prism::ForNode).void } def on_for_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#136 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#124 sig { params(node: ::Prism::HashNode).void } def on_hash_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#73 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#61 sig { params(node: ::Prism::IfNode).void } def on_if_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#78 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#66 sig { params(node: ::Prism::InNode).void } def on_in_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#93 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#81 sig { params(node: ::Prism::InterpolatedStringNode).void } def on_interpolated_string_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#204 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#192 sig { params(node: ::Prism::LambdaNode).void } def on_lambda_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#126 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#114 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#83 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#71 sig { params(node: ::Prism::RescueNode).void } def on_rescue_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#141 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#129 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#146 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#134 sig { params(node: ::Prism::UnlessNode).void } def on_unless_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#151 + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#139 sig { params(node: ::Prism::UntilNode).void } def on_until_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#88 - sig { params(node: ::Prism::WhenNode).void } - def on_when_node_enter(node); end + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#76 + sig { params(node: ::Prism::WhenNode).void } + def on_when_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#144 + sig { params(node: ::Prism::WhileNode).void } + def on_while_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#259 + sig { params(start_line: ::Integer, end_line: ::Integer).void } + def add_lines_range(start_line, end_line); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#253 + sig { params(node: ::Prism::Node).void } + def add_simple_range(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#242 + sig { params(node: T.any(::Prism::IfNode, ::Prism::InNode, ::Prism::RescueNode, ::Prism::WhenNode)).void } + def add_statements_range(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#215 + sig { void } + def emit_requires_range; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#199 + sig { void } + def push_comment_ranges; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#228 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def require?(node); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#6 +class RubyLsp::Listeners::Hover < ::RubyLsp::Listener + extend T::Generic + + ResponseType = type_member { { fixed: T.nilable(::LanguageServer::Protocol::Interface::Hover) } } + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#34 + sig do + params( + uri: ::URI::Generic, + nesting: T::Array[::String], + index: ::RubyIndexer::Index, + dispatcher: ::Prism::Dispatcher, + typechecker_enabled: T::Boolean + ).void + end + def initialize(uri, nesting, index, dispatcher, typechecker_enabled); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#23 + sig { override.returns(ResponseType) } + def _response; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#73 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#66 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#52 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#59 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#116 + sig { params(node: ::Prism::CallNode).void } + def generate_gem_hover(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#100 + sig { params(name: ::String, location: ::Prism::Location).void } + def generate_hover(name, location); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#12 +RubyLsp::Listeners::Hover::ALLOWED_TARGETS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#6 +class RubyLsp::Listeners::InlayHints < ::RubyLsp::Listener + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::InlayHint] } } + + # source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#24 + sig do + params( + range: T::Range[::Integer], + hints_configuration: ::RubyLsp::RequestConfig, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(range, hints_configuration, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#15 + sig { override.returns(ResponseType) } + def _response; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#51 + sig { params(node: ::Prism::ImplicitNode).void } + def on_implicit_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#35 + sig { params(node: ::Prism::RescueNode).void } + def on_rescue_node_enter(node); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#12 +RubyLsp::Listeners::InlayHints::RESCUE_STRING_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#6 +class RubyLsp::Listeners::SemanticHighlighting < ::RubyLsp::Listener + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::RubyLsp::Listeners::SemanticHighlighting::SemanticToken] } } + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#96 + sig { params(dispatcher: ::Prism::Dispatcher, range: T.nilable(T::Range[::Integer])).void } + def initialize(dispatcher, range: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#93 + sig { override.returns(ResponseType) } + def _response; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#242 + sig { params(node: ::Prism::BlockLocalVariableNode).void } + def on_block_local_variable_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#232 + sig { params(node: ::Prism::BlockNode).void } + def on_block_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#237 + sig { params(node: ::Prism::BlockNode).void } + def on_block_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#247 + sig { params(node: ::Prism::BlockParameterNode).void } + def on_block_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#141 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#370 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#191 + sig { params(node: ::Prism::ConstantAndWriteNode).void } + def on_constant_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#198 + sig { params(node: ::Prism::ConstantOperatorWriteNode).void } + def on_constant_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#205 + sig { params(node: ::Prism::ConstantOrWriteNode).void } + def on_constant_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#173 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#212 + sig { params(node: ::Prism::ConstantTargetNode).void } + def on_constant_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#184 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#219 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#227 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#271 + sig { params(node: ::Prism::KeywordRestParameterNode).void } + def on_keyword_rest_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#336 + sig { params(node: ::Prism::LocalVariableAndWriteNode).void } + def on_local_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#343 + sig { params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def on_local_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#350 + sig { params(node: ::Prism::LocalVariableOrWriteNode).void } + def on_local_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#323 + sig { params(node: ::Prism::LocalVariableReadNode).void } + def on_local_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#357 + sig { params(node: ::Prism::LocalVariableTargetNode).void } + def on_local_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#316 + sig { params(node: ::Prism::LocalVariableWriteNode).void } + def on_local_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#158 + sig { params(node: ::Prism::MatchWriteNode).void } + def on_match_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#168 + sig { params(node: ::Prism::MatchWriteNode).void } + def on_match_write_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#380 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#262 + sig { params(node: ::Prism::OptionalKeywordParameterNode).void } + def on_optional_keyword_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#282 + sig { params(node: ::Prism::OptionalParameterNode).void } + def on_optional_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#253 + sig { params(node: ::Prism::RequiredKeywordParameterNode).void } + def on_required_keyword_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#290 + sig { params(node: ::Prism::RequiredParameterNode).void } + def on_required_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#298 + sig { params(node: ::Prism::RestParameterNode).void } + def on_rest_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#309 + sig { params(node: ::Prism::SelfNode).void } + def on_self_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#389 + sig { params(location: ::Prism::Location, type: ::Symbol, modifiers: T::Array[::Symbol]).void } + def add_token(location, type, modifiers = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#410 + sig { params(node: ::Prism::CallNode).void } + def process_regexp_locals(node); end + + # Textmate provides highlighting for a subset of these special Ruby-specific methods. We want to utilize that + # highlighting, so we avoid making a semantic token for it. + # + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#405 + sig { params(method_name: ::String).returns(T::Boolean) } + def special_method?(method_name); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#57 +RubyLsp::Listeners::SemanticHighlighting::SPECIAL_RUBY_METHODS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#68 +class RubyLsp::Listeners::SemanticHighlighting::SemanticToken + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#84 + sig { params(location: ::Prism::Location, length: ::Integer, type: ::Integer, modifier: T::Array[::Integer]).void } + def initialize(location:, length:, type:, modifier:); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#75 + sig { returns(::Integer) } + def length; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#72 + sig { returns(::Prism::Location) } + def location; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#81 + sig { returns(T::Array[::Integer]) } + def modifier; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#78 + sig { returns(::Integer) } + def type; end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#41 +RubyLsp::Listeners::SemanticHighlighting::TOKEN_MODIFIERS = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#12 +RubyLsp::Listeners::SemanticHighlighting::TOKEN_TYPES = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#6 +class RubyLsp::Listeners::SignatureHelp < ::RubyLsp::Listener + extend T::Generic + + ResponseType = type_member { { fixed: T.nilable(T.any(::LanguageServer::Protocol::Interface::SignatureHelp, T::Hash[::Symbol, T.untyped])) } } + + # source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#22 + sig { params(nesting: T::Array[::String], index: ::RubyIndexer::Index, dispatcher: ::Prism::Dispatcher).void } + def initialize(nesting, index, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#13 + sig { override.returns(ResponseType) } + def _response; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#32 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end +end + +# A notification to be sent to the client +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#25 +class RubyLsp::Message + abstract! + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#38 + sig { params(message: ::String, params: ::Object).void } + def initialize(message:, params:); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#32 + sig { returns(::String) } + def message; end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#35 + sig { returns(::Object) } + def params; end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#44 +class RubyLsp::Notification < ::RubyLsp::Message; end + +# source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#5 +class RubyLsp::ParameterScope + # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#12 + sig { params(parent: T.nilable(::RubyLsp::ParameterScope)).void } + def initialize(parent = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#18 + sig { params(name: T.any(::String, ::Symbol)).void } + def <<(name); end + + # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#28 + sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } + def parameter?(name); end + + # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#9 + sig { returns(T.nilable(::RubyLsp::ParameterScope)) } + def parent; end + + # source://ruby-lsp/lib/ruby_lsp/parameter_scope.rb#23 + sig { params(name: T.any(::String, ::Symbol)).returns(::Symbol) } + def type_for(name); end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#45 +class RubyLsp::Request < ::RubyLsp::Message; end + +# A request configuration, to turn on/off features +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#87 +class RubyLsp::RequestConfig + # source://ruby-lsp/lib/ruby_lsp/utils.rb#94 + sig { params(configuration: T::Hash[::Symbol, T::Boolean]).void } + def initialize(configuration); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#91 + sig { returns(T::Hash[::Symbol, T::Boolean]) } + def configuration; end + + # @return [Hash{Symbol => Boolean}] + # + # source://ruby-lsp/lib/ruby_lsp/utils.rb#91 + def configuration=(_arg0); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#99 + sig { params(feature: ::Symbol).returns(T.nilable(T::Boolean)) } + def enabled?(feature); end +end + +# Supported features +# +# - [DocumentSymbol](rdoc-ref:RubyLsp::Requests::DocumentSymbol) +# - [DocumentLink](rdoc-ref:RubyLsp::Requests::DocumentLink) +# - [Hover](rdoc-ref:RubyLsp::Requests::Hover) +# - [FoldingRange](rdoc-ref:RubyLsp::Requests::FoldingRanges) +# - [SelectionRange](rdoc-ref:RubyLsp::Requests::SelectionRanges) +# - [SemanticHighlighting](rdoc-ref:RubyLsp::Requests::SemanticHighlighting) +# - [Formatting](rdoc-ref:RubyLsp::Requests::Formatting) +# - [OnTypeFormatting](rdoc-ref:RubyLsp::Requests::OnTypeFormatting) +# - [Diagnostic](rdoc-ref:RubyLsp::Requests::Diagnostics) +# - [CodeAction](rdoc-ref:RubyLsp::Requests::CodeActions) +# - [CodeActionResolve](rdoc-ref:RubyLsp::Requests::CodeActionResolve) +# - [DocumentHighlight](rdoc-ref:RubyLsp::Requests::DocumentHighlight) +# - [InlayHint](rdoc-ref:RubyLsp::Requests::InlayHints) +# - [Completion](rdoc-ref:RubyLsp::Requests::Completion) +# - [CodeLens](rdoc-ref:RubyLsp::Requests::CodeLens) +# - [Definition](rdoc-ref:RubyLsp::Requests::Definition) +# - [ShowSyntaxTree](rdoc-ref:RubyLsp::Requests::ShowSyntaxTree) +# - [WorkspaceSymbol](rdoc-ref:RubyLsp::Requests::WorkspaceSymbol) +# - [SignatureHelp](rdoc-ref:RubyLsp::Requests::SignatureHelp) +# +# source://ruby-lsp/lib/ruby_lsp/requests.rb#27 +module RubyLsp::Requests; end + +# ![Code action resolve demo](../../code_action_resolve.gif) +# +# The [code action resolve](https://microsoft.github.io/language-server-protocol/specification#codeAction_resolve) +# request is used to to resolve the edit field for a given code action, if it is not already provided in the +# textDocument/codeAction response. We can use it for scenarios that require more computation such as refactoring. +# +# # Example: Extract to variable +# +# ```ruby +# # Before: +# 1 + 1 # Select the text and use Refactor: Extract Variable +# +# # After: +# new_variable = 1 + 1 +# new_variable +# +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#24 +class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#38 + sig { params(document: ::RubyLsp::Document, code_action: T::Hash[::Symbol, T.untyped]).void } + def initialize(document, code_action); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#45 + sig do + override + .returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) + end + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#141 + sig do + params( + range: T::Hash[::Symbol, T.untyped], + new_text: ::String + ).returns(::LanguageServer::Protocol::Interface::TextEdit) + end + def create_text_edit(range, new_text); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#28 +class RubyLsp::Requests::CodeActionResolve::CodeActionError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#30 +class RubyLsp::Requests::CodeActionResolve::Error < ::T::Enum + enums do + EmptySelection = new + InvalidTargetRange = new + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#26 +RubyLsp::Requests::CodeActionResolve::NEW_VARIABLE_NAME = T.let(T.unsafe(nil), String) + +# ![Code actions demo](../../code_actions.gif) +# +# The [code actions](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction) +# request informs the editor of RuboCop quick fixes that can be applied. These are accessible by hovering over a +# specific diagnostic. +# +# # Example +# +# ```ruby +# def say_hello +# puts "Hello" # --> code action: quick fix indentation +# end +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#19 +class RubyLsp::Requests::CodeActions < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#38 + sig do + params( + document: ::RubyLsp::Document, + range: T::Hash[::Symbol, T.untyped], + context: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(document, range, context); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#47 + sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::CodeAction]))) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#62 + sig do + params( + range: T::Hash[::Symbol, T.untyped], + uri: ::URI::Generic + ).returns(::LanguageServer::Protocol::Interface::CodeAction) + end + def refactor_code_action(range, uri); end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#26 + sig { returns(::LanguageServer::Protocol::Interface::CodeActionOptions) } + def provider; end + end +end + +# ![Code lens demo](../../code_lens.gif) +# +# The +# [code lens](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens) +# request informs the editor of runnable commands such as tests +# +# # Configuration +# +# To disable gem code lenses, set `rubyLsp.featuresConfiguration.codeLens.gemfileLinks` to `false`. +# +# # Example +# +# ```ruby +# # Run +# class Test < Minitest::Test +# end +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#27 +class RubyLsp::Requests::CodeLens < ::RubyLsp::Requests::Request + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::CodeLens] } } + + # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#49 + sig do + params( + uri: ::URI::Generic, + lenses_configuration: ::RubyLsp::RequestConfig, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(uri, lenses_configuration, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#63 + sig { override.returns(ResponseType) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#35 + sig { returns(::LanguageServer::Protocol::Interface::CodeLensOptions) } + def provider; end + end +end + +# ![Completion demo](../../completion.gif) +# +# The [completion](https://microsoft.github.io/language-server-protocol/specification#textDocument_completion) +# suggests possible completions according to what the developer is typing. +# +# Currently supported targets: +# - Classes +# - Modules +# - Constants +# - Require paths +# - Methods invoked on self only +# +# # Example +# +# ```ruby +# require "ruby_lsp/requests" # --> completion: suggests `base_request`, `code_actions`, ... +# +# RubyLsp::Requests:: # --> completion: suggests `Completion`, `Hover`, ... +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#27 +class RubyLsp::Requests::Completion < ::RubyLsp::Requests::Request + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::CompletionItem] } } + + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#57 + sig do + params( + document: ::RubyLsp::Document, + index: ::RubyIndexer::Index, + position: T::Hash[::Symbol, T.untyped], + typechecker_enabled: T::Boolean, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(document, index, position, typechecker_enabled, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#103 + sig { override.returns(ResponseType) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#35 + sig { returns(::LanguageServer::Protocol::Interface::CompletionOptions) } + def provider; end + end +end + +# ![Definition demo](../../definition.gif) +# +# The [definition +# request](https://microsoft.github.io/language-server-protocol/specification#textDocument_definition) jumps to the +# definition of the symbol under the cursor. +# +# Currently supported targets: +# - Classes +# - Modules +# - Constants +# - Require paths +# - Methods invoked on self only +# +# # Example +# +# ```ruby +# require "some_gem/file" # <- Request go to definition on this string will take you to the file +# Product.new # <- Request go to definition on this class name will take you to its declaration. +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#27 +class RubyLsp::Requests::Definition < ::RubyLsp::Requests::Request + extend T::Generic + + ResponseType = type_member { { fixed: T.nilable(T.any(::LanguageServer::Protocol::Interface::Location, T::Array[::LanguageServer::Protocol::Interface::Location])) } } + + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#42 + sig do + params( + document: ::RubyLsp::Document, + index: ::RubyIndexer::Index, + position: T::Hash[::Symbol, T.untyped], + dispatcher: ::Prism::Dispatcher, + typechecker_enabled: T::Boolean + ).void + end + def initialize(document, index, position, dispatcher, typechecker_enabled); end + + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#65 + sig { override.returns(ResponseType) } + def perform; end +end + +# ![Diagnostics demo](../../diagnostics.gif) +# +# The +# [diagnostics](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics) +# request informs the editor of RuboCop offenses for a given file. +# +# # Example +# +# ```ruby +# def say_hello +# puts "Hello" # --> diagnostics: incorrect indentation +# end +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#21 +class RubyLsp::Requests::Diagnostics < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#37 + sig { params(document: ::RubyLsp::Document).void } + def initialize(document); end + + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#44 + sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::Diagnostic]))) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#55 + sig { returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::Diagnostic])) } + def syntax_error_diagnostics; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#28 + sig { returns(T::Hash[::Symbol, T::Boolean]) } + def provider; end + end +end + +# ![Document highlight demo](../../document_highlight.gif) +# +# The [document highlight](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight) +# informs the editor all relevant elements of the currently pointed item for highlighting. For example, when +# the cursor is on the `F` of the constant `FOO`, the editor should identify other occurrences of `FOO` +# and highlight them. +# +# For writable elements like constants or variables, their read/write occurrences should be highlighted differently. +# This is achieved by sending different "kind" attributes to the editor (2 for read and 3 for write). +# +# # Example +# +# ```ruby +# FOO = 1 # should be highlighted as "write" +# +# def foo +# FOO # should be highlighted as "read" +# end +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#27 +class RubyLsp::Requests::DocumentHighlight < ::RubyLsp::Requests::Request + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::DocumentHighlight] } } + + # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#39 + sig do + params( + document: ::RubyLsp::Document, + position: T::Hash[::Symbol, T.untyped], + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(document, position, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#46 + sig { override.returns(ResponseType) } + def perform; end +end + +# ![Document link demo](../../document_link.gif) +# +# The [document link](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentLink) +# makes `# source://PATH_TO_FILE#line` comments in a Ruby/RBI file clickable if the file exists. +# When the user clicks the link, it'll open that location. +# +# # Example +# +# ```ruby +# # source://syntax_tree/3.2.1/lib/syntax_tree.rb#51 <- it will be clickable and will take the user to that location +# def format(source, maxwidth = T.unsafe(nil)) +# end +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#21 +class RubyLsp::Requests::DocumentLink < ::RubyLsp::Requests::Request + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::DocumentLink] } } + + # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#43 + sig { params(uri: ::URI::Generic, comments: T::Array[::Prism::Comment], dispatcher: ::Prism::Dispatcher).void } + def initialize(uri, comments, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#49 + sig { override.returns(ResponseType) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#29 + sig { returns(::LanguageServer::Protocol::Interface::DocumentLinkOptions) } + def provider; end + end +end + +# ![Document symbol demo](../../document_symbol.gif) +# +# The [document +# symbol](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol) request +# informs the editor of all the important symbols, such as classes, variables, and methods, defined in a file. With +# this information, the editor can populate breadcrumbs, file outline and allow for fuzzy symbol searches. +# +# In VS Code, fuzzy symbol search can be accessed by opening the command palette and inserting an `@` symbol. +# +# # Example +# +# ```ruby +# class Person # --> document symbol: class +# attr_reader :age # --> document symbol: field +# +# def initialize +# @age = 0 # --> document symbol: variable +# end +# +# def age # --> document symbol: method +# end +# end +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#31 +class RubyLsp::Requests::DocumentSymbol < ::RubyLsp::Requests::Request + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol] } } - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#156 - sig { params(node: ::Prism::WhileNode).void } - def on_while_node_enter(node); end + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#52 + sig { params(dispatcher: ::Prism::Dispatcher).void } + def initialize(dispatcher); end - private + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#66 + sig { override.returns(ResponseType) } + def perform; end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#271 - sig { params(start_line: ::Integer, end_line: ::Integer).void } - def add_lines_range(start_line, end_line); end + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#39 + sig { returns(::LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities) } + def provider; end + end +end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#265 - sig { params(node: ::Prism::Node).void } - def add_simple_range(node); end +# ![Folding ranges demo](../../folding_ranges.gif) +# +# The [folding ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange) +# request informs the editor of the ranges where and how code can be folded. +# +# # Example +# +# ```ruby +# def say_hello # <-- folding range start +# puts "Hello" +# end # <-- folding range end +# ``` +# +# source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#20 +class RubyLsp::Requests::FoldingRanges < ::RubyLsp::Requests::Request + extend T::Generic - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#254 - sig { params(node: T.any(::Prism::IfNode, ::Prism::InNode, ::Prism::RescueNode, ::Prism::WhenNode)).void } - def add_statements_range(node); end + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::FoldingRange] } } - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#227 - sig { void } - def emit_requires_range; end + # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#36 + sig { params(comments: T::Array[::Prism::Comment], dispatcher: ::Prism::Dispatcher).void } + def initialize(comments, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#211 - sig { void } - def push_comment_ranges; end + # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#42 + sig { override.returns(ResponseType) } + def perform; end - # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#240 - sig { params(node: ::Prism::CallNode).returns(T::Boolean) } - def require?(node); end + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#28 + sig { returns(::LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities) } + def provider; end + end end # ![Formatting symbol demo](../../formatting.gif) @@ -2454,14 +2788,14 @@ end # ``` # # source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#28 -class RubyLsp::Requests::Formatting < ::RubyLsp::Requests::BaseRequest +class RubyLsp::Requests::Formatting < ::RubyLsp::Requests::Request # source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#57 sig { params(document: ::RubyLsp::Document, formatter: ::String).void } def initialize(document, formatter: T.unsafe(nil)); end # source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#65 sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::TextEdit]))) } - def run; end + def perform; end private @@ -2499,56 +2833,35 @@ class RubyLsp::Requests::Formatting::InvalidFormatter < ::StandardError; end # String # -> Hovering over the class reference will show all declaration locations and the documentation # ``` # -# source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#16 -class RubyLsp::Requests::Hover < ::RubyLsp::ExtensibleListener +# source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#18 +class RubyLsp::Requests::Hover < ::RubyLsp::Requests::Request extend T::Generic ResponseType = type_member { { fixed: T.nilable(::LanguageServer::Protocol::Interface::Hover) } } # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#42 - sig { params(index: ::RubyIndexer::Index, nesting: T::Array[::String], dispatcher: ::Prism::Dispatcher).void } - def initialize(index, nesting, dispatcher); end + sig do + params( + document: ::RubyLsp::Document, + index: ::RubyIndexer::Index, + position: T::Hash[::Symbol, T.untyped], + dispatcher: ::Prism::Dispatcher, + typechecker_enabled: T::Boolean + ).void + end + def initialize(document, index, position, dispatcher, typechecker_enabled); end - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#33 + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#75 sig { override.returns(ResponseType) } - def _response; end - - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#58 - sig { override.params(addon: ::RubyLsp::Addon).returns(T.nilable(RubyLsp::Listener[ResponseType])) } - def initialize_external_listener(addon); end - - # Merges responses from other hover listeners - # - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#64 - sig { override.params(other: RubyLsp::Listener[ResponseType]).returns(T.self_type) } - def merge_response!(other); end - - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#99 - sig { params(node: ::Prism::CallNode).void } - def on_call_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#92 - sig { params(node: ::Prism::ConstantPathNode).void } - def on_constant_path_node_enter(node); end + def perform; end - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#78 - sig { params(node: ::Prism::ConstantReadNode).void } - def on_constant_read_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#85 - sig { params(node: ::Prism::ConstantWriteNode).void } - def on_constant_write_node_enter(node); end - - private - - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#120 - sig { params(name: ::String, location: ::Prism::Location).void } - def generate_hover(name, location); end + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#26 + sig { returns(::LanguageServer::Protocol::Interface::HoverClientCapabilities) } + def provider; end + end end -# source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#22 -RubyLsp::Requests::Hover::ALLOWED_TARGETS = T.let(T.unsafe(nil), Array) - # ![Inlay hint demo](../../inlay_hints.gif) # # [Inlay hints](https://microsoft.github.io/language-server-protocol/specification#textDocument_inlayHint) @@ -2583,38 +2896,34 @@ RubyLsp::Requests::Hover::ALLOWED_TARGETS = T.let(T.unsafe(nil), Array) # } # ``` # -# source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#39 -class RubyLsp::Requests::InlayHints < ::RubyLsp::Listener +# source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#41 +class RubyLsp::Requests::InlayHints < ::RubyLsp::Requests::Request extend T::Generic ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::InlayHint] } } - # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#57 + # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#64 sig do params( - range: T::Range[::Integer], + document: ::RubyLsp::Document, + range: T::Hash[::Symbol, T.untyped], hints_configuration: ::RubyLsp::RequestConfig, dispatcher: ::Prism::Dispatcher ).void end - def initialize(range, hints_configuration, dispatcher); end + def initialize(document, range, hints_configuration, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#48 + # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#75 sig { override.returns(ResponseType) } - def _response; end - - # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#84 - sig { params(node: ::Prism::ImplicitNode).void } - def on_implicit_node_enter(node); end + def perform; end - # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#68 - sig { params(node: ::Prism::RescueNode).void } - def on_rescue_node_enter(node); end + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#49 + sig { returns(::LanguageServer::Protocol::Interface::InlayHintOptions) } + def provider; end + end end -# source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#45 -RubyLsp::Requests::InlayHints::RESCUE_STRING_LENGTH = T.let(T.unsafe(nil), Integer) - # ![On type formatting demo](../../on_type_formatting.gif) # # The [on type formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_onTypeFormatting) @@ -2629,8 +2938,8 @@ RubyLsp::Requests::InlayHints::RESCUE_STRING_LENGTH = T.let(T.unsafe(nil), Integ # ``` # # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#18 -class RubyLsp::Requests::OnTypeFormatting < ::RubyLsp::Requests::BaseRequest - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#30 +class RubyLsp::Requests::OnTypeFormatting < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#42 sig do params( document: ::RubyLsp::Document, @@ -2640,52 +2949,71 @@ class RubyLsp::Requests::OnTypeFormatting < ::RubyLsp::Requests::BaseRequest end def initialize(document, position, trigger_character); end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#44 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#56 sig { override.returns(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::TextEdit])) } - def run; end + def perform; end private - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#147 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#159 sig { params(text: ::String, position: T::Hash[::Symbol, T.untyped]).void } def add_edit_with_text(text, position = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#192 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#204 sig { void } def auto_indent_after_end_keyword; end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#179 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#191 sig { params(line: ::String).returns(::Integer) } def find_indentation(line); end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#142 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#154 sig { params(spaces: ::String).void } def handle_comment_line(spaces); end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#104 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#116 sig { void } def handle_curly_brace; end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#134 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#146 sig { params(delimiter: ::String).void } def handle_heredoc_end(delimiter); end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#73 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#85 sig { void } def handle_pipe; end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#112 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#124 sig { void } def handle_statement_end; end - # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#160 + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#172 sig { params(line: ::Integer, character: ::Integer).void } def move_cursor_to(line, character); end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#25 + sig { returns(::LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions) } + def provider; end + end end -# source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#21 +# source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#33 RubyLsp::Requests::OnTypeFormatting::END_REGEXES = T.let(T.unsafe(nil), Array) +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/requests/request.rb#7 +class RubyLsp::Requests::Request + abstract! + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/requests/request.rb#14 + sig { abstract.returns(T.anything) } + def perform; end +end + # ![Selection ranges demo](../../selection_ranges.gif) # # The [selection ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_selectionRange) @@ -2705,16 +3033,16 @@ RubyLsp::Requests::OnTypeFormatting::END_REGEXES = T.let(T.unsafe(nil), Array) # ``` # # source://ruby-lsp/lib/ruby_lsp/requests/selection_ranges.rb#23 -class RubyLsp::Requests::SelectionRanges +class RubyLsp::Requests::SelectionRanges < ::RubyLsp::Requests::Request include ::RubyLsp::Requests::Support::Common # source://ruby-lsp/lib/ruby_lsp/requests/selection_ranges.rb#27 sig { params(document: ::RubyLsp::Document).void } def initialize(document); end - # source://ruby-lsp/lib/ruby_lsp/requests/selection_ranges.rb#34 - sig { returns(T.all(::Object, T::Array[::RubyLsp::Requests::Support::SelectionRange])) } - def run; end + # source://ruby-lsp/lib/ruby_lsp/requests/selection_ranges.rb#35 + sig { override.returns(T.all(::Object, T::Array[::RubyLsp::Requests::Support::SelectionRange])) } + def perform; end end # ![Semantic highlighting demo](../../semantic_highlighting.gif) @@ -2733,190 +3061,27 @@ end # end # ``` # -# source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#21 -class RubyLsp::Requests::SemanticHighlighting < ::RubyLsp::Listener +# source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#23 +class RubyLsp::Requests::SemanticHighlighting < ::RubyLsp::Requests::Request extend T::Generic - ResponseType = type_member { { fixed: T::Array[::RubyLsp::Requests::SemanticHighlighting::SemanticToken] } } + ResponseType = type_member { { fixed: T::Array[::RubyLsp::Listeners::SemanticHighlighting::SemanticToken] } } - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#111 + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#47 sig { params(dispatcher: ::Prism::Dispatcher, range: T.nilable(T::Range[::Integer])).void } def initialize(dispatcher, range: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#108 + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#53 sig { override.returns(ResponseType) } - def _response; end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#257 - sig { params(node: ::Prism::BlockLocalVariableNode).void } - def on_block_local_variable_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#247 - sig { params(node: ::Prism::BlockNode).void } - def on_block_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#252 - sig { params(node: ::Prism::BlockNode).void } - def on_block_node_leave(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#262 - sig { params(node: ::Prism::BlockParameterNode).void } - def on_block_parameter_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#156 - sig { params(node: ::Prism::CallNode).void } - def on_call_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#385 - sig { params(node: ::Prism::ClassNode).void } - def on_class_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#206 - sig { params(node: ::Prism::ConstantAndWriteNode).void } - def on_constant_and_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#213 - sig { params(node: ::Prism::ConstantOperatorWriteNode).void } - def on_constant_operator_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#220 - sig { params(node: ::Prism::ConstantOrWriteNode).void } - def on_constant_or_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#188 - sig { params(node: ::Prism::ConstantReadNode).void } - def on_constant_read_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#227 - sig { params(node: ::Prism::ConstantTargetNode).void } - def on_constant_target_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#199 - sig { params(node: ::Prism::ConstantWriteNode).void } - def on_constant_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#234 - sig { params(node: ::Prism::DefNode).void } - def on_def_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#242 - sig { params(node: ::Prism::DefNode).void } - def on_def_node_leave(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#286 - sig { params(node: ::Prism::KeywordRestParameterNode).void } - def on_keyword_rest_parameter_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#351 - sig { params(node: ::Prism::LocalVariableAndWriteNode).void } - def on_local_variable_and_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#358 - sig { params(node: ::Prism::LocalVariableOperatorWriteNode).void } - def on_local_variable_operator_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#365 - sig { params(node: ::Prism::LocalVariableOrWriteNode).void } - def on_local_variable_or_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#338 - sig { params(node: ::Prism::LocalVariableReadNode).void } - def on_local_variable_read_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#372 - sig { params(node: ::Prism::LocalVariableTargetNode).void } - def on_local_variable_target_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#331 - sig { params(node: ::Prism::LocalVariableWriteNode).void } - def on_local_variable_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#173 - sig { params(node: ::Prism::MatchWriteNode).void } - def on_match_write_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#183 - sig { params(node: ::Prism::MatchWriteNode).void } - def on_match_write_node_leave(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#395 - sig { params(node: ::Prism::ModuleNode).void } - def on_module_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#277 - sig { params(node: ::Prism::OptionalKeywordParameterNode).void } - def on_optional_keyword_parameter_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#297 - sig { params(node: ::Prism::OptionalParameterNode).void } - def on_optional_parameter_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#268 - sig { params(node: ::Prism::RequiredKeywordParameterNode).void } - def on_required_keyword_parameter_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#305 - sig { params(node: ::Prism::RequiredParameterNode).void } - def on_required_parameter_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#313 - sig { params(node: ::Prism::RestParameterNode).void } - def on_rest_parameter_node_enter(node); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#324 - sig { params(node: ::Prism::SelfNode).void } - def on_self_node_enter(node); end - - private - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#404 - sig { params(location: ::Prism::Location, type: ::Symbol, modifiers: T::Array[::Symbol]).void } - def add_token(location, type, modifiers = T.unsafe(nil)); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#425 - sig { params(node: ::Prism::CallNode).void } - def process_regexp_locals(node); end - - # Textmate provides highlighting for a subset of these special Ruby-specific methods. We want to utilize that - # highlighting, so we avoid making a semantic token for it. - # - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#420 - sig { params(method_name: ::String).returns(T::Boolean) } - def special_method?(method_name); end -end - -# source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#72 -RubyLsp::Requests::SemanticHighlighting::SPECIAL_RUBY_METHODS = T.let(T.unsafe(nil), Array) + def perform; end -# source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#83 -class RubyLsp::Requests::SemanticHighlighting::SemanticToken - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#99 - sig { params(location: ::Prism::Location, length: ::Integer, type: ::Integer, modifier: T::Array[::Integer]).void } - def initialize(location:, length:, type:, modifier:); end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#90 - sig { returns(::Integer) } - def length; end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#87 - sig { returns(::Prism::Location) } - def location; end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#96 - sig { returns(T::Array[::Integer]) } - def modifier; end - - # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#93 - sig { returns(::Integer) } - def type; end + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#33 + sig { returns(::LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions) } + def provider; end + end end -# source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#56 -RubyLsp::Requests::SemanticHighlighting::TOKEN_MODIFIERS = T.let(T.unsafe(nil), Hash) - -# source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#27 -RubyLsp::Requests::SemanticHighlighting::TOKEN_TYPES = T.let(T.unsafe(nil), Hash) - # ![Show syntax tree demo](../../show_syntax_tree.gif) # # Show syntax tree is a custom [LSP @@ -2932,14 +3097,14 @@ RubyLsp::Requests::SemanticHighlighting::TOKEN_TYPES = T.let(T.unsafe(nil), Hash # ``` # # source://ruby-lsp/lib/ruby_lsp/requests/show_syntax_tree.rb#20 -class RubyLsp::Requests::ShowSyntaxTree < ::RubyLsp::Requests::BaseRequest +class RubyLsp::Requests::ShowSyntaxTree < ::RubyLsp::Requests::Request # source://ruby-lsp/lib/ruby_lsp/requests/show_syntax_tree.rb#24 sig { params(document: ::RubyLsp::Document, range: T.nilable(T::Hash[::Symbol, T.untyped])).void } def initialize(document, range); end # source://ruby-lsp/lib/ruby_lsp/requests/show_syntax_tree.rb#31 sig { override.returns(::String) } - def run; end + def perform; end private @@ -2968,30 +3133,33 @@ end # end # ``` # -# source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#25 -class RubyLsp::Requests::SignatureHelp < ::RubyLsp::Listener +# source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#27 +class RubyLsp::Requests::SignatureHelp < ::RubyLsp::Requests::Request extend T::Generic ResponseType = type_member { { fixed: T.nilable(T.any(::LanguageServer::Protocol::Interface::SignatureHelp, T::Hash[::Symbol, T.untyped])) } } - # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#42 + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#54 sig do params( - context: T::Hash[::Symbol, T.untyped], - nesting: T::Array[::String], + document: ::RubyLsp::Document, index: ::RubyIndexer::Index, + position: T::Hash[::Symbol, T.untyped], + context: T.nilable(T::Hash[::Symbol, T.untyped]), dispatcher: ::Prism::Dispatcher ).void end - def initialize(context, nesting, index, dispatcher); end + def initialize(document, index, position, context, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#32 + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#79 sig { override.returns(ResponseType) } - def _response; end + def perform; end - # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#53 - sig { params(node: ::Prism::CallNode).void } - def on_call_node_enter(node); end + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#35 + sig { returns(::LanguageServer::Protocol::Interface::SignatureHelpOptions) } + def provider; end + end end # source://ruby-lsp/lib/ruby_lsp/requests.rb#50 @@ -3034,11 +3202,7 @@ module RubyLsp::Requests::Support::Common end def create_code_lens(node, title:, command_name:, arguments:, data:); end - # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#73 - sig { params(file_path: ::String).returns(T.nilable(T::Boolean)) } - def defined_in_gem?(file_path); end - - # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#90 + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#91 sig do params( title: ::String, @@ -3047,6 +3211,10 @@ module RubyLsp::Requests::Support::Common end def markdown_from_index_entries(title, entries); end + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#73 + sig { params(file_path: ::String).returns(T.nilable(T::Boolean)) } + def not_in_dependencies?(file_path); end + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#30 sig { params(location: ::Prism::Location).returns(::LanguageServer::Protocol::Interface::Range) } def range_from_location(location); end @@ -3055,7 +3223,7 @@ module RubyLsp::Requests::Support::Common sig { params(node: ::Prism::Node).returns(::LanguageServer::Protocol::Interface::Range) } def range_from_node(node); end - # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#79 + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#80 sig { params(node: ::Prism::CallNode).returns(T::Boolean) } def self_receiver?(node); end @@ -3250,13 +3418,13 @@ class RubyLsp::Requests::Support::SemanticTokenEncoder # https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens # # source://ruby-lsp/lib/ruby_lsp/requests/support/semantic_token_encoder.rb#43 - sig { params(token: ::RubyLsp::Requests::SemanticHighlighting::SemanticToken).returns(T::Array[::Integer]) } + sig { params(token: ::RubyLsp::Listeners::SemanticHighlighting::SemanticToken).returns(T::Array[::Integer]) } def compute_delta(token); end # source://ruby-lsp/lib/ruby_lsp/requests/support/semantic_token_encoder.rb#21 sig do params( - tokens: T::Array[::RubyLsp::Requests::SemanticHighlighting::SemanticToken] + tokens: T::Array[::RubyLsp::Listeners::SemanticHighlighting::SemanticToken] ).returns(::LanguageServer::Protocol::Interface::SemanticTokens) end def encode(tokens); end @@ -3318,37 +3486,37 @@ end # ``` # # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#21 -class RubyLsp::Requests::WorkspaceSymbol +class RubyLsp::Requests::WorkspaceSymbol < ::RubyLsp::Requests::Request include ::RubyLsp::Requests::Support::Common # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#26 sig { params(query: T.nilable(::String), index: ::RubyIndexer::Index).void } def initialize(query, index); end - # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#32 - sig { returns(T::Array[::LanguageServer::Protocol::Interface::WorkspaceSymbol]) } - def run; end + # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#33 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::WorkspaceSymbol]) } + def perform; end private - # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#68 + # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#69 sig { params(entry: ::RubyIndexer::Entry).returns(T.nilable(::Integer)) } def kind_for_entry(entry); end end # The final result of running a request before its IO is finalized # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#40 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#48 class RubyLsp::Result - # source://ruby-lsp/lib/ruby_lsp/utils.rb#50 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#58 sig { params(response: T.untyped, error: T.nilable(::Exception)).void } def initialize(response:, error: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#47 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#55 sig { returns(T.nilable(::Exception)) } def error; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#44 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#52 sig { returns(T.untyped) } def response; end end @@ -3509,14 +3677,14 @@ class URI::Source < ::URI::File sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.12.0uri/generic.rb#243 + # source://uri/0.12.1uri/generic.rb#243 def gem_name; end # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#26 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.12.0uri/generic.rb#283 + # source://uri/0.12.1uri/generic.rb#283 def line_number; end # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#52 diff --git a/sorbet/rbi/gems/tapioca@0.11.14.rbi b/sorbet/rbi/gems/tapioca@0.11.15.rbi similarity index 97% rename from sorbet/rbi/gems/tapioca@0.11.14.rbi rename to sorbet/rbi/gems/tapioca@0.11.15.rbi index 77379346..8d283d80 100644 --- a/sorbet/rbi/gems/tapioca@0.11.14.rbi +++ b/sorbet/rbi/gems/tapioca@0.11.15.rbi @@ -1,4 +1,4 @@ -# typed: false +# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `tapioca` gem. @@ -204,7 +204,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11164lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11180lib/types/struct.rb#13 def inherited(s); end end end @@ -216,14 +216,14 @@ module T::Generic # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#47 def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#21 - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + def type_member(variance = T.unsafe(nil), &bounds_proc); end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#37 - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end end # This module intercepts calls to generic type instantiations and type variable definitions. @@ -238,14 +238,14 @@ module T::Generic::TypeStoragePatch # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#47 def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#21 - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + def type_member(variance = T.unsafe(nil), &bounds_proc); end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#37 - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end end # source://tapioca/lib/tapioca/sorbet_ext/proc_bind_patch.rb#28 @@ -329,18 +329,18 @@ end # source://tapioca/lib/tapioca/sorbet_ext/name_patch.rb#6 class T::Types::Simple < ::T::Types::Base - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#79 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#70 def name; end end -# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#74 +# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#65 module T::Types::Simple::GenericPatch # This method intercepts calls to the `name` method for simple types, so that # it can ask the name to the type if the type is generic, since, by this point, # we've created a clone of that type with the `name` method returning the # appropriate name for that specific concrete type. # - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#79 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#70 def name; end end @@ -356,17 +356,17 @@ end # source://tapioca/lib/tapioca/sorbet_ext/name_patch.rb#8 T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#99 +# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#87 module T::Utils::Private class << self - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#89 def coerce_and_check_module_types(val, check_val, check_module_type); end end end -# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#100 +# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#88 module T::Utils::Private::PrivateCoercePatch - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#89 def coerce_and_check_module_types(val, check_val, check_module_type); end end @@ -1121,7 +1121,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11164lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11180lib/types/struct.rb#13 def inherited(s); end end end @@ -1132,7 +1132,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11164lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11180lib/types/struct.rb#13 def inherited(s); end end end @@ -1968,11 +1968,11 @@ class Tapioca::Gem::Pipeline private - # source://tapioca/lib/tapioca/gem/pipeline.rb#441 + # source://tapioca/lib/tapioca/gem/pipeline.rb#439 sig { params(name: ::String).void } def add_to_alias_namespace(name); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#446 + # source://tapioca/lib/tapioca/gem/pipeline.rb#444 sig { params(name: ::String).returns(T::Boolean) } def alias_namespaced?(name); end @@ -1990,7 +1990,7 @@ class Tapioca::Gem::Pipeline sig { params(symbol: ::String, constant: ::Module).void } def compile_foreign_constant(symbol, constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#300 + # source://tapioca/lib/tapioca/gem/pipeline.rb#298 sig { params(name: ::String, constant: ::Module).void } def compile_module(name, constant); end @@ -1998,15 +1998,15 @@ class Tapioca::Gem::Pipeline sig { params(name: ::String, value: ::BasicObject).void } def compile_object(name, value); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#311 + # source://tapioca/lib/tapioca/gem/pipeline.rb#309 sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } def compile_scope(name, constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#325 + # source://tapioca/lib/tapioca/gem/pipeline.rb#323 sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#422 + # source://tapioca/lib/tapioca/gem/pipeline.rb#420 sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end @@ -2016,11 +2016,11 @@ class Tapioca::Gem::Pipeline # Helpers # - # source://tapioca/lib/tapioca/gem/pipeline.rb#465 + # source://tapioca/lib/tapioca/gem/pipeline.rb#463 sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } def generic_name_of(constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#434 + # source://tapioca/lib/tapioca/gem/pipeline.rb#432 sig { params(constant: ::Module).returns(T::Set[::String]) } def get_file_candidates(constant); end @@ -2028,7 +2028,7 @@ class Tapioca::Gem::Pipeline sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def load_bootstrap_symbols(gem); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#481 + # source://tapioca/lib/tapioca/gem/pipeline.rb#479 sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end @@ -2050,37 +2050,37 @@ class Tapioca::Gem::Pipeline sig { params(event: ::Tapioca::Gem::SymbolFound).void } def on_symbol(event); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#453 + # source://tapioca/lib/tapioca/gem/pipeline.rb#451 sig { params(name: ::String).void } def seen!(name); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#458 + # source://tapioca/lib/tapioca/gem/pipeline.rb#456 sig { params(name: ::String).returns(T::Boolean) } def seen?(name); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#393 + # source://tapioca/lib/tapioca/gem/pipeline.rb#391 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_alias?(name, constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#381 + # source://tapioca/lib/tapioca/gem/pipeline.rb#379 sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } def skip_constant?(name, constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#409 + # source://tapioca/lib/tapioca/gem/pipeline.rb#407 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_foreign_constant?(name, constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#414 + # source://tapioca/lib/tapioca/gem/pipeline.rb#412 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_module?(name, constant); end - # source://tapioca/lib/tapioca/gem/pipeline.rb#401 + # source://tapioca/lib/tapioca/gem/pipeline.rb#399 sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } def skip_object?(name, constant); end # Constants and properties filtering # - # source://tapioca/lib/tapioca/gem/pipeline.rb#376 + # source://tapioca/lib/tapioca/gem/pipeline.rb#374 sig { params(name: ::String).returns(T::Boolean) } def skip_symbol?(name); end end @@ -3241,15 +3241,15 @@ Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca/lib/tapioca/helpers/sorbet_helper.rb#5 module Tapioca::SorbetHelper - # source://tapioca/lib/tapioca/helpers/sorbet_helper.rb#34 + # source://tapioca/lib/tapioca/helpers/sorbet_helper.rb#32 sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } def sorbet(*sorbet_args); end - # source://tapioca/lib/tapioca/helpers/sorbet_helper.rb#39 + # source://tapioca/lib/tapioca/helpers/sorbet_helper.rb#37 sig { returns(::String) } def sorbet_path; end - # source://tapioca/lib/tapioca/helpers/sorbet_helper.rb#46 + # source://tapioca/lib/tapioca/helpers/sorbet_helper.rb#44 sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } def sorbet_supports?(feature, version: T.unsafe(nil)); end end @@ -3373,16 +3373,16 @@ Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) # source://tapioca/lib/tapioca.rb#34 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) -# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#137 +# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#108 class Tapioca::TypeVariable < ::T::Types::TypeVariable # @return [TypeVariable] a new instance of TypeVariable # - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#138 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#109 def initialize(name, variance); end # Returns the value of attribute name. # - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#143 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#114 def name; end end @@ -3392,60 +3392,50 @@ end # need to do any matching of constants to type variables to bind their names, Ruby will # do that automatically for us and we get the `name` method for free from `Module`. # -# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#151 +# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#122 class Tapioca::TypeVariableModule < ::Module - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#177 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#146 sig do params( context: ::Module, type: ::Tapioca::TypeVariableModule::Type, variance: ::Symbol, - fixed: T.untyped, - lower: T.untyped, - upper: T.untyped, bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped])) ).void end - def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end + def initialize(context, type, variance, bounds_proc); end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#218 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#181 sig { returns(::Tapioca::TypeVariable) } def coerce_to_type_variable; end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#198 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#161 sig { returns(T::Boolean) } def fixed?; end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#192 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#155 sig { returns(T.nilable(::String)) } def name; end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#203 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#166 sig { returns(::String) } def serialize; end - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#163 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#136 sig { returns(::Tapioca::TypeVariableModule::Type) } def type; end private - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#238 + # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#188 sig { returns(T::Hash[::Symbol, T.untyped]) } def bounds; end - - # source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#228 - sig do - params( - fixed: T.untyped, - lower: T.untyped, - upper: T.untyped - ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped])) - end - def build_bounds_proc(fixed, lower, upper); end end -# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#154 +# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#133 +Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) + +# source://tapioca/lib/tapioca/sorbet_ext/generic_name_patch.rb#125 class Tapioca::TypeVariableModule::Type < ::T::Enum enums do Member = new @@ -3464,30 +3454,30 @@ end # source://tapioca/lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://ruby-lsp/0.13.2lib/ruby_lsp/requests/support/source_uri.rb#62 + # source://ruby-lsp/0.13.3lib/ruby_lsp/requests/support/source_uri.rb#62 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.12.0uri/generic.rb#243 + # source://uri/0.12.1uri/generic.rb#243 def gem_name; end - # source://ruby-lsp/0.13.2lib/ruby_lsp/requests/support/source_uri.rb#26 + # source://ruby-lsp/0.13.3lib/ruby_lsp/requests/support/source_uri.rb#26 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.12.0uri/generic.rb#283 + # source://uri/0.12.1uri/generic.rb#283 def line_number; end - # source://ruby-lsp/0.13.2lib/ruby_lsp/requests/support/source_uri.rb#52 + # source://ruby-lsp/0.13.3lib/ruby_lsp/requests/support/source_uri.rb#52 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://ruby-lsp/0.13.2lib/ruby_lsp/requests/support/source_uri.rb#74 + # source://ruby-lsp/0.13.3lib/ruby_lsp/requests/support/source_uri.rb#74 sig { returns(::String) } def to_s; end class << self - # source://ruby-lsp/0.13.2lib/ruby_lsp/requests/support/source_uri.rb#39 + # source://ruby-lsp/0.13.3lib/ruby_lsp/requests/support/source_uri.rb#39 sig do params( gem_name: ::String, From f836df3e7befd55a9d63be134a0b2ab9441f366b Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 11 Jan 2024 16:58:16 -0500 Subject: [PATCH 5/9] $ bundle lock --add-platform x64-mingw-ucrt --- Gemfile.lock | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index b55fa642..d3d6d9c0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -136,6 +136,8 @@ GEM nio4r (2.7.0) nokogiri (1.16.0-arm64-darwin) racc (~> 1.4) + nokogiri (1.16.0-x64-mingw-ucrt) + racc (~> 1.4) nokogiri (1.16.0-x86_64-darwin) racc (~> 1.4) nokogiri (1.16.0-x86_64-linux) @@ -241,6 +243,7 @@ GEM syntax_tree (>= 6.1.1) thor (>= 0.19.2) sqlite3 (1.7.0-arm64-darwin) + sqlite3 (1.7.0-x64-mingw-ucrt) sqlite3 (1.7.0-x86_64-darwin) sqlite3 (1.7.0-x86_64-linux) stringio (3.1.0) @@ -259,6 +262,8 @@ GEM timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + tzinfo-data (1.2023.4) + tzinfo (>= 1.0.0) unicode-display_width (2.5.0) webrick (1.8.1) websocket-driver (0.7.6) @@ -272,6 +277,7 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt x86_64-darwin x86_64-linux From 83bed81e000d7534b174cfe951b2c41447fef986 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 11 Jan 2024 17:54:52 -0500 Subject: [PATCH 6/9] Set BUNDLE_GEMFILE --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 377f0ab1..62031d85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,8 @@ jobs: - os: "windows-latest" ruby: "3.0" runs-on: ${{ matrix.os }} + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} continue-on-error: ${{ !!matrix.experimental }} name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }} with ${{matrix.gemfile}} steps: From e1732babe0bc420584ea0a6c790f6232d29b5ca5 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 12 Jan 2024 11:00:40 -0500 Subject: [PATCH 7/9] Set bundler: latest --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62031d85..3d1a4485 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: + bundler: latest ruby-version: ${{ matrix.ruby }} bundler-cache: true cache-version: 7 From d9b0d4e20457f5b88362e1037c3b805b6ad55f37 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 12 Jan 2024 11:19:16 -0500 Subject: [PATCH 8/9] Skip for Gemfile-rails-main --- test/ruby_lsp_rails/rails_client_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/ruby_lsp_rails/rails_client_test.rb b/test/ruby_lsp_rails/rails_client_test.rb index 2a74d05c..f5ad9870 100644 --- a/test/ruby_lsp_rails/rails_client_test.rb +++ b/test/ruby_lsp_rails/rails_client_test.rb @@ -36,6 +36,8 @@ class RailsClientTest < ActiveSupport::TestCase end test "instantiation finds the right directory when bundle gemfile points to .ruby-lsp" do + skip if ENV["BUNDLE_GEMFILE"]&.end_with?("gemfiles/Gemfile-rails-main") + previous_bundle_gemfile = ENV["BUNDLE_GEMFILE"] project_root = Pathname.new(previous_bundle_gemfile).dirname From 16ceb69d6ff928f0fbc3c32dd982ae423f26636f Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 12 Jan 2024 12:01:05 -0500 Subject: [PATCH 9/9] Rails main needs Ruby 3.1 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d1a4485..ea174aff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,8 @@ jobs: exclude: - os: "windows-latest" ruby: "3.0" + - Gemfile: "gemfiles/Gemfile-rails-main" # needs Ruby 3.1 + ruby: "3.0" runs-on: ${{ matrix.os }} env: BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}