Skip to content

add easier way to change default/fallback language behaviour  #11705

Description

@k4lizen

Motivation

I often edit files which dont have a file type nor shebang (like ~/.gdbinit) and for me they most often use # for comments. Programming languages which use // in general have a file extension so are detected. Maybe # should be the default?

My solution

I want to make it so that # is used for comments by default when a specific language isn't detected.

The problem

This isn't intuitive at all, and reading the docs doesn't help much. It seems the current solution is doing this: #9165 (comment) which seems way to hacky and verbose to overwrite a simple configuration option.
I would expect:

[[language]]
name = "text"
comment-tokens = ["#"]

or something similar to Just Work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions