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

Can edit and save preferences but they're not applied #137

Open
Munchotaur opened this issue Mar 3, 2019 · 10 comments
Open

Can edit and save preferences but they're not applied #137

Munchotaur opened this issue Mar 3, 2019 · 10 comments

Comments

@Munchotaur
Copy link

I just set and saved a few simple preferences:

tab_width: 4
soft_tabs: true
line_length_guide: 72
line_wrapping: true

On restarting amp, none of these were applied. Amp was installed via cargo build in Devuan Ascii.

Am I missing a step somewhere?

@jmacdonald
Copy link
Owner

That seems fine. Did you edit the preferences using the preferences::edit command? My first instinct is that these changes have been written to the wrong file.

@Munchotaur
Copy link
Author

Yes, initially via preferences::edit, which saved them to ~/.config/amp/config.yml. Is there a way to display which config file is in use after launching amp?

@jmacdonald
Copy link
Owner

Sadly, no, there isn't. However, you can call the preferences::reload command, and if it can't find or create a preferences file at the correct location, it'll raise an error, which will be shown on the status line. That should hopefully provide some insight into what's happening. Let me know how that behaves!

@Munchotaur
Copy link
Author

Thanks for the tip. No errors thrown unfortunately!
Is there a option at launch to load a particular config file?

@jmacdonald
Copy link
Owner

There isn't; the intent is for this to be bulletproof, but clearly it isn't!

Can you try putting a type-specific tab width to see if that applies? I'm not 100% convinced that it's the preference file not being read; it might be that the open buffer isn't triggering those global configuration rules, as weird as that may be. 🙂

@Munchotaur
Copy link
Author

Very true -- correctness != bug-free :)

I tried an 'rs' type with a ridiculous width (17 spaces) and that worked perfectly. So I think you're right -- global rules aren't working but type-specific ones are.

@jmacdonald
Copy link
Owner

Nice! I'm curious if the file type itself is confusing the classifier. Can you remove the type-specific configuration and try the global tab_width with same .rs file?

@Munchotaur
Copy link
Author

OK. that worked too. So maybe it's particular settings that aren't working?
I added line_length_guide back and it doesn't appear to have any effect in .rs or plain .txt files.

@jmacdonald
Copy link
Owner

Hmm, line_length_guide works for me; I'm not sure why it wouldn't be applying on your machine. You are seeing the guide, right? It's unlikely, but maybe your terminal colors are set up such that you can't see it, because it matches the background color.

@Munchotaur
Copy link
Author

A good point. I tend to use dark terminal themes, however I have different dark themes in xfce4-terminal, xterm, sakura and guake and the guide didn't show in any of them.

Same appears to be the case for line_wrapping -- not currently applying either.

My uneducated guess is that both these settings are closely related somehow and that they're being prevented by the same thing...

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