Skip to content

Stop completions inside of comments #102

@nicholas-peterson

Description

@nicholas-peterson

Description

Often I'll be writing a comment using '///','//', or '(* .. *)' and want to enter a carriage return or tab. If company mode suggests a completion right as I'm doing this, it enters the completion rather than the desired keystroke. It strikes me as rare that someone would need the completion inside a comment, and wondered if it would help anyone else to simply not trigger completions inside comments?

Repro steps

  • Open a .fsx file with a project and start entering a comment.
  • Then place a space, or single character that would start a completion as the end of the line being entered. For instance ' ' or 'a'. This starts the completion menu from company mode.
  • Then hit enter.

Expected behavior

Instead, the completion menu would never trigger because we're inside a comment block.

Actual behavior

The completion menu triggers, suggests a completion, and that keyword is entered rather than a carriage return.

Known workarounds

Cancelling company mode completion using C-g seems to work, just taxing to perpetually do on multi-line comments.

Related information

  • Windows 10
  • 25.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions