dlang-community / DCD

The D Completion Daemon is an auto-complete program for the D programming language
GNU General Public License v3.0
349 stars 71 forks source link

Differentiate UFCS functions from regular fields #752

Closed ryuukk closed 1 year ago

ryuukk commented 1 year ago

I got confused from a completion for a struct, there was bunch of functions there, i thought they were defined in that struct, but nope it was a global function..

image

Perhaps prefix the name with a symbol? >on_tick or [u] on_tick?

Or have an option to disable it, i personally don't use UFCS, i find it to be code confuser, and i suspect it cause bunch of delays in the completion from large modules (windows one)

vushu commented 1 year ago

You can make a flag for it wrapping this call: https://github.com/dlang-community/DCD/blob/8a693954d31c09fdfea3887b9bc75a6b66cfe9e7/dsymbol/src/dsymbol/conversion/package.d#L56

WebFreak001 commented 1 year ago

UFCS functions are using F instead of f as completion kind