All Projects → wbthomason → buildit.nvim

wbthomason / buildit.nvim

Licence: MIT License
A better async project builder for Neovim

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to buildit.nvim

keypirinha-theme-builder
A tool to create themes for Keypirinha launcher
Stars: ✭ 25 (+38.89%)
Mutual labels:  builder
YankAssassin.vim
Don't let the cursor move while Yanking in Vim/Neovim
Stars: ✭ 50 (+177.78%)
Mutual labels:  neovim-plugin
AppRopio.Mobile
AppRopio - mobile apps builder for iOS/Android based on Xamarin
Stars: ✭ 16 (-11.11%)
Mutual labels:  builder
nvim-hardline
A simple Neovim statusline
Stars: ✭ 122 (+577.78%)
Mutual labels:  neovim-plugin
menapro
CMS of 2017
Stars: ✭ 20 (+11.11%)
Mutual labels:  builder
lsp signature.nvim
LSP signature hint as you type
Stars: ✭ 915 (+4983.33%)
Mutual labels:  neovim-plugin
ECSEntityBuilder
Unity ECS Entity Builder/Wrapper
Stars: ✭ 39 (+116.67%)
Mutual labels:  builder
dqlx
A DGraph Query Builder
Stars: ✭ 41 (+127.78%)
Mutual labels:  builder
gh.vim
Vim/Neovim plugin for GitHub
Stars: ✭ 149 (+727.78%)
Mutual labels:  neovim-plugin
StablexUI-Designer
Graphical designer (gui-builder) for library StablexUI
Stars: ✭ 14 (-22.22%)
Mutual labels:  builder
nvim-terminal
A Lua-Neovim plugin that toggles a terminal
Stars: ✭ 54 (+200%)
Mutual labels:  neovim-plugin
ngx-env
Easily inject environment variables into your Angular applications
Stars: ✭ 73 (+305.56%)
Mutual labels:  builder
Nova-Menu-Builder
A Menu Builder for Laravel Nova
Stars: ✭ 63 (+250%)
Mutual labels:  builder
elemento
Builder API and other goodies for Elemental2
Stars: ✭ 90 (+400%)
Mutual labels:  builder
php-schema.org-mapping
A fluent interface to create mappings using Schema.org for Microdata and JSON-LD.
Stars: ✭ 31 (+72.22%)
Mutual labels:  builder
vim-iawriter
iAwriter's Focus mode for vim
Stars: ✭ 23 (+27.78%)
Mutual labels:  neovim-plugin
TemmieWebhook
ARCHIVED - Please use https://github.com/MinnDevelopment/discord-webhooks/ instead!! | A simple Discord Webhook API made in Java
Stars: ✭ 38 (+111.11%)
Mutual labels:  builder
nvim
🍨 Soothing pastel theme for NeoVim
Stars: ✭ 659 (+3561.11%)
Mutual labels:  neovim-plugin
lspcontainers.nvim
Neovim plugin for lspcontainers.
Stars: ✭ 157 (+772.22%)
Mutual labels:  neovim-plugin
nvim-tetris
Bringing emacs' greatest feature to neovim - Tetris!
Stars: ✭ 114 (+533.33%)
Mutual labels:  neovim-plugin

Stories in Ready Github All Releases License: MIT Maintenance

buildit.nvim

A better async project builder for Neovim. If you want a builder implemented, comment on the relevant issue or submit a PR.

Why would I use this?

buildit does a good job of automatically detecting the correct builder to use for a given buffer, and runs said builder in a new process, asynchronously. Further, it does not interfere with your working directory, and it can handle several simultaneous builds.

What this boils down to is that you can very easily trigger builds for several subprojects, have them work correctly without having to fiddle around with configuration, and keep editing uninterrupted.

For more, see the FAQ or the docs

Installation

Installation with Plug.vim has been tested to work:

 Plug 'wbthomason/buildit.nvim'

I have not tested it myself, but I assume that installation with most other methods will work as well. The plugin's structure is fairly simple.

Once you've installed, be sure to run :UpdateRemotePlugins to register buildit with Neovim.

Usage

buildit currently provides two commands and a function. The number of functions is likely to grow as features are added, but the command interface is likely to stay quite simple (though more commands may be added for major features).

Building

Building is what buildit does. To build, run :BuildIt. Then (in proper operation), the correct builder will be started in the background.

Checking on builds

Once you have one or more builders running, use :BuildItStatus to pop open a new window with the current set of running builds and their statuses. Note that buildit checks for completed or failed builds when you run :BuildItStatus, and will prune these builds from the list after the command is run.

Triggering builds from other contexts

buildit also provides the build function, in case you'd like to trigger a build using buildit from some other plugin or custom interface. All :BuildIt does is call build, so the behavior is as you'd expect.

Customization

Builder Definitions

You can add your own builder definitions by modifying the g:buildit_builders variable. Look at the default builders for the necessary structure. Any builders you redefine in g:buildit_builders will override the default definitions.

Status Window Location

To customize the location of the build status window, set g:buildit_status_location. Options are "right" (the default), "left", "top", and "bottom".

Build Pruning

If you don't like the default behavior of pruning completed builds after each status check, set g:buildit_prune_after_status to 0.

Builder Selection

buildit's default behavior when several builders could be a match for the current buffer is to pick the first-defined matching builder. However, you can have it prompt you for your preferred builder by setting g:buildit_prompt_multiple to 1.

Contributing

Contributions are welcome! Please add an issue for any bugs you run into or features you would like. Please also feel free to submit a PR with bug fixes/documentation improvements/feature additions. I'll do my best to review and respond promptly.

TODO

  • Better documentation (in progress)
  • More customizability (in progress)
  • More builders (in progress)
  • ???

FAQ

What?

buildit builds it. It finds the closest "buildable"1 directory to the directory of a file you open. If it can't find one, then it asks you what to do (by default, at least). Then it runs the appropriate build command asynchronously, and reports and interesting results.

Notably, buildit does not change the working directory. This is so you can have things like fzf easily search from the project root/wherever, but still build from the appropriate directory.

More features might happen once I think of them/they are suggested.

But why? Don't we already have Neomake and vim-dispatch and the like?

We sure do, and they mostly work. However, I have a few problems with all of the solutions I've found (which I'm sure stem from my improper usage of the existing options, but oh well).

First, some of them (Neomake) try to do too much. I have a nice async linting framework already; I don't want something that tries to do both linter execution and compilation/test execution (though I do acknowledge the similarities between the tasks). I just want something that I can use to trigger the right build tool in the right way for whatever buffer I'm currently in.

Second, these existing solutions all seem to fail when you deviate from the pattern of having the build files at the top level. While this may be considered a bad practice in many cases, there are a fair number of projects (e.g. multi-language projects, or projects with several discrete components) where it doesn't make sense to split each "buildable" project into its own repo. In my experience with these sorts of projects, the existing tools often try to build from the wrong directory, or otherwise fail to do what I want.

Also, I'm mostly writing this for fun/to try out writing plugins for Neovim. Thus, duplication of functionality isn't the worst thing in the world.

Footnotes

1: A "buildable" directory is one that contains some file indicating that a build tool is in place, e.g. Makefile, Cargo.toml, etc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].