From cbae81fdae44e6fad17da9191ee63901d4c6d32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8D=AB?= Date: Mon, 25 Jul 2022 18:25:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9B=B4=E6=96=B0readme#123456?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 208 ++++++++++-------------------------------------------- 1 file changed, 37 insertions(+), 171 deletions(-) diff --git a/README.md b/README.md index e00120d..33a392d 100644 --- a/README.md +++ b/README.md @@ -1,204 +1,70 @@ -# algorithm +# leetcode-design README -An excellent vscode extension for leetcode. +This is the README for your extension "leetcode-design". After writing up a brief description, we recommend including the following sections. -## Document | [中文文档](./docs/README_zh-CN.md) +## Features -## Quick Start +Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. -![Quick Start](./images/debug.gif) +For example if there is an image subfolder under your extension project workspace: -## Support +\!\[feature X\]\(images/feature-x.png\) -- javascript -- typescript -- python3 -- golang -- java -- c++ -- shell -- sql - -**will support other language soon** - -## Main Features - -- write testcase in the file and run test in local, support link list and tree - -- debug the testcase - -- memo - -- multi-solution and history - -- support import module, bundle code and copy the build code.(only support js/ts) - -- contain contest (Do not submit directly when you attending weekly contest, - copy the code and submit in browser instead.) - -## Other Features - -- search question -- contain daily challenge -- support login in https://leetcode.com/ and https://leetcode.cn/ +> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. ## Requirements -- javascript/typescript - - - Nodejs 12+ - - > The `test` and `debug` will use `node` to execute. - > Make sure that `node` is in your PATH environment variable.If you're using nvm, you may need to set the `algorithm.nodePath` in the VS Code settings. - -- python3 - - - Make sure that `python3` is in your PATH environment variable. - - install the official Python extension(https://code.visualstudio.com/docs/python/python-tutorial) - -- golang - - - Make sure that `go` is in your PATH environment variable. - - install the official golang extension - -- java - - - Make sure that `java`,`javac` is in your PATH environment variable.Or [set javaPath and javacPath](#setting) - - install the official java extension (https://code.visualstudio.com/docs/java/java-tutorial) - > ensure the extension `Debugger for Java`>=v0.33.1 or the extension `Java Extension Pack`>=v0.14.0 - -- c++ - - - Install GCC C++ compiler (g++).And make sure that `g++` is in your PATH environment variable. - - Install the C++ extension for VS Code. - more detail in the website (https://code.visualstudio.com/docs/cpp/config-linux) - -## Pick a question - -Click the question in the `algorithm view` - -## Switch code lang - -press `ctrl+shift+p` and run the Command `algorithm:switch default language` - -## Switch database - -press `ctrl+shift+p` and run the Command `algorithm:switch default database` - -## shortcut buttons - -> Just click the shortcut button in the `view toolbar` to - -- refresh question -- search question -- login in -- switch endpoint -- collapse all - -![shortcut buttons](./images/shortcut.png) - -## Switch endpoint - -### current support: - -- leetcode.com -- leetcode.cn - -> Note: The accounts of different endpoints are not shared. - -## Login in - -The way to login in referred to the official extension [vscode-leetcode](https://github.com/LeetCode-OpenSource/vscode-leetcode). - -- leetcode.com support github and cookie login. -- leetcode.cn support account,github and cookie login. - -## Test in the file - -The code contains default testcase from question preview. - -By clicking the test codelens hover in the vscode to run the test in local. - -You can add customized testcase in the code like `// @test(param)=result`. -![test](./images/test.png) - -## Debug - -You only need to set breakpoints on the testcase line and set breakpoints for the code. - -:tada: Then enjoy debugging! - -![debug](./images/debug.png) - -> Note:If you are debugging java,ensure the extension `Debugger for Java`>=v0.33.1 or the extension `Java Extension Pack`>=v0.14.0. If you build error when debugging,press `ctrl+shift+p` and run the Command `Java:Clean Java Language Server Workspace`. - -> Note:If you are debugging c++ in m1, you need install the vscode extension named `CodeLLDB` - -## Submit +If you have any requirements or dependencies, add a section describing those and how to install and configure them. -Click the submit hover to submit your code. You can use build to view the final submitted code. +## Extension Settings -![build.png](./images/build.png) +Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. -## Memo +For example: -You can create different folders and add questions to them. -![memo](./images/memo.gif) +This extension contributes the following settings: -## Multi-solution and History +* `myExtension.enable`: enable/disable this extension +* `myExtension.thing`: set to `blah` to do something -![solution](./images/history.png) +## Known Issues -1. Click the history codelens, you will see the answers and submit history. -2. Add the comment `@desc $(method name)` in the code, it will generate description or comment when `submit` or use `new leetcode answer` command. -3. Right click the mouse,you will see the `new leetcode answer` command.This command will save your old answer and init a new answer.You can scan it in 4. -4. the old answers -5. submit solution save in local -6. submit solution save in leetcode +Calling out known issues can help limit users opening duplicate issues against your extension. -## Weekly Contest +## Release Notes -When you participate in Weekly Contest, you may choose c++,java,python. Because they have the built-in library like STL that contains priority queue,order set etc. +Users appreciate release notes as you update your extension. -Now you have another choice. +### 1.0.0 -### **Attention!** +Initial release of ... -Do not submit directly when you attend weekly contest,click `build` and then -click `copy` to copy code , finally paste the code in browser and submit. +### 1.0.1 -### build code & copy code +Fixed issue #. -This is useful in the weekly contest. +### 1.1.0 -- click the build codelens hover. +Added features X, Y, and Z. -![build.png](./images/build.png) +----------------------------------------------------------------------------------------------------------- +## Following extension guidelines -- focus the code view then click the copy icon. +Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension. -![copy.png](./images/copy.png) +* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) -> The code import module [algm](https://github.com/supperchong/algm) which contains many useful function and data structure, such as `priority queue`,`Segment tree`, `union–find` ,`skip list`. :rocket: Thanks to treeshake and rollup, the bundle code is very clean. +## Working with Markdown -## Setting +**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: -press `ctrl+,` or open `file->Preferences->Settings`, you will see User and Workspace setting. Workspace setting will override User setting. -open `Extensions->algorithm`,you will see the settings: +* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux) +* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) +* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets -| Setting Name | Description | Default Value | -| --------------- | ------------------------------------------------------------------------------------------------- | ------------- | -| Auto Import Str | The string will be inserted at the beginning of the coding file | "" | -| Base Dir | The path of the folder to save the problem files | $HOME/.alg | -| Code Lang | default code language | JavaScript | -| Lang | Specify the active endpoint.support leetcode.com and leetcode.cn | leetcode.com | -| Node Path | The absolute pathname of the executable that started the Node.js process. eg: /usr/local/bin/node | node | -| javaPath | The absolute pathname of java | java | -| javacPath | The absolute pathname of javac | javac | -| Database | default sql language | MySQL | -| displayLock | if true, will display the locked questions. | false | +### For more information -## Thanks +* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) +* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) -Thanks to the official extension [vscode-leetcode](https://github.com/LeetCode-OpenSource/vscode-leetcode), the algorithm extension -has reference some design and the login method. +**Enjoy!** -- Gitee