summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/autoload/provider/ruby.vim
AgeCommit message (Collapse)AuthorFiles
2025-03-29fix(provider): misleading :checkhealth if user sets ↵Sathya Pramodh1
g:loaded_python3_provider=1 #32696 Problem: :checkhealth shows a confusing message if user sets g:loaded_python3_provider=1. Solution: - Show a warning if that var is set to 1. - Update provider modules to default to 0. Any user code that is checking for 1, is like already broken because these may be set to 2.
2024-02-03refactor: create function for deferred loadingdundargoc1
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.
2024-01-24refactor: rewrite ruby provider in luadundargoc1
2021-05-07checkhealth: ignore 'wildignore' when seeking executables (#14495)Marco Hinz1
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
2020-09-05provider: align all foo#Detect() functions #12839Justin M. Keyes1
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.
2019-08-04provider: g:loaded_xx_provider=2 means "enabled and working"Justin M. Keyes1
Value of 1 cannot be used, because users might set that in their vimrc to _disable_ a provider, which would confuse :checkhealth and has().
2019-08-04provider: decide status by g:loaded_xx_providerJustin M. Keyes1
2019-08-04provider: let providers decide their statusRui Abreu Ferreira1
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.
2018-12-05provider/lang: expand() g:foo_host_prog (#9312)Justin M. Keyes1
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
2018-08-09ruby: detect rbenv shims for other versions (#8733)Marco Hinz1
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().
2018-02-16Add provider#Poll() to handle starting and polling the providerJames McCoy1
2018-02-16provider: ruby: Use stderr_buffered to collect stderrJames McCoy1
2017-12-17provider/nodejs: check version in Detect()Justin M. Keyes1
2017-11-29provider: fix batchfile extension for ruby gem (#7651)Jan Edmund Lazo1
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.
2017-11-17win: provider: Detect(): return *.cmd path (#7577)Jan Edmund Lazo1
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.
2017-10-17doc: replace ":CheckHealth" with ":checkhealth"Justin M. Keyes1
2017-06-17runtime: Allow overriding ruby host with g:ruby_host_progAlex Genco1
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'`
2017-02-14providers: Disable if `g:loaded_*` exists.Justin M. Keyes1
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
2017-02-13health.vim: Do not check intentionally disabled providers.Justin M. Keyes1
Closes #6107
2016-08-20job control: reuse common job code for rpc jobsBjörn Linse1
This makes stderr and exit callbacks work for rpc jobs
2016-07-10Merge #4980 'Support legacy `:ruby` commands'.Justin M. Keyes1
2016-07-02Add :ruby, :rubyfile, and :rubydo ex commandsAlex Genco1
2016-03-10Ruby remote plugin supportAlex Genco1