heavenshell / vim-pydocstring

Generate Python docstring to your Python source code.
BSD 3-Clause "New" or "Revised" License
337 stars 53 forks source link

How to setup in order to work in Windows? #86

Closed bladane closed 4 years ago

bladane commented 4 years ago

I am trying to setup vim-pydocstring on Windows. But so far no success. Vim version:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Oct 12 2019 22:02:45)
MS-Windows 64-bit console version

doq is installed with pip install doq:

λ pip show doq
Name: doq
Version: 0.6.0
Summary: Docstring generator
Home-page: http://github.com/heavenshell/py-doq
Author: Shinya Ohyanagi
Author-email: sohyanagi@gmail.com
License: BSD
Location: c:\users\user\appdata\local\programs\python\python37\lib\site-packages
Requires: parso, jinja2
Required-by:

Doq is working when performing command from command line: λ python -m doq.cli -f fraction.py -w But when trying to do it from vim - it is reporting that doq is not installed. Setup in vimrc related to pydocstring:

"Plugin Pydocstring setup {{{
let g:pydocstring_doq_path = 'c:/users/user/appdata/local/programs/pytho/python37/lib/site-packages/doq'
nmap <silent> <F12> <Plug>(pydocstring) 
"}}}
heavenshell commented 4 years ago

@bladane let g:pydocstring_doq_path = 'c:/users/user/appdata/local/programs/pytho/python37/lib/site-packages/doq'

pytho typo?

bladane commented 4 years ago

@bladane let g:pydocstring_doq_path = 'c:/users/user/appdata/local/programs/pytho/python37/lib/site-packages/doq' pytho typo?

yes - it is a typo. But even with fixed path to python - same result - doq is reported not to be installed.

heavenshell commented 4 years ago

@bladane Does really doq entry point file exists?

c:/users/user/appdata/local/programs/python/python37/lib/site-packages/doq

In my env, doq entry point file is venv/bin/doq

c:/users/user/appdata/local/programs/python/python37/bin/doq

Does doq exists in under bin directory?

bladane commented 4 years ago

Good hint. I searched for doq.exe and found it here: let g:pydocstring_doq_path = 'c:\users\user\AppData\Local\Programs\Python\Python37\Scripts\doq.exe' And now it is working.

Thnx.