aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider
Commit message (Collapse)AuthorAge
* feat(clipboard)!: use OSC 52 as fallback clipboard provider (#31730)Gregory Anders2024-12-31
| | | | | | | | | | | | | | | We currently enable the OSC 52 clipboard provider by setting g:clipboard when a list of conditions are met, one of which is that $SSH_TTY must be set. We include this condition because often OSC 52 is not the best clipboard provider, so if there are "local" providers available Nvim should prefer those over OSC 52. However, if no other providers are available, Nvim should use OSC 52 even when $SSH_TTY is not set. When a user is in an SSH session then the checks for the other clipboard providers will still (typically) fail, so OSC 52 continues to be enabled by default in SSH sessions. This is marked as a breaking change because there are some cases where OSC 52 wasn't enabled before and is now (or vice versa).
* fix(clipboard): tmux clipboard depends on $TMUX #31268wzy2024-12-03
| | | | | | | Problem: tmux clipboard not used when tmux is a daemon and $TMUX is empty. Solution: If `tmux list-buffers` succeeds, use tmux clipboard.
* feat(clipboard): try cygutils, clip on Windows #30215wzy2024-09-02
|
* feat: allow opting in to builtin clipboard providers (#28083)dundargoc2024-03-28
| | | | | | | | Setting `vim.g.clipboard = false` will use the builtin clipboard providers. Closes https://github.com/neovim/neovim/issues/27698. Co-authored-by: Gregory Anders <greg@gpanders.com>
* 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
|
* refactor: rewrite perl provider in luadundargoc2024-01-24
|
* refactor: rewrite python provider in luadundargoc2024-01-22
|
* fix(clipboard): don't pass --foreground to wl-copy (#25481)zeertzjq2023-10-03
| | | Fix #25466
* fix(provider/pythonx): import the correct module (#25342)zeertzjq2023-09-24
|
* fix(provider): cannot detect python3.12 #25316Jongwook Choi2023-09-23
| | | | | | | | | | | | | | | | | | | PROBLEM: The builtin python3 provider cannot auto-detect python3.12 when g:python3_host_prog is not set. As a result, when python3 on $PATH is currently python 3.12, neovim will fail to load python3 provider and result in `has("python3") == 0`, e.g., "Failed to load python3 host. You can try to see what happened by ..." ROOT CAUSE: the `system()` call from `provider#pythonx#DetectByModule` does not ignore python warnings, and `pkgutil.get_loader` will print a warning message in the very first line: ``` <string>:1: DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead ``` SOLUTION: - Use `importlib.util.find_spec` instead (python >= 3.4) - Use `-W ignore` option to prevent any potential warning messages
* fix(clipboard): ignore exit caused by signal #23378Kai Ting2023-07-16
| | | | | | | | | | | | | Problem: If clipboard job exits by signal, the exit code is >=128: https://github.com/neovim/neovim/commit/939d9053bdf2f56286640c581eb4e2ff5a856540 xclip 0.13 often exits with code 143, which spams unhelpful messages: clipboard: error invoking xclip: Waiting for selection requests, Control-C to quit Waiting for selection request number 1 Solution: Don't show a warning if the clipboard tool exit code is >=128. Fixes: #7054
* feat(vim.version): more coercion with strict=falseJustin M. Keyes2023-03-20
| | | | | | | | | | | | | Problem: "tmux 3.2a" (output from "tmux -V") is not parsed easily. Solution: With `strict=false`, discard everything before the first digit. - rename Semver => Version - rename vim.version.version() => vim.version._version() - rename matches() => has() - remove `opts` from cmp()
* refactor(runtime): use vim.version to compare versions #22550Justin M. Keyes2023-03-07
| | | | | | | TODO: Unfortunately, cannot (yet) use vim.version for tmux version comparison, because `vim.version.parse(…,{strict=false})` does not coerce tmux's funny "tmux 3.3a" version string. https://github.com/neovim/neovim/blob/6969d3d7491fc2f10d80309b26dd0c26d211b1b3/runtime/autoload/provider/clipboard.vim#L148
* feat(provider): add support for Yarn node modules on Windows (#21246)Charles Nguyen2022-12-01
|
* feat(clipboard): added wayclip support (#21091)XDream82022-11-18
|
* fix(clipboard): update version regex pattern (#21012)Gregory Anders2022-11-09
| | | | Building tmux from source uses a 'next-' prefix, so account for that. Also handle failures to match more gracefully.
* fix(clipboard): prefer xsel #20918wzy2022-11-06
| | | | | | | | | | | | | | | | | | | | | | Problem: xclip is not actively maintained compared to xsel, and it has a bug: $ touch a $ xsel -ib < a $ xsel -ob $ xclip -o -selection clipboard Error: target STRING not available Years ago, the situation was reversed. We originally preferred xsel 46bd3c0f77f282b93ca1307c011562243c394306 but then swapped to xclip 799d9c32157c841c3b8d355fa98a5ace435eef07 to work around https://github.com/neovim/neovim/issues/7237#issuecomment-443440633 Solution: Prefer xsel again. close #20862 ref #9302 ref https://github.com/astrand/xclip/issues/38
* feat(clipboard): copy to system clipboard in tmux when supported (#20936)Gregory Anders2022-11-04
| | | | | | Since version 3.2 tmux has had the ability to read/write buffer contents from/to the system clipboard, if the underlying terminal emulator supports it. Enable this feature when we can detect that tmux supports it.
* feat(node): add pnpm support #19461Percy Ma2022-08-01
|
* refactor(provider): use list comprehension #19027Zaz Brown2022-06-20
| | | | - list(filter(lambda x: x != "", sys.path)) + [p for p in sys.path if p != ""]
* fix(checkhealth): make provider checkhealth output more consistent (#17722)dundargoc2022-03-16
| | | | | Change missing provider plugins from errors to warnings for python and perl. Also give proper advice under the ADVICE section instead of just the errors.
* feat(provider)!: remove support for python2 and python3.[3-5]Björn Linse2022-01-29
| | | | | | These versions of python has reached End-of-life. getting rid of python2 support removes a lot of logic to support two incompatible python versions in the same version.
* fix(provider): compare versions as number, not string #15937Tejasvi S. Tomar2021-10-07
| | | | "3.10" < "3.3" but v3.10 > v3.3 Fixes #14586
* fixup(clipboard): Fix error not properly handled #14984Shadman2021-07-11
| | | fixes #14967
* fixup(clipboard): Use case matching #14962Shadman2021-07-02
| | | Context: https://github.com/neovim/neovim/pull/14848#discussion_r663203173
* BugFix(clipboard): Fix block paste not working properlyshadmansaleh2021-07-01
| | | | | | | | | | | Block copy and paste from system-clipboard currently breaks formatting. This fixes it. The bug occurs because system-clipboard doesn't contain information about what mode the copy was made. Simple solution to this is we keep a cache of copy we last made along with mode information. If system-clipboard returns the cache we apply the mode information that we know about that cache.
* 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
* added support for termux-clipboard : clipboard.vim (#14244)Aditya Alok2021-03-29
| | | | Termux - Android terminal emulator Link - https://termux.com/
* Fix clipboard provider detection (#13190)necabo2020-10-29
| | | Fixes #13189
* provider: update supported Python versions (#13070)Marco Hinz2020-10-08
| | | | | | | | Python 3.9 was released, so we need to add support for the upcoming Python 3.10. Python 3.5 and earlier reached their end-of-life. PEP 478: Python 3.5 Release Schedule: https://www.python.org/dev/peps/pep-0478 PEP 596: Python 3.9 Release Schedule: https://www.python.org/dev/peps/pep-0596 PEP 619: Python 3.10 Release Schedule: https://www.python.org/dev/peps/pep-0619
* 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.
* Support for :perl, :perlfile, :perldo and perleval() (#12809)Justin M. Keyes2020-09-05
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * support for :perl, :perlfile, :perldo and perleval() * document that the perl provider doesn't currently work on Windows * document that the perl legacy interface is now also supported * added perleval() documentation * import legacy perl interface tests * only perl 5.22+ is supported * healtcheck: use g:perl_host_prog if its set instead using just 'perl' isn't correct as it may not be the version requested. ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest perl version
| * healtcheck: use g:perl_host_prog if its set insteadJacques Germishuys2020-09-05
| | | | | | | | | | | | using just 'perl' isn't correct as it may not be the version requested. ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest perl version
| * only perl 5.22+ is supportedJacques Germishuys2020-09-03
| |
| * support for :perl, :perlfile, :perldo and perleval()Jacques Germishuys2020-08-30
| |
* | g:clipboard: allow command given as a list #12775DDoSolitary2020-09-01
|/ | | fixes #12768
* Add overlapped option to jobstarterw72020-06-10
| | | | | | | When UV_OVERLAPPED_PIPE was used for the pipe passed to the child process, a problem occurred with the standard input of the .Net Framework application (#11809). Therefore, add the overlapped option to jobstart() and change it so that it is set only when necessary
* provider: Add python3.9 to autoload/provider/pythonx.vim (#12344)Faris A Chugthai2020-05-20
| | | | 3.9's scheduled for beta release today. https://www.python.org/dev/peps/pep-0596/
* win,runtime: Fix problem when win32yank was a symbolic link in WSL [skip ci] ↵erw72020-04-15
| | | | | | | | | (#12124) On some versions of Windows, WSL is unable to execute symbolic links to Windows executables (microsoft/WSL#3999). As a workaround for that problem this changes to use resolve() on WSL if win32yank was a symbolic link. fixes #12113.
* provider/perl: simplify detectionJan Edmund Lazo2020-01-20
|
* remote plugins: add support for perl hostsJacques Germishuys2020-01-20
|
* clipboard: do not close stderr together with stdout (fixup #11617)Björn Linse2020-01-02
| | | | | stderr is needed to get error messages in case of failure, and job handler expects it to be open.
* clipboard: close stdout when copying via xclip #11617Jan Edmund Lazo2020-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_registers.vim can fail even if a clipboard manager is running. If a clipboard manager is not running, this test always fails with xclip. Use xsel as a workaround. https://github.com/astrand/xclip/issues/20 suggests closing stdout when sending input via stdin. Environment - Ubuntu Xenial - Vim 7.4 (any app with broken clipboard code will do) - Neovim nightly Steps to reproduce: 0. Start the clipboard manager. 1. Open a file in Vim on Linux. Vim should have +clipboard enabled. 'set clipboard=' 2. Yank some text to the clipboard register. 3. Quit Vim. 4. Run 'cd /path/to/neovim/repo/' 5. Run 'make oldtest'. Do not run any individual tests. They likely pass with or without this fix. Before fix: test_registers.vim can fail. After fix: test_registers.vim always passes. Close https://github.com/neovim/neovim/issues/7958 https://wiki.ubuntu.com/ClipboardPersistence#The_state_of_things
* system(), jobstart(): raise error on non-executable #11234Daniel Hahler2019-12-24
| | | | | | | | | | * tv_to_argv: error when cmd is not executable Callers always assume that emsg was emitted: - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202 * test/functional/provider: display reason from missing_provider * provider#node#Detect: skip / handle non-existing node executable
* provider/python: add python3.8 executable (#11402)Marco Hinz2019-11-17
| | | | | Python 3.8 was released 2019-10-14: https://www.python.org/dev/peps/pep-0569
* provider/pythonx: don't assume CWD (empty string) is in path #11304supermomonga2019-10-27
| | | | | | | | | sys.path.remove("") raises ValueError if the item is missing. https://docs.python.org/3/library/functions.html#filter: > filter(function, iterable) is equivalent to the generator expression (item > for item in iterable if function(item)) fixes #11293
* provider#pythonx: resolve/expand exe from host var (#11047)Daniel Hahler2019-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts part of ade88fe4c [1]. This is required for `let g:python3_host_prog = 'python'` etc, where it should get picked up from PATH. Without this it would show: ``` - INFO: pyenv: Path: /home/user/.pyenv/libexec/pyenv - INFO: pyenv: Root: /home/user/.pyenv - INFO: Using: g:python3_host_prog = "python" - ERROR: "python" was not found. - INFO: Executable: Not found - ERROR: Detected pip upgrade failure: Python executable can import "pynvim" but not "neovim": python - ADVICE: - Use that Python version to reinstall "pynvim" and optionally "neovim". pip3 uninstall pynvim neovim pip3 install pynvim pip3 install neovim # only if needed by third-party software ``` Note that it additionally causes a weird error ("Detected pip upgrade failure"), due to `s:check_bin` emptying `python_exe` (because the non-absolute file not being readable), and `provider#pythonx#DetectByModule('pynvim', a:version)` from 75593e6fce then just getting the value from the host var again (without actual checks). This is implicitly fixed via this patch now (because it is skipped), but could need some improvement in this regard probably. With this patch it resolves it (for a virtualenv where pynvim is not made available intentionally): ``` - INFO: pyenv: Path: /home/daniel/.pyenv/libexec/pyenv - INFO: pyenv: Root: /home/daniel/.pyenv - INFO: Using: g:python3_host_prog = "python" - WARNING: $VIRTUAL_ENV exists but appears to be inactive. This could lead to unexpected results. - ADVICE: - If you are using Zsh, see: http://vi.stackexchange.com/a/7654 - INFO: Executable: /home/daniel/.pyenv/shims/tmp-system-deoplete.nvim-f205aF/python - ERROR: Command error (job=11, exit code 1): `'/home/daniel/.pyenv/shims/tmp-system-deoplete.nvim-f205aF/python' -c 'import sys; sys.path.remove(""); import neovim; print(neovim.__file__)'` (in '/home/daniel/.dotfiles/vim/plugged/deoplete.nvim') Output: Traceback (most recent call last): File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim' Stderr: Traceback (most recent call last): File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim' - INFO: Python version: 3.7.4 - INFO: pynvim version: unable to load neovim Python module - ERROR: pynvim is not installed. Error: unable to load neovim Python module - ADVICE: - Run in shell: pip3 install pynvim ``` Note: this appears to display the error twice via "Output:" and "Stderr:". 1: https://github.com/neovim/neovim/pull/8784
* clipboard: handle/avoid SIGTERM with previous owner #10765Daniel Hahler2019-08-14
| | | | | Fixes regression due to signal being reported with exit status. ref #10573 939d9053bdf2f56 ref https://github.com/neovim/neovim/issues/7054#issuecomment-520282429
* 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().