Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andersevenrud/cmp-tmux
Tmux completion source for nvim-cmp and nvim-compe
https://github.com/andersevenrud/cmp-tmux
lua neovim neovim-plugin nvim-cmp nvim-compe nvim-plugin tmux
Last synced: 8 days ago
JSON representation
Tmux completion source for nvim-cmp and nvim-compe
- Host: GitHub
- URL: https://github.com/andersevenrud/cmp-tmux
- Owner: andersevenrud
- License: mit
- Created: 2021-04-02T17:28:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-29T17:17:17.000Z (9 months ago)
- Last Synced: 2024-10-14T17:47:40.791Z (about 1 month ago)
- Topics: lua, neovim, neovim-plugin, nvim-cmp, nvim-compe, nvim-plugin, tmux
- Language: Lua
- Homepage:
- Size: 30.3 KB
- Stars: 121
- Watchers: 6
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# cmp-tmux
Tmux completion source for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp).
**If you're looking for a [nvim-compe](https://github.com/hrsh7th/nvim-compe) version of this extension, use the [following branch](https://github.com/andersevenrud/compe-tmux/tree/compe)**.
> This extension [pulls text from your current tmux session](https://github.com/andersevenrud/cmp-tmux/issues/14#issuecomment-924877836)
> and provides it as a completion source.
>
> *By default this extension uses adjacent panes as sources. See [configuration](#configuration) to enable all panes.*## Requirements
* [Neovim](https://github.com/neovim/neovim/)
* [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
* [tmux](https://github.com/tmux/tmux)## Installation
Use your package manager of choice. For example [packer.nvim](https://github.com/wbthomason/packer.nvim):
```lua
use {
'andersevenrud/cmp-tmux'
}
```## Setup
```lua
require('cmp').setup({
sources = {
{ name = 'tmux' }
}
})
```## Configuration
To configure this extension, add an options table (defaults shown):
```lua
require('cmp').setup({
sources = {
{
name = 'tmux',
option = {
-- Source from all panes in session instead of adjacent panes
all_panes = false,-- Completion popup label
label = '[tmux]',-- Trigger character
trigger_characters = { '.' },-- Specify trigger characters for filetype(s)
-- { filetype = { '.' } }
trigger_characters_ft = {},-- Keyword patch mattern
keyword_pattern = [[\w\+]],-- Capture full pane history
-- `false`: show completion suggestion from text in the visible pane (default)
-- `true`: show completion suggestion from text starting from the beginning of the pane history.
-- This works by passing `-S -` flag to `tmux capture-pane` command. See `man tmux` for details.
capture_history = false,
}
}
}
})
```## License
MIT