hrsh7th / cmp-path

nvim-cmp source for path
MIT License
627 stars 60 forks source link

Completion for path not starting with dot or slash or tilde #43

Open Jasha10 opened 2 years ago

Jasha10 commented 2 years ago

It seems that the plugin only matches paths starting with . or / or ~. I'd like to have completion for any relative path, even if it starts with a letter or number.

For example:

hrsh7th commented 2 years ago

Yes. It's expected for now. The reason why is that the doesn't work case will make false positive completion.

I can introduce option but I can't think for that name...

Jasha10 commented 2 years ago

I can introduce option but I can't think for that name...

You mean what the option should be called? Maybe something like "require_leading_slash"?

gegoune commented 2 years ago

@hrsh7th How are current triggers set? Maybe just expose that? Could be called trigger_characters or something like that.

amarakon commented 2 years ago

Yes. It's expected for now. The reason why is that the doesn't work case will make false positive completion.

I can introduce option but I can't think for that name...

How will it make false positive completion? Vim's built in file completion (ControlX ControlF) does not have this issue. I believe this should be the default behaviour.