https://github.com/swistak35/orbacle
Program allowing for smart jump-to-definitions, autocompletion, constant renaming and more.
https://github.com/swistak35/orbacle
autocompletion ii-uwr langserver ruby
Last synced: about 2 months ago
JSON representation
Program allowing for smart jump-to-definitions, autocompletion, constant renaming and more.
- Host: GitHub
- URL: https://github.com/swistak35/orbacle
- Owner: swistak35
- License: mit
- Created: 2017-05-28T12:30:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-14T15:06:27.000Z (over 6 years ago)
- Last Synced: 2024-04-25T19:02:06.820Z (about 1 year ago)
- Topics: autocompletion, ii-uwr, langserver, ruby
- Language: Ruby
- Homepage:
- Size: 1.15 MB
- Stars: 188
- Watchers: 14
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Orbacle
Language server using engine allowing for smart jump-to-definitions, understanding metaprogramming definitions, refactoring and more.
Doing as MSc thesis for [Institute of Computer Science, University of Wrocław](http://ii.uni.wroc.pl).
## Objectives
Create a language server for ruby, which can be used across different code editors, like Vim, Emacs or Atom. Focus on understanding of the code in order to provide best functionalities of "go-to definition", autocompletion and refactorings. The idea is to infer information about variables (i.e. their "types"), **without requiring developer to write any annotations**, just like IDEs do that - through static analysis.
## Current status
Currently language server supports:
### Hover request
Information about "type" of an expression
### Jump to definition
Works in following cases:
* used on constant -> jump to constant definition
* used on method call -> jump to definition of that method
* used on `super` keyword -> jump to the definition of method from the parent class (doesn't respect `include` / `prepend` yet)### V i d e o

## Setup
### Prerequisite indexing
1. Install `orbacle` gem.
2. Run `orbaclerun -d index`It will show you how long does it take to index your project, i.e. how long do you have to wait after editor start to have language server functional underneath.
### Vim
Using `vim-plug`:
```
Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' }let g:LanguageClient_serverCommands = {
\ 'ruby': ['orbaclerun', 'file-server'],
\ }
nnoremap lj :call LanguageClient_textDocument_definition()
nnoremap T :call LanguageClient_textDocument_hover()
" timeout has to be bigger than time needed to index your project
let g:LanguageClient_waitOutputTimeout = 240
```## Contributing
Currently I do not accept contributions, as this is part of MSc thesis. However features ideas and bug reports are accepted.
## Support
If you have found a bug, feel free to create an issue. However, because of the fact that I'm focusing now more on the features required to MSc, support for other developers are lower priority for me.
## Code status
[](https://circleci.com/gh/swistak35/orbacle/tree/master)
[](https://badge.fury.io/rb/orbacle)## Bibliography
* [Tern](http://marijnhaverbeke.nl/blog/tern.html)
* Fast Interprocedural Class Analysis, Greg DeFouw, David Grove, Craig Chambers, July 1997