ladislas / Bare-Arduino-Project

Start your Arduino projects right out of the box
MIT License
565 stars 68 forks source link

vim YouCompleteMe still not working with .ino files #37

Closed UsoHolger closed 7 years ago

UsoHolger commented 7 years ago

I placed .ycm_extra_conf.py in the project directory but YCM still does not work at all. For example: When I type test. where test is the name of an object of a test class I do not get any suggestions for method names. When I try to force autocompletion I get E764: Option 'omnifunc' is not set

When I try to use the go to definition feature the error is ValueError: No semantic completer exists for filetypes: [u'arduino']

ladislas commented 7 years ago

hmm...

I'm not sure it works with .ino files, and this project doesn't support .ino files either.

can you post your .ycm_extra_conf somewhere, so I can take a look?

UsoHolger commented 7 years ago

Thanks for the reply. I am using your version, I only updated the library paths for my linux installation. But it seems like it is not even loaded. :YcmDebugInfo says the file was found but not loaded. The reason is given in the error log file:

2017-03-12 10:18:21,169 - INFO - Received debug info request
2017-03-12 10:18:21,170 - ERROR - No semantic completer exists for filetypes: [u'arduino']
Traceback (most recent call last):
  File "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/../ycmd/handlers.py", line 243, in DebugInfo
    request_data ).DebugInfo( request_data )
  File "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/../ycmd/handlers.py", line 290, in _GetCompleterForRequestData
    return _server_state.GetFiletypeCompleter( request_data[ 'filetypes' ] )
  File "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/../ycmd/server_state.py", line 90, in GetFiletypeCompleter
    current_filetypes ) )
ValueError: No semantic completer exists for filetypes: [u'arduino']

Edit: It seems like I could resolve the issue with set filetype=cpp in vim for .ino files but is that the way it is supposed to be done? Now I can't use this syntax file anymore which was handy for highlighting the arduino functions.

ladislas commented 7 years ago

yep, the issue is the one I thought, it doesn't recognize the arduino file type.

setting filetype to cpp should not stop highlighting of functions. have you tried https://github.com/sheerun/vim-polyglot

either way, it is outside the scope of this project :)

I'm closing the issue as it has been resolved.