Skip to content

marcuscaisey/please.nvim

Repository files navigation

please.nvim CI

please.nvim is a plugin which enables you to interact with your Please repository from the comfort of Neovim.

Features

  • Build, run, test, and debug a target with :Please build, :Please run, :Please test, and :Please debug.
  • Run an arbitrary plz command in a popup with :Please command.
  • Display history of previous commands and run any of them again with :Please history.
  • Set the profile to use with :Please set_profile.
  • Jump from a source file to its target's definition with :Please jump_to_target.
  • Look up a target by its build label with :Please look_up_target.
  • Yank a target's build label with :Please yank.
  • please configured as the 'filetype' for BUILD, BUILD.plz, *.build, and *.build_defs files.
  • ini configured as the 'filetype' for .plzconfig files to enable better syntax highlighting.
  • Python tree-sitter parser configured to be used for please files to enable better syntax highlighting and use of all tree-sitter features in build files.
  • please LSP client configured to use plz tool lps for please files.
  • Language servers gopls, golangci-lint-langserver, basedpyright, and pyright automatically configured for use in a Please repository.

Demo

Screen.Recording.2022-12-03.at.18.22.18.mov

Shown above:

  1. Testing the target //gopkg:test from gopkg/gopkg_test.go with <space>pt (:Please test)
  2. Jumping to the defintion of the target //gopkg:test from gopkg/gopkg_test.go with <space>pj (:Please jump_to_target)
  3. Testing the target //gopkg:test again, this time from the BUILD file (:Please test again)

Getting started

Quickstart

Note

These steps require Neovim >= 0.12.

  1. Open a test file in a Please repository.
  2. Execute :lua vim.pack.add({ 'https://github.com/marcuscaisey/please.nvim' }, { confirm = false }) to install please.nvim.
  3. Execute :Please test to test the target corresponding to the test file in a popup.
  4. Execute :lua vim.pack.del({ 'please.nvim' }, { force = true }) to uninstall please.nvim.

Installation

Note

please.nvim supports the latest two Neovim minor versions. CI tests against the minimum supported version and the latest patch of each supported minor. The current minimum supported version is 0.11.0.

Using packer.nvim

use({ 'marcuscaisey/please.nvim' })

Using vim-plug

Plug 'marcuscaisey/please.nvim'

Using dein

call dein#add('marcuscaisey/please.nvim')

Recommended additional plugins

  • nvim-treesitter - Tree-sitter configurations and abstraction layer for Neovim. This enables you to install tree-sitter parsers.
  • fzf-lua - Highly extendable fuzzy finder. This provides a good vim.ui.select implementation.
  • nvim-dap - Debug Adapter Protocol client implementation for Neovim. This is required to use :Please debug.
  • nvim-dap-ui - UI for nvim-dap.

Documentation

Detailed documentation can found be in doc/please.txt or by executing :help please.nvim.

About

A Neovim plugin for interacting with Please repositories

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors