Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 04 20:21
    @puremourning banned @dylanusdt:matrix.org
no-1imit
@no-1imit
oh got it, sorry you're right, I mean Java autocomplete does not work
I create a .java file but its intellisense does not work
Ben Jackson
@puremourning
Is the project set up correctly?
no-1imit
@no-1imit
oh my bad, I thought it is like clang completer and works on a single .java file and don't require a project.
thank you very much.
Ben Jackson
@puremourning
Hmmm. Well jdtls does have something for single files but I’ve never used it.
no-1imit
@no-1imit
thank you
Brian Orwe
@Borwe
I believe jdtls might take time to boot. atleast on my shitty PC it does.
Boris Staletic
@bstaletic
@Borwe JDT's start up time is painfully slow on every PC.
Johnathan Middleton
@johnmiddleton12
Output of :scriptnames
1: ~/_vimrc
2: /usr/share/vim/vim82/ftoff.vim
3: ~/vimfiles/bundle/Vundle.vim/autoload/vundle.vim
4: ~/vimfiles/bundle/Vundle.vim/autoload/vundle/config.vim
5: /usr/share/vim/vim82/filetype.vim
6: /usr/share/vim/vim82/ftplugin.vim
7: /usr/share/vim/vim82/indent.vim
8: /usr/share/vim/vim82/defaults.vim
9: /usr/share/vim/vim82/syntax/syntax.vim
10: /usr/share/vim/vim82/syntax/synload.vim
11: /usr/share/vim/vim82/syntax/syncolor.vim
12: ~/vimfiles/bundle/YouCompleteMe/plugin/youcompleteme.vim
13: /usr/share/vim/vim82/plugin/getscriptPlugin.vim
14: /usr/share/vim/vim82/plugin/gzip.vim
15: /usr/share/vim/vim82/plugin/logiPat.vim
16: /usr/share/vim/vim82/plugin/manpager.vim
17: /usr/share/vim/vim82/plugin/matchparen.vim
18: /usr/share/vim/vim82/plugin/netrwPlugin.vim
19: /usr/share/vim/vim82/plugin/rrhelper.vim
20: /usr/share/vim/vim82/plugin/spellfile.vim
21: /usr/share/vim/vim82/plugin/tarPlugin.vim
22: /usr/share/vim/vim82/plugin/tohtml.vim
23: /usr/share/vim/vim82/plugin/vimballPlugin.vim
24: /usr/share/vim/vim82/plugin/zipPlugin.vim
25: ~/vimfiles/bundle/YouCompleteMe/autoload/youcompleteme.vim
ycm has been failing with error YouCompleteMe unavailable: No module named 'ycm'
Boris Staletic
@bstaletic

Number 12 and 25 do match, so...

Check :YcmToggleLogs and see if you can find the complete stack trace of that error.

Johnathan Middleton
@johnmiddleton12
I can't run any ycm commands because it doesn't load at vim startup
Boris Staletic
@bstaletic
What about :messages?
Johnathan Middleton
@johnmiddleton12
Traceback (most recent call last):
File "<string>", line 27, in <module>
ModuleNotFoundError: No module named 'ycm'
Type :qa and press <Enter> to exit Vim
E492: Not an editor command: YcmToggleLogs
Press ENTER or type command to continue
Add, before that line, print(sys.path) and see if it contains ~/vimfiles/bundle/YouCompleteMe/python/

Wait... in this comment: https://github.com/ycm-core/YouCompleteMe/issues/3843#issuecomment-769890543

You've shown Windows paths.

But in :messages you're showing Unix paths.
Johnathan Middleton
@johnmiddleton12
I added the line in youcompleteme.vim and this is now the output of :messages
['\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\python', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests-futures', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\ycmd', '\c\Users\jpmaw\vimfiles\bun
dle\YouCompleteMe\third_party\requests_deps\idna', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\chardet', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\urllib3\src', '\c\Users\
\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\certifi', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\requests', '\\?\C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\python36.zip'
, 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\DLLs', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\lib', 'C:\Program Files\Git\usr\bin', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36', 'C:\Users\j
pmaw\AppData\Local\Programs\Python\Python36\lib\site-packages', '_vimpath']
Traceback (most recent call last):
File "<string>", line 28, in <module>
ModuleNotFoundError: No module named 'ycm'
Boris Staletic
@bstaletic
But where is the \c\Users\ thing coming from, if vim is loading stuff from /usr/share? Which OS are you on?
Johnathan Middleton
@johnmiddleton12
I'm on windows 10, running vim in git bash
Boris Staletic
@bstaletic
That might be causing trouble. Python seems to be confused between Windows and Unix paths.
I don't remember any user trying that before...
Johnathan Middleton
@johnmiddleton12
Ok.. is there any way I can specify which paths to use?
Boris Staletic
@bstaletic
You can influence sys.path with $PYTHONPATH. You can even set it in your vimrc with let $PYTHONPATH=...
Johnathan Middleton
@johnmiddleton12
I just tried that, and it didn't seem to do anything.
I'm wondering if there's any way I can install python locally in the git bash installation?
Boris Staletic
@bstaletic

I just tried that, and it didn't seem to do anything.

Did sys.path change?

I'm wondering if there's any way I can install python locally in the git bash installation?

It has been a long time since I used git bash or Windows. Does "git bash" come with apt?

Johnathan Middleton
@johnmiddleton12
['\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\python', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests-futures', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\ycmd', '\c\Users\jpmaw\vimfiles\bun
dle\YouCompleteMe\third_party\requests_deps\idna', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\chardet', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\urllib3\src', '\c\Users\
\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\certifi', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\requests', '\\?\C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\python36.zip'
, 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\DLLs', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\lib', 'C:\Program Files\Git\usr\bin', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36', 'C:\Users\j
pmaw\AppData\Local\Programs\Python\Python36\lib\site-packages', '_vimpath']
This is new output of sys.path
So same I think
I don't think it does
Because it's just a git unix terminal basically
Boris Staletic
@bstaletic
Hm... What happens in python's shell? What is in sys.path? Does it contain Windows or Unix paths?
Johnathan Middleton
@johnmiddleton12
How do I check that?
Boris Staletic
@bstaletic
Execute python (the same python that vim uses) and run print(__import__('sys').path)
Or python -c "print(__import__('sys').path)"
Johnathan Middleton
@johnmiddleton12
['', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\python36.zip', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\DLLs', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\lib', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\lib\site-packages']
Also I get this error when trying python commands in vim - E319: Sorry, the command is not available in this version
But my vim installation has python3 support
Boris Staletic
@bstaletic

Also I get this error when trying python commands in vim - E319: Sorry, the command is not available in this version

Because that's python2. For python3 you use :python3.

Johnathan Middleton
@johnmiddleton12
Oh ok yes that worked
['\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\python', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests-futures', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\ycmd', '\c\Users\jpmaw\vimfiles\bun
dle\YouCompleteMe\third_party\requests_deps\idna', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\chardet', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\urllib3\src', '\c\Users\
\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\certifi', '\c\Users\jpmaw\vimfiles\bundle\YouCompleteMe\third_party\requests_deps\requests', '\\?\C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\python36.zip'
, 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\DLLs', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36\lib', 'C:\Program Files\Git\usr\bin', 'C:\Users\jpmaw\AppData\Local\Programs\Python\Python36', 'C:\Users\j
pmaw\AppData\Local\Programs\Python\Python36\lib\site-packages', '_vimpath']
This is what I get from executing py3 import sys; print(sys.path) in vim
Boris Staletic
@bstaletic

I'm getting confused with paths again. Inside vim we saw... yes, \c\Users\whatever

But inside python, we have seen C:\Users\whatever.

Does git bash come with its own python?

Johnathan Middleton
@johnmiddleton12
Not that I know of, It's always been that whatever version of python I have in the env variables has been the one that runs in git bash
Boris Staletic
@bstaletic

Okay, with some hacking, we'll be able to get it to work.

From "home", open python, insert the path to YCM/python directory into sys.path and then import ycm. Can you make that work?

Johnathan Middleton
@johnmiddleton12
Ok I tried what I think u said I went into cmd, navigated to home directory, then used python to append the path to ycm, then imported ycm.
All that worked, but the error remains in vim