Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Add 'show solution' in editor context menu & code lens#313

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jdneo merged 3 commits intomasterfromcs/solution
May 10, 2019

Conversation

jdneo
Copy link
Member

Resolve#269

demo

Need to release cli first.

@jdneojdneo added this to the0.14.2 milestoneMay 8, 2019
@jdneojdneo requested review frompoppinlp andVigilansMay 8, 2019 11:48
return;
}

const language: string | undefined = await fetchProblemLanguage();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We could utilize file extension (path.extName()) andshared.ts/langExt to determine the language, thus no need for re-selecting the language when showing solution from the code:

exportconstlangExt:Map<string,string>=newMap([["bash","sh"],["c","c"],["cpp","cpp"],["csharp","cs"],["golang","go"],["java","java"],["javascript","js"],["kotlin","kt"],["mysql","sql"],["php","php"],["python","py"],["python3","py"],["ruby","rb"],["rust","rs"],["scala","scala"],["swift","swift"],]);

(Yet this choice comes with a risk: currently showing solution for languages like scala has a high probability to fail. This feature could be added in later PR when logic of solution plugin is improved.)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

another rick is that it's hard to differentiate py3 & py2 from theextName

@jdneojdneo merged commit4ad07a8 intomasterMay 10, 2019
@jdneojdneo deleted the cs/solution branchMay 10, 2019 03:05
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@VigilansVigilansVigilans approved these changes

@poppinlppoppinlpAwaiting requested review from poppinlp

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.14.2
Development

Successfully merging this pull request may close these issues.

Add a "show top solution" item to the right click menu, pls
2 participants
@jdneo@Vigilans

[8]ページ先頭

©2009-2025 Movatter.jp