GithubHelp home page GithubHelp logo

Comments (10)

twchn avatar twchn commented on August 10, 2024 6

不太确定我有没有正确理解的你的问题。

你可以试试在VS Code里,点击File > Open Folder..., 然后选择目标文件夹(默认情况下所有题目会存储在$HOME/.leetcode/),这个时候你就可以在VS Code里看到所有文件了。

image

我觉得在点击show problem时先判断一下本地有没有文件再来决定打开本地文件(如果本地有)或者拉取题目(如果本地没有)这样好一点,因为这样可以看到之前的草稿或者提交的答案

from vscode-leetcode.

evan-lin9 avatar evan-lin9 commented on August 10, 2024 1

@jdneo yes

from vscode-leetcode.

poppinlp avatar poppinlp commented on August 10, 2024 1

Of course. I'll send it this weekend. :)

from vscode-leetcode.

jdneo avatar jdneo commented on August 10, 2024

不太确定我有没有正确理解的你的问题。

你可以试试在VS Code里,点击File > Open Folder..., 然后选择目标文件夹(默认情况下所有题目会存储在$HOME/.leetcode/),这个时候你就可以在VS Code里看到所有文件了。

image

from vscode-leetcode.

jdneo avatar jdneo commented on August 10, 2024

@taoweicn This is a good suggestion.

@SkyLin0909 Do you mean to make the extension work as @taoweicn said?

from vscode-leetcode.

poppinlp avatar poppinlp commented on August 10, 2024

@jdneo Hi,请问这是一个 PR-welcomed 的 issue 么?

from vscode-leetcode.

jdneo avatar jdneo commented on August 10, 2024

@poppinlp All the issues are PR welcomed. Just remember to discuss the implementation in the issue before sending out the PR.

Thanks

from vscode-leetcode.

poppinlp avatar poppinlp commented on August 10, 2024

@jdneo
Thanks. Nice!
I've looked into the code about this issue since it really bothers me.

This issue is caused by the params we passed into the show API of leetcode-cli which will generate a new source code file every time. And i haven't seen a param for existence checking in show API.

So here may be some plans:

A: We could genearte the file name by ourself and by which we could do the existence checking to determine whether to use the local code or get the remote template by show API from leetcode-cli.

This could solve this problem but we may meet some new problems too:

  • generating file name by id and slug which should be compatible with the present
  • mapping the file extension with language

B: We could use show API to generate source file in a temp path and by which we could get the file name. Then do the existence checking.

It's a little bit simple solution but may cost more time since we will always call the API.

So, what's your option about this? I prefer the plan A and i feel free for any ideas. :)

from vscode-leetcode.

jdneo avatar jdneo commented on August 10, 2024

@poppinlp Plan A sounds good to me. Would you like to make a PR for it?

from vscode-leetcode.

jdneo avatar jdneo commented on August 10, 2024

Has been addressed with the help of @poppinlp in #149.

Will release in 0.11.0

from vscode-leetcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.