Metals: Metals doesn't offer autofill scaladoc comment without underlying string of valid scala code

Created on 16 Jul 2020  路  3Comments  路  Source: scalameta/metals

When i try to insert scaladoc comment, metals offer do this automatically like at screenshot

Screenshot 2020-07-16 at 13 29 59

As you can see, there is valid definition of function "repeatString" under the comment

But if i:

  • remove
  • comment
  • write comment after function definition

then metals will not offer me an autofilling

Screenshot 2020-07-16 at 13 41 51
Screenshot 2020-07-16 at 13 42 58
Screenshot 2020-07-16 at 13 43 49

Installation:

  • Operating system: macOS
  • VSCode version: June 2020 (version 1.47.1)
  • Metals version: v1.9.2

Search terms

scaladoc autofill

improvement

Most helpful comment

We could just add an empty comment if nothing is defined afterwards, something like:

/**
  *
  */

shouldn't be too difficult. This needs to be done in the Metals server though, so I will move it there.

All 3 comments

Thanks for reporting! This is working intended, scaladoc comments as far as I know are added for methods, classes etc.

What is your use case in this situation? Why would you add a scaladoc comment without Scala code to accompany it? This would just be a simple comment and not really useful in any kind of documentation (unless I am mistaken.)

Hi!
Sorry for delay.

Sometimes i exactly know what i will write(it's about code), so i want write a comment before i will starting write class/methods definitions.

We could just add an empty comment if nothing is defined afterwards, something like:

/**
  *
  */

shouldn't be too difficult. This needs to be done in the Metals server though, so I will move it there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laughedelic picture laughedelic  路  4Comments

vadeg picture vadeg  路  3Comments

gabro picture gabro  路  3Comments

keirlawson picture keirlawson  路  3Comments

sideeffffect picture sideeffffect  路  4Comments