Skip to content

cristianoliveira/funzzy.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

funzzy.nvim CI checks

The plugin for running funzzy the watcher inside of Neovim.

This Neovim plugin allows you to watch for changes in files and directories and execute shell commands when they happen. It can be configured to run custom configurations by using :FunzzyEdit or run arbitrary commands for the current working directory with :FunzzyCmd.

FEATURES                                                  *funzzy-features*

- Runs a command when a file changes
- Runs non-blocking cancelable tasks
- Can be used to run any kind of task with a single configuration file
- Can watch the current directory recursively and run arbitrary commands
- Using `{{filepath}}` allows you to compose commands that uses the changed file
- Uses a very lightweight process made with Rust

Demo

fnvim.mp4

Installation

Requirements

To install this plugin, you can use your favorite plugin manager.

vim-plug or vundle

Plugin 'cristianoliveira/funzzy.nvim', { 'do': 'cargo install funzzy' }

packer

use { 'cristianoliveira/funzzy.nvim', run = 'cargo install funzzy' }

It assumes you have cargo installed for other options to install funzzy cli see: https://github.com/cristianoliveira/funzzy#installing

Getting started

Create the .watch.yaml for the working project by running :FunzzyInit add the rules and commands for funzzy (See examples) and then run :Funzzy that should be it, now evertime any file changing that matches the defined rules will be executed by funzzy and the output send to the current buffer.

Usage

See :help Funzzy or check the docs

COMMANDS                                                  *funzzy-commands*

                                                          *:FunzzyEdit*
:FunzzyEdit                       Opens the `.watch.yaml` file in edit mode. If
                                  the file does not exist, it will be created.

:FunzzyInit                       Alias for :FunzzyEdit

                                                          *:Funzzy*
:Funzzy <target>                  Watches using the `.watch.yaml` file in the
                                  current directory. you may pass a `target` to
                                  run a specific task.
                                  See more about "targeting"
                                  https://github.com/cristianoliveira/funzzy#running

                                                          *:FunzzyCmd*
:FunzzyCmd <shell-command>        Watches the current directory and runs the
                                  given shell command on each change.

                                                          *:FunzzyClose*
:FunzzyClose                      Closes all funzzy channels for the current
                                  working directory. This IS NOT REQUIRED for
                                  cleaning up running processes before exiting vim

CI checks

Unit tests

Requirement

luarocks install busted

make test

Linter

luarocks install luacheck

make lint

Contributing

If you would like to contribute to Funzzy the Watcher, please feel free to open a pull request or issue on this repository.

About

Neovim plugin for spawning funzzy the watcher on demand

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published