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

MacOS: In which directory is the settings file expected to be? #84

Closed
tilo opened this issue Jan 27, 2025 · 5 comments
Closed

MacOS: In which directory is the settings file expected to be? #84

tilo opened this issue Jan 27, 2025 · 5 comments

Comments

@tilo
Copy link

tilo commented Jan 27, 2025

What is the correct location of the GitHubinator.sublime-settings file on MacOS?

I'm trying to switch the default branch to main

Problems adding a Settings file

  1. GitHubinator does not expose "Settings" under the "Sublime Text > Settings > Package Settings" menu

  2. I tried adding the file manually in these locations, but it does not get picked up:

I also tried these locations, which also did not work..

~/Library/Application Support/Sublime Text/Packages/User/GitHubinator.sublime-settings
~/Library/Application Support/Sublime Text/Packages/GitHubinator.sublime-settings
~/Library/Application Support/Sublime Text/Packages/GitHubinator/GitHubinator.sublime-settings

Ask

  1. Please document the location in the main README file 😃

  2. Please expose the settings in the Sublime Text "Settings" menu

@ehamiter
Copy link
Owner

try

~/Library/Application Support/Sublime Text/Installed Packages/GitHubinator.sublime-settings

@tilo
Copy link
Author

tilo commented Jan 27, 2025

@ehamiter thank you, Eric! Will do!

FYI: looks like other packages move their settings file to the "Packages" dir.

@tilo
Copy link
Author

tilo commented Jan 27, 2025

@ehamiter unfortunately that did not work for me

% pwd
~/Library/Application Support/Sublime Text/Installed Packages
% cat GitHubinator.sublime-settings
{
  "default_remote": "origin",
  "default_host": "github.com",
  "default_branch": "main"
}

and restarted Sublime - but it does not get picked up
permissions are -rw-r--r--

@ehamiter
Copy link
Owner

Hi @tilo -- unfortunately I don't have any extra time to work on this for now, and it seems preferences might be treated differently depending on if it were installed via package control or via cloning.

The proper location was what you had initially:

~/Library/Application Support/Sublime Text/Packages/User/GitHubinator.sublime-settings

I can test loading settings like this (in Sublime, via CTRL-`):

>>> import sublime
>>> settings = sublime.load_settings("Githubinator.sublime-settings")
>>> settings.get("default_branch")
'master'

It seems it is not pulling up local file settings and is instead pulling up what is embedded in the package control install.

Your config is what should be standard though-- I'm going to update master references to main as that is the default for branches regardless so theoretically once it gets pushed up a new installation for you should just work.

I may have time at some point to figure out settings details, but in the meantime I welcome any pull requests if anyone is feeling sporty.

Sorry for the trouble--

Eric

@tilo
Copy link
Author

tilo commented Jan 29, 2025

thank you for looking into this, @ehamiter !

Opening the file's git blame in GitHub is really useful!

An option to directly open up the last PR that touched a given line in GitHub would also be great!

@tilo tilo closed this as completed Feb 9, 2025
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