Skip to content

Markdown handling does not engage when setting language to markdown, or saving as .md file #1117

@dragonfyre13

Description

@dragonfyre13

Special markdown handling (such as from #1095) works well when opening an existing .md file, however when an already open buffer is set to use the markdown language or multimarkdown language, none of the handling appears to be in force. I expect when I switch a buffer (existing file or in-memory buffer) to have language set to markdown or multimarkdown that it'll also initialize the same handling as if I opened a markdown file in that buffer. Similarly, if I set the current language of a buffer from markdown or multimarkdown to something else, I expect it will no longer consider itself as in a markdown file, thus no longer calling globalThis.md_src_enter or globalThis.md_src_tab.

For context, saving an existing buffer as a .md file also doesn't recognize it's in a markdown file, though I wouldn't expect it to since it also currently doesn't set the language based on the saved file ending either. It would be pretty standard for an editor to set the language mode of a file on saving to a new filename, but that's not currently how file saving works in Fresh it seems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions