Skip to content

delphinus/cmp-wezterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmp-wezterm

WezTerm source for nvim-cmp and blink.cmp.

Features

Pulls the visible text of other WezTerm panes (via wezterm cli get-text) and offers the words it finds — file paths from ls, identifiers from a git log, URLs in curl output, etc. — as completions in your buffer.

  • Gather completion candidates from other WezTerm panes via wezterm cli
  • Filter by current tab / current window (all_tabs, all_windows options)
  • Cancellation support — in-flight wezterm cli subprocesses are SIGTERM'd when the completion list is destroyed (used by blink.cmp; nvim-cmp users get the same protection if they call the cancel fn)
  • Pane location (win:tab:id) shown in labelDetails
  • Works with both nvim-cmp and blink.cmp

Requirements

  • Neovim v0.10.0
  • nvim-cmp or blink.cmp
  • WezTerm

Installation

With nvim-cmp

{ "delphinus/cmp-wezterm" },
require("cmp").setup {
  sources = {
    { name = "wezterm" },
  },
}

With blink.cmp

{
  "saghen/blink.cmp",
  dependencies = { "delphinus/cmp-wezterm" },
  opts = {
    sources = {
      default = { "wezterm" },
      providers = {
        wezterm = {
          name = "wezterm",
          module = "blink-cmp-wezterm",
          -- `wezterm cli list` plus the per-pane `get-text` calls can take
          -- tens of milliseconds. Mark the provider async so blink.cmp shows
          -- results from cheaper sources (buffer, snippets, etc.) immediately
          -- and merges WezTerm candidates in as they arrive.
          async = true,
        },
      },
    },
  },
}

More info

See detail in doc.

TODO

  • doc
  • Capture only the current tab / window.
  • Capture history
  • Capture workspaces
  • Capture clients

About

WezTerm source for nvim-cmp

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages