heavenshell / vim-pydocstring

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

Only default template format working #140

Closed nettrino closed 1 year ago

nettrino commented 2 years ago

Hello,

I am using a vim-pydocstring in a vanilla installation of lunarvim stable with nvim 0.7.2. Only the default template is supported, and I can not switch to numpy nor a custom template. The respective config is

{
    "heavenshell/vim-pydocstring",
    config = function()
     vim.cmd("let g:pydocstring_formatter='numpy'")
    end,
  },

I have also tried

{
    "heavenshell/vim-pydocstring",
    config = function()
      vim.cmd("let g:pydocstring_formatter='cnumpy'")
      vim.cmd("let g:pydocstring_templates_path='/Users/nettrino/.config/doq/templates/cnumpy'")
    end,
  },

Do note that running

cat file.py | doq --style=string --formatter=cnumpy --omit=self,cls --indent=4 --template_path=/Users/nettrino/.config/doq/templates/cnumpy works fine and generates the output.

Would it be possible to allow the user to overwrite the command that is going to be running each time for doq? this will allow for easy fixing of issues like the above. Happy to provide any debugging information as needed.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

heavenshell commented 1 year ago

@nettrino Sorry I did not notice this issue. I don't use Neovim and I don't know lua.

Would it be possible to allow the user to overwrite the command that is going to be running each time for doq?

What do you mean?

nettrino commented 1 year ago

@heavenshell no worries - basically I was asking for the addition of an option that allows bypassing the default doq command (e.g., in https://github.com/heavenshell/vim-pydocstring/blob/e8115fecbb3aaf79ad72791008e14e1b7cbd90e6/autoload/pydocstring.vim#L157). This would allow users to more easily customise the plugin for their env