-
Notifications
You must be signed in to change notification settings - Fork 2
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
Misc. changes + Go major mode (that follows no real Spacemacs layers but "feels right" to me) #3
Conversation
macintacos/vspacecode-config.json
Outdated
"type": "command" | ||
} | ||
], | ||
"key": "A", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like i
is often used in other layers for import, and as well for inserting, although, I understand it is a bit weird that it has a remove command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I'm cool with changing this to "i" - I just kept seeing the word "add" and just felt like it needed to be an "a", but I can switch this over to "i" if it's a convention most folks are familiar with
Make sense. I guess I will treat this as review for the go binding? I think the go binding makes sense for the most part. As far as the major mode bindings, the expectation is try to match the convention like |
I will review this soon |
This is so huuuuge, as always thank you so much! |
macintacos/vspacecode-config.json
Outdated
{ | ||
"bindings": [ | ||
{ | ||
"command": "go.languageserver.restart", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remap this to spc b r
. In fact, if you check the lsp docs you will see that this is very similar to the "lsp-workspace-restart" action.
I wasn't able to get this binding in go (I don't use go, so I just installed the spacemacs layer and nothing else, therefore my environment might be broken), but for example in rust I see this option.
spc b
stands for backend
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this too, it doesn't seem like there is a consistent naming across different layers. For example, Python layer uses v
to represent environment (I assume from venv
), C# layer has s
to represent OmniSharp (its language server). If b
more common, maybe we should just use b
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b
is different from environment (I think). I was talking just about this key binding.
I was ok with the other SPC e
section.
But I am not a go developer as I said.
b
is related to the language server protocol, I think we should use the lsp key bindings everywhere because they are common on almost every language (I think).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got you, that makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair - I was using e
since it corresponded with "environment", and I made the stretch of SPC f e R
(restarting your editor config) to be synonymous with "restarting something" (in this case, restarting the language server). If this is a typical keybinding for LSP, I'll move over to using that, but does that mean everything else should move over there as well? Would feel like a weird split I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I hear a strong objection, I'm just going to change the e
menu to b
, since that's more in-line with what the LSP docs expect. Will push that shortly.
For me that's it for the review. Again, I haven't checked everything. |
I was planning on doing a PR in the main repo if y'all didn't have any objections to the way I was structuring things - I didn't want to put all the effort in just for you to think that I should go in a completely different direction 🙂 In the future, I'll just open the PR - no worries! |
RFAL |
Thank you for the quick turnaround. How about we merge this, and review the one when you open a PR in the main repo? btw, in the main repo, the object key order should probably follow the rest of the bindings like in the order "key", "name", "type", "command" to be consistent.
What does this mean? |
It doesn't make sense because in his config he will delete this once the changes are in the main repo I think. So we should just close this pr I think. Macintacos, when you do the PR, please follow alphabetical order, thanks. Rfal means ready for another look I think. It took me a while to figure it out 😂 |
Or you could delete the go part from this pr and keep the other key bindings, and we merge it. Anyway I reviewed your changes. They look good to me |
Either way works for me :) just a suggestion.
That makes sense 😅 |
Oh darn sorry, I use "RFAL" all the time at work (damn you jargon) - should be more clear about that in the future 😓 Sure I'll move forward with removing the "Go" bindings and get that update out to get this merged, and will open a PR in VSpaceCode as soon as I can! Thanks! |
Oh and last bit - the ordering I have in my config is because I sort all JSON alphabetically in my own projects by key name (checking out my settings.json if you're curious). I'll make sure I keep it consistent with other mappings in VSpaceCode proper when I open that PR 🙂 |
Ready For Another Look 🙂 |
I just going to merge it since you are the owner of this config :) Feel free to update this whenever you need. |
I added a Go major mode that I initially wanted to make for VSpaceCode proper, however the existing Go spacemacs layer is really.... messy in its organization (IMO). It doesn't help that I started Go development only after I stopped using Spacemacs, so looking at that layer was pretty alien to me.
Since VSpaceCode is trying to keep to what Spacemacs users are familiar with, I opted to add them to my config first and then see what the maintainers think :)