yoda-language-server 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac5417cb4b65a5825e8cbbafc5e7c2396dd676f8c9be6635b6ae9721a58d9d4e
4
- data.tar.gz: 93c16d20eeef7a4af4483df0313814529adeefa8f0561e1fa96f72627730eb5a
3
+ metadata.gz: aca43eab2442fcf7e960a42490a0945b1dcce68c171dc8293c7aeb3e227b882f
4
+ data.tar.gz: 8a2c97c341fdafcb1b56388b772eed7b2dad27f092ca2900f0ad86afeeb20061
5
5
  SHA512:
6
- metadata.gz: 57ab04ba88f6d0047c00ef4a0c92531ddc8a7966dcf10b93c16d01152ea62981bba5eb40d8a94dcaf1c6eea015f710fb44c5a1eca45bc40614b51c5f79325d9e
7
- data.tar.gz: 7af4d13dd31562946ee5c3dd7e57e5c95b14450dce1b8ab8a9e1719a4b53067f384f069cb522b027158cca2407e9c47d84e86dcf604f940d3cea1cf47318a00d
6
+ metadata.gz: 7560acadbea2749e6a55770ad5b605e49d8a7a81dac122b429fe29c7ecdddeec4ada597bc5bc891c2e9428b17c46c8d094d409cda613521ea08be6d3c99362f4
7
+ data.tar.gz: 7f27afd1912aa6abf694792bf0cb61935d8e67293f3c1320b8797a578f3e422c8f63b1502d23d0ed543c371e9fafc00580cfdff88e116ff1e32dce80deb3a244
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
  ## Unreleased
2
+ ## v0.10.1 - 2022-03-29
3
+
4
+ * Fix undefine method error on Ruby 2.6
5
+
2
6
  ## v0.10.0 - 2022-03-28
3
7
 
4
8
  * Support go to definition on path of require clause
data/README.md CHANGED
@@ -1,20 +1,31 @@
1
- # Yoda [![Build Status](https://travis-ci.org/tomoasleep/yoda.svg?branch=master)](https://travis-ci.org/tomoasleep/yoda)
1
+ # Yoda [![Test](https://github.com/tomoasleep/yoda/actions/workflows/test.yml/badge.svg)](https://github.com/tomoasleep/yoda/actions/workflows/test.yml)
2
2
 
3
3
  Yoda is a Language Server (http://langserver.org/) for Ruby.
4
4
  Yoda infers signatures of your Ruby program and its dependencies from various data sources (RBS and YARD documentation) and provides autocompletion and code analysis (go-to-definition, code information, etc...).
5
5
 
6
6
  **Note: Yoda is alpha version. Please use with caution. Contributions are welcome!**
7
7
 
8
- ## Instation and Usage
8
+ ## Supporting Features
9
9
 
10
- ## Getting Started
10
+ Yoda provides these features by analyzing Ruby code and its dependencies in Gemfile.lock with YARD.
11
11
 
12
- ```bash
13
- rake install # Install language server
14
- rake vscode:install # Install vscode plugin
15
- ```
12
+ * Code completion (method, constant, variables, etc...)
13
+ * Comment completion (YARD tag, types)
14
+ * Hover code information (method, constant, etc...)
15
+ * Go to definition (method, constant, require file, etc...)
16
+
17
+ ![](https://github.com/tomoasleep/yoda/blob/master/images/method-complete.png)
18
+
19
+ ![](https://github.com/tomoasleep/yoda/blob/master/images/hover-method.png)
20
+
21
+ ## Install VSCode Extension (Recommended)
16
22
 
17
- ### Install language server
23
+ Yoda can be available as VSCode extension at: https://marketplace.visualstudio.com/items?itemName=tomoasleep.yoda
24
+ On launch of VSCode, Yoda will be installed automatically.
25
+
26
+ ## Other installation methods
27
+
28
+ ### Install language server gem
18
29
 
19
30
  Yoda is hosted on RubyGems.
20
31
 
@@ -33,7 +44,7 @@ $ yoda infer path-to-your-code:line_num:char_num # Show information of the code
33
44
  $ yoda complete <path-to-your-code>:<line-num>:<char-num> # Show completion at the specified position.
34
45
  ```
35
46
 
36
- ### Installation of Editor Plugin
47
+ ### Install Editor Plugin
37
48
 
38
49
  #### Atom
39
50
 
@@ -41,7 +52,7 @@ $ yoda complete <path-to-your-code>:<line-num>:<char-num> # Show completion at t
41
52
  apm install tomoasleep/yoda
42
53
  ```
43
54
 
44
- ### VSCode
55
+ #### VSCode (from source code)
45
56
 
46
57
  ```
47
58
  rake vscode:install
@@ -69,29 +80,13 @@ TBW
69
80
  Yoda figures structures of your source codes and library codes with YARD.
70
81
  Yoda intepret YARD tags such as `@return` tags and `@param` tags and infer code types from these information.
71
82
 
83
+
72
84
  ### Indexing
73
85
 
74
86
  Yoda built index files for fast inference under `<your-project-dir>/.yoda` at startup.
75
87
  These index files contains structures of external sources (gems and standard libraries).
76
88
  Your project codes are parsed at startup but does not stored in indexes.
77
89
 
78
- ### Supporting Features
79
-
80
- - autocompletion
81
- - [x] method completion
82
- - [x] constant completion
83
- - [x] (local, class, instance) variable completion
84
- - comment completion
85
- - [x] YARD tag completion
86
- - [x] YARD type literal completion
87
- - [x] parameter completion
88
- - [x] jump to definition
89
- - [x] hover
90
- - [x] signature help
91
- - [x] find references
92
- - [x] workspace symbols
93
- - [ ] diagnostics
94
-
95
90
  ## Development
96
91
 
97
92
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,11 +1,26 @@
1
- # yoda
1
+ # Yoda (Ruby Language Server)
2
+
3
+ This extension provides Ruby development features by Yoda (a Ruby language server).
2
4
 
3
5
  ## Features
4
6
 
7
+ Yoda provides these features by analyzing Ruby code and its dependencies in Gemfile.lock with YARD.
8
+
9
+ * Code completion (method, constant, variables, etc...)
10
+ * Comment completion (YARD tag, types)
11
+ * Hover code information (method, constant, etc...)
12
+ * Go to definition (method, constant, require file, etc...)
13
+
14
+ ![](https://github.com/tomoasleep/yoda/blob/master/images/method-complete.png)
15
+
16
+ ![](https://github.com/tomoasleep/yoda/blob/master/images/hover-method.png)
17
+
18
+ See: https://github.com/tomoasleep/yoda
5
19
 
6
20
  ## Requirements
7
21
 
8
- Install yoda.
22
+ This extension automatically installs [yoda-language-server](https://rubygems.org/gems/yoda-language-server) gem.
23
+ (If you want to install manually, please refer https://github.com/tomoasleep/yoda)
9
24
 
10
25
  ## Release Notes
11
26
 
Binary file
Binary file
@@ -9,7 +9,7 @@ module Yoda
9
9
  # @return [String, nil]
10
10
  def find_loadable_path(base_paths, pattern)
11
11
  # TODO: Support absolute path
12
- return nil if File.absolute_path?(pattern)
12
+ return nil if absolute_path?(pattern)
13
13
  return nil if pattern.start_with?("~/")
14
14
  return nil if pattern.start_with?("./")
15
15
  return nil if pattern.start_with?("../")
@@ -28,6 +28,13 @@ module Yoda
28
28
 
29
29
  return nil
30
30
  end
31
+
32
+ # This is a workaround for Ruby 2.6 (This version does not have `File.absolute_path?`)
33
+ # @param path [String]
34
+ # @return [Boolean]
35
+ def absolute_path?(path)
36
+ path[0] == "/"
37
+ end
31
38
  end
32
39
  end
33
40
  end
data/lib/yoda/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yoda
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.1"
3
3
  end
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency 'rubyzip', '>= 1.0.0'
35
35
 
36
36
  spec.add_development_dependency "bundler"
37
- spec.add_development_dependency "rake", "~> 10.0"
37
+ spec.add_development_dependency "rake"
38
38
  spec.add_development_dependency "rspec"
39
39
  spec.add_development_dependency "rspec-benchmark"
40
40
  spec.add_development_dependency "pry"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yoda-language-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoya Chiba
@@ -182,16 +182,16 @@ dependencies:
182
182
  name: rake
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: '10.0'
187
+ version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: '10.0'
194
+ version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rspec
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -326,6 +326,8 @@ files:
326
326
  - client/vscode/tsconfig.json
327
327
  - client/vscode/vsc-extension-quickstart.md
328
328
  - exe/yoda
329
+ - images/hover-method.png
330
+ - images/method-complete.png
329
331
  - lib/yoda.rb
330
332
  - lib/yoda/ast.rb
331
333
  - lib/yoda/ast/array_node.rb
@@ -725,7 +727,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
725
727
  - !ruby/object:Gem::Version
726
728
  version: '0'
727
729
  requirements: []
728
- rubygems_version: 3.2.22
730
+ rubygems_version: 3.2.32
729
731
  signing_key:
730
732
  specification_version: 4
731
733
  summary: Ruby completion engine