cmp-dotenv icon indicating copy to clipboard operation
cmp-dotenv copied to clipboard

Trigger character or manual trigger?

Open chuan2984 opened this issue 1 year ago • 4 comments

Hey there, i have been searching for a completion source like this. I work in a codebase that contains 100+ envs, and almost any letter would be a hit. Is there a way to set this so that it only triggers on all snake case captialized chracters? Or is there a way to set a manual trigger? Thanks!

chuan2984 avatar Mar 24 '24 06:03 chuan2984

You're right, I did it this way so I could get the completion every time, I think customizing it might be a good idea

SergioRibera avatar Mar 24 '24 07:03 SergioRibera

Any pointer in customizing it, pretty please? im relatively new. Google around for a bit couldnt find much

chuan2984 avatar Mar 25 '24 14:03 chuan2984

Hi @chuan2984 if you are still interested, I have made a plugin which provides all-in-one toolkit to work with .env files and environment variables. You can check it out here: https://github.com/philosofonusus/ecolog.nvim

It allows you to add custom trigger patterns for different file-types to avoid such issue. It has both nvim-cmp and blink-cmp support, and it implements this specific feature here: https://github.com/philosofonusus/ecolog.nvim?tab=readme-ov-file#-custom-providers

ph1losof avatar Jan 13 '25 11:01 ph1losof

@philosofonusus a great plugin, just downloaded it, its working flawlessly, exactly what I lacked. Thanks!

chuan2984 avatar Jan 27 '25 02:01 chuan2984