aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/ruby.vim
Commit message (Collapse)AuthorAge
* refactor: create function for deferred loadingdundargoc2024-02-03
| | | | | | | | | | | | | | | | The benefit of this is that users only pay for what they use. If e.g. only `vim.lsp.buf_get_clients()` is called then they don't need to load all modules under `vim.lsp` which could lead to significant startuptime saving. Also `vim.lsp.module` is a bit nicer to user compared to `require("vim.lsp.module")`. This isn't used for some nested modules such as `filetype` as it breaks tests with error messages such as "attempt to index field 'detect'". It's not entirely certain the reason for this, but it is likely it is due to filetype being precompiled which would imply deferred loading isn't needed for performance reasons.
* refactor: rewrite ruby provider in luadundargoc2024-01-24
|
* checkhealth: ignore 'wildignore' when seeking executables (#14495)Marco Hinz2021-05-07
| | | | | | Certain values of 'wildignore', .e.g `*/node_modules/**`, would make the provider checks not find the right executables. Fixes https://github.com/neovim/neovim/issues/14388
* provider: align all foo#Detect() functions #12839Justin M. Keyes2020-09-05
| | | | | | Problem: ruby#Detect() and node#Detect() don't return a [prog, err] pair which means callers must special-case them. Solution: align their return signatures with the perl/pythonx providers.
* provider: g:loaded_xx_provider=2 means "enabled and working"Justin M. Keyes2019-08-04
| | | | | Value of 1 cannot be used, because users might set that in their vimrc to _disable_ a provider, which would confuse :checkhealth and has().
* provider: decide status by g:loaded_xx_providerJustin M. Keyes2019-08-04
|
* provider: let providers decide their statusRui Abreu Ferreira2019-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of deciding provider status in eval_has_provider, move the decision to the provider Vim scripts. Previously, provider loading worked as follows: 1. eval_has_provider() verified provider availability by searching for the provider#providername#Call function and cached this verificaion as a static variable for some providers 2. providers short-circuited on loading to prevent the definition of the Call function (with the exception of the node provider that did not) This commit changes the expected interface between nvim and its providers to facilitate provider reloading, by splitting the verification of the provider from the availability of the Call function. eval_has_provider() now checks for a provider#providername#enabled variable. It is up to the provider script to set this to 0 or 1 accordingly. eval_call_provider() remains unchanged. All providers hosting a Call function were updated to respect this. The clipboard provider now has a Reload function to reload the provider.
* provider/lang: expand() g:foo_host_prog (#9312)Justin M. Keyes2018-12-05
| | | | | | | | | | Before this commit, if user does this: let g:node_host_prog = '~/.nvm/versions/node/v11.3.0/bin/neovim-node-host' the "~/" is not expanded to user's home directory. `:help g:ruby_host_prog` suggests a path with "~/" so technically we already claimed to support this. closes https://github.com/neovim/node-client/issues/102
* ruby: detect rbenv shims for other versions (#8733)Marco Hinz2018-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rbenv is used for managing Ruby installations, just checking for an executable called "neovim-ruby-host" is not enough. It has to be run as well. If it does not return 0, then neovim-ruby-host is merely a shim for another Ruby installation. $ rbenv versions 2.5.0 * 2.5.1 (set by /Users/mhi/.rbenv/version) $ rbenv whence neovim-ruby-host 2.5.0 $ which neovim-ruby-host /Users/mhi/.rbenv/shims/neovim-ruby-host $ neovim-ruby-host rbenv: neovim-ruby-host: command not found The `neovim-ruby-host' command exists in these Ruby versions: 2.5.0 $ echo $? 127 Additionally, the detection logic was moved from provider#ruby#Detect() to s:detect(), because the former is run in the sandbox which forbids calling system().
* Add provider#Poll() to handle starting and polling the providerJames McCoy2018-02-16
|
* provider: ruby: Use stderr_buffered to collect stderrJames McCoy2018-02-16
|
* provider/nodejs: check version in Detect()Justin M. Keyes2017-12-17
|
* provider: fix batchfile extension for ruby gem (#7651)Jan Edmund Lazo2017-11-29
| | | | | | | | | | | ruby uses batchfiles with 'cmd' extension. gem creates batchfiles with 'bat' extension. `gem install rails` does the following in Windows (not Cygwin): 1. Run `gem.cmd install rails` on cmd.exe 2. gem.cmd runs `ruby.exe -x gem install rails` 3. `rails` gem is installed. `rails.bat` is created in the same directory where ruby.exe and gem.cmd reside.
* win: provider: Detect(): return *.cmd path (#7577)Jan Edmund Lazo2017-11-17
| | | | | | | neovim-ruby-host is a ruby script. neovim-node-host is a shell script. Both don't work in cmd.exe so gem and npm provide batchfile shims. Return the full path of these shims, cmd.exe knows better what to do with these files.
* doc: replace ":CheckHealth" with ":checkhealth"Justin M. Keyes2017-10-17
|
* runtime: Allow overriding ruby host with g:ruby_host_progAlex Genco2017-06-17
| | | | | | | This allows users who have per-project Ruby versions (e.g. with `rvm`) to pin to a particular gem installation. For example: `let g:ruby_host_prog = 'rvm system do neovim-ruby-host'`
* providers: Disable if `g:loaded_*` exists.Justin M. Keyes2017-02-14
| | | | | | | | | The exists('g:loaded_foo') convention is rather common, and may be relied upon in some cases. It's also very unlikely that a user or plugin has any reason to set g:loaded_foo to zero, so the principle of least surprise can be brushed aside here. https://github.com/neovim/neovim/issues/6107#issuecomment-279532143
* health.vim: Do not check intentionally disabled providers.Justin M. Keyes2017-02-13
| | | | Closes #6107
* job control: reuse common job code for rpc jobsBjörn Linse2016-08-20
| | | | This makes stderr and exit callbacks work for rpc jobs
* Merge #4980 'Support legacy `:ruby` commands'.Justin M. Keyes2016-07-10
|\
| * Add :ruby, :rubyfile, and :rubydo ex commandsAlex Genco2016-07-02
|/
* Ruby remote plugin supportAlex Genco2016-03-10