Comments (4)
Thank you for your prompt attention to my issue.
In lua/cmp_tmux/source.lua
,
local config = require('cmp.config')
requires cmp.setup
to be called or you won't get anything valuable.
However, people like me may get used to write configures like
-- lazy.nvim
return {
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
...
"andersevenrud/cmp-tmux",
...
},
name = "cmp",
config = function()
...
local cmp = require("cmp")
...
cmp.setup({
...
sources = {
...
{
name = "tmux",
option = {
label = "",
trigger_characters = {},
},
},
...
},
...
})
...
end,
},
}
where cmp.tmux config will be loaded before that setup.
I have spotted a few other issues (like #27) that could be for the same reason.
from cmp-tmux.
Actually I have found a workaround for this issue by not using option
provided by your plugin:
- using
{ name = "tmux", keyword_length = 2, trigger_characters = {} }
to configure trigger rules. - using
lspkind.cmp_format({ before = function()...
to remove that label.
But I'm still interested in improving your plugin. There should be 2 approaches:
- lazy-initializing
source
- adding a setup stage like uga-rosa/cmp-dictionary
I would suggest remove all redundant options which have already been provided by cmp
and move the others into a setup
stage.
from cmp-tmux.
mention this unexpected behaviour
Sorry, but I don't completely understand what you mean here. From what I can tell cmp-tmux registers itself just like other extensions for cmp.
Care to elaborate on this?
from cmp-tmux.
Aha! I actually use pretty much the same setup as you, but actually haven't noticed this!
I'm a little bit busy at the moment, so if you have something in mind that could solve this feel free to open a pull-request.
from cmp-tmux.
Related Issues (17)
- Feature: Search all tabs and panes HOT 4
- Error on last update of cmp HOT 4
- Disable trigger chars HOT 5
- Packer error HOT 2
- How this should work? HOT 8
- [BUG] Error when using Neovim within TMUX popup and nvim-cmp HOT 5
- [Deprecate 'opts' name] nvim-cmp will complain about deprecated 'opts' field HOT 4
- Feature: Search all tabs and panes (from the current session only) HOT 6
- Support multibye charactor / unicode HOT 2
- Allow configuring keyword_pattern
- keyword_pattern didn't work HOT 2
- attempt to index field 'tmux' (a nil value) HOT 4
- Error on nvim start HOT 21
- Support user-defined custom `kind` label HOT 1
- [BREAKING] Extension for nvim-cmp HOT 10
- Trim input string HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmp-tmux.