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

Combine file and range formatting entries in context menu #2123

Merged
merged 1 commit into from
Nov 26, 2022

Conversation

jwortmann
Copy link
Member

This is a first step towards cleaning up the context menu (#1983) by combining "Format File" and "Format Selection" into a single item with dynamic label. It also makes the question obsolete whether "Format File" should be included in the context menu or if the main menu entry is enough (#2066 (comment)).

@rchl rchl merged commit 0d41978 into sublimelsp:main Nov 26, 2022
@jwortmann jwortmann deleted the combine-formatting branch November 27, 2022 09:39
@rchl
Copy link
Member

rchl commented Nov 27, 2022

BTW. Should same treatment be applied to the main menu item (in Edit menu)?

@jwortmann
Copy link
Member Author

I didn't adjust the main menu, because in contrast to the context menu, space limitation is not a significant factor in the main menu. In theory, with the current main menu you could still choose to format the whole file, even if there is a selection in the view (though I'm not sure if anybody would actually want to do this).

Personally I don't have any objections to change it in the main menu too, and make it consistent with the context menu. Then the command palette entries should probably be adjusted as well?

{
"caption": "LSP: Format File",
"command": "lsp_format_document",
},
{
"caption": "LSP: Format Selection",
"command": "lsp_format_document_range",
},


Btw I just saw that the command palette has "Goto Declaration" and "Goto Implementation", but not "Goto Definition" or "Find References".

@rchl
Copy link
Member

rchl commented Nov 28, 2022

I don't have super strong opinion about it but I would lean towards consistency everywhere.

Btw I just saw that the command palette has "Goto Declaration" and "Goto Implementation", but not "Goto Definition" or "Find References".

I've noticed it before and it seemed wrong to me.

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

Successfully merging this pull request may close these issues.

3 participants