Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: when manually running set filetype <type>, micro should reload appropriate settings from the config file for that type, but it doesn't #2712

Closed
ElectricRCAircraftGuy opened this issue Jan 26, 2023 · 2 comments

Comments

@ElectricRCAircraftGuy
Copy link

ElectricRCAircraftGuy commented Jan 26, 2023

Description of the problem or steps to reproduce

Use this config file:

~/.config/micro/settings.json:

{
    "*.md": {
        "softwrap": true
    },
    "colorcolumn": 80,
    "colorscheme": "monokai",
    "savecursor": true,
    "scrollbar": true,
    "scrollspeed": 5,
    "wordwrap": true
}

Notice how it has custom settings for *.md files.

Now, run micro to edit a new file. Set syntax highlighting to markdown, with Ctrl + E then cmd: set filetype markdown. Now, since the config file above says to have softwrap on, it should. But, it doesn't. That's the bug. It should reload the config settings for the *.md filetype once I run set filetype markdown, but it doesn't. You can paste a bunch of text and it won't wrap.

Specifications

Commit hash: 225927b
OS: Linux Ubuntu 22.04
Terminal: terminator 2.1.1

Work-around

Save the open file as a .md markdown file. Close and re-open it in micro to get micro to apply the proper config settings when editing it.

@ElectricRCAircraftGuy ElectricRCAircraftGuy changed the title Bug: when manually running set filetype <type>, micro should reload appropriate settings from the config file for that type Bug: when manually running set filetype <type>, micro should reload appropriate settings from the config file for that type, but it doesn't Jan 26, 2023
@zyedidia
Copy link
Owner

zyedidia commented Jan 26, 2023

I believe the reload command will force a reload of the settings file but maybe it should be automatically run specifically after changing the filetype.

@ElectricRCAircraftGuy
Copy link
Author

but maybe it should be automatically run specifically after changing the file format.

Agreed. That sounds like a good fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants