ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.48k stars 2.81k forks source link

Disable per-filetype grouping of identifiers #78

Closed stefan-w closed 2 years ago

stefan-w commented 11 years ago

For the identifier-based engine, the identifiers are put into per-filetype groups. This is annoying when dealing with projects that cover multiple filetypes, e.g. bibtex and latex (typing reference identifiers is a pain with ycm, much easier with plain vim). I guess for example CSS/HTML would benefit from this too. So, an option to disable the grouping would be nice.

meh commented 11 years ago

Or maybe even group filetypes in different groups, that would be even cooler.

Valloric commented 11 years ago

I'm iffy on this. I'll think about it some more, but I'm not sold yet.

blueyed commented 11 years ago

It would be nice being able to disable this completely, or define it in a map: e.g. use "html", "js", "css", "php" and "smarty" filetypes in "smarty" buffers (Smarty is a PHP template language).

jemmyw commented 11 years ago

Custom groups would be good, example, ruby: [".rb", ".erb"]

blueyed commented 11 years ago

Any news on this issue? Especially with web development there are a lot of different filetypes involved (html, scss/sass/css, ...) and it would be very useful to get completion across them.

chtenb commented 11 years ago

I think this should not be implemented in YCM, but rather in the vim core. It namely doesn't only affect completion, but also syntax highlighting, indentation, formatting etcetera. The best solution would be one that is provided by vim itself.

chiphogg commented 11 years ago

I also have this problem autocompleting in commit messages with fugitive.

Anyway, as a workaround, you can always fall back on prefix-based completion. To use vim's standard prefix-based completers C-N and C-P, simply do a C-X first: so, C-X C-N and C-X C-P.

bjoernd commented 11 years ago

No idea if this is the right place to mention it, but I implemented a completer for LaTeX that completes \cite{} and \ref{} commands. https://github.com/bjoernd/vim-ycm-tex

Valloric commented 11 years ago

@bjoernd

  1. No, this is not the right place to mention it. A good place would have been the ycm-users mailing list, not a completely unrelated issue on the tracker.
  2. Custom completers are meant to be upstreamed, not acquired separately. The Completer API is not public but internal to YCM. If you don't upstream your custom completer, it will break in the future when the Completer API changes.
bjoernd commented 11 years ago

Sorry. My fault.

blueyed commented 10 years ago

@szw Can you please provide your fix for this in a separate branch / pull request?

szw commented 10 years ago

Hi @blueyed!

Well, that wasn't tought out as a pull request at all. As I remember my intention was to propose a temporary workaround for that issue. Of course, I could try to come back to this (6 months!), but I rather doubt that @Valloric likes that proposal ;).

Notice also, that being inpired by YCM I have created my own Ruby-based solution and henceforth I don't follow YCM. Therefore, it's quite possible my workaround won't work with the current codebase of YCM.

thet commented 10 years ago

i'd also love to have this feature. e.g. while writing docs, it would be awesome to have identifiers from source code available.

icycandy commented 10 years ago

hope to have this feature. i work with .py and .sh a lot, wish to have ycm work with different filetypes

mklinik commented 6 years ago

Happy YouCompleteMe user here. I installed it years ago and never touched it again because it just works great. Except for identifier completion across latex and bibtex. It's not a big deal, but still +1 for this feature request.

puremourning commented 2 years ago

This issue is nearly 10 years old now and it's highly likely that tit will be implemented.