Pieces for Developers | Neovim Plugin
Please make sure you have Pieces OS installed to run the Package.
Welcome to the Pieces Neovim Plugin!
Neovim Plugin offers extensive functionality to interact with Pieces OS.
- Add the following lines to your
init.vimorinit.lua:
" init.vim
call plug#begin('~/.vim/plugged')
Plug 'kyazdani42/nvim-web-devicons'
Plug 'MunifTanjim/nui.nvim'
Plug 'hrsh7th/nvim-cmp'
Plug 'pieces-app/plugin_neovim'
call plug#end()Install the plugins by running :PlugInstall in Neovim.
- Add the following lines to your
init.lua:
-- init.lua
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
use 'kyazdani42/nvim-web-devicons'
use 'MunifTanjim/nui.nvim'
use 'hrsh7th/nvim-cmp'
use 'pieces-app/plugin_neo_vim'
end)Install the plugins by running :PackerSync in Neovim.
-
download python and pynvim (
pip install pynvim) -
Run :UpdateRemotePlugins
The Pieces Neovim plugin provides several commands to interact with Pieces OS. Here's a list of available commands:
Check the health of Pieces OS.
:PiecesHealthDisplay the version of Pieces OS.
:PiecesOSVersionDisplay the current version of the Pieces Neovim plugin.
:PiecesPluginVersionOpen the Pieces Copilot window in a split view.
:PiecesCopilot- Press
ito enter insert mode and type your message. - Press
<Esc>to exit insert mode. - Press
<Enter>to send the message to Pieces Copilot and see the response.
In the Copilot chat input, you can use slash commands to perform specific actions:
Change the current LLM model.
Open a list of Pieces Copilot conversations to choose from.
:PiecesChatsNavigation and actions:
- Press
<Del>on the selected conversation to delete it - Use
<Up>and<Down>arrow keys to navigate the conversation list - Press
<Enter>to open the selected conversation in the Copilot
List all of the saved materials.
:PiecesDriveNavigation and actions:
- Use
<Up>and<Down>arrow keys to navigate the material list. - Press
<Enter>to open the selected material for editing. - Press
<Del>on the selected material to delete it. - When editing a material:
- Press
ito enter insert mode and make changes. - Press
<Esc>to exit insert mode. - Type
:wand press<Enter>to save the edited material. - Type
:qand press<Enter>to exit the material editor.
- Press
Create a material from the selected text in the visual mode.
:PiecesCreateMaterial- Enter visual mode by pressing
vin normal mode. - Select the desired text using arrow keys or Vim motions.
- Type
:PiecesCreateMaterialand press<Enter>.
Shows your Pieces account information such as Username, Email, Personal Cloud Status and Personal Domain in a new window.
:PiecesAccountYou can also logout from your account by going to the Logout option in the Auth status menu and then press enter. You will be logged out of your Pieces account.
Sign into your Pieces account.
:PiecesLoginLogout of your Pieces account.
:PiecesLogoutConnect to your Personal Pieces Cloud.
:PiecesConnectCloudDisconnect from your Personal Pieces Cloud.
:PiecesDisconnectCloudNote: In order to use the Personal Pieces Cloud commands, you must have an account connected to Pieces OS.