Skip to content

Commit

Permalink
First draft for listening typing events
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwal authored and ujjwal committed Feb 7, 2024
0 parents commit d710f30
Show file tree
Hide file tree
Showing 14 changed files with 2,771 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": false,
"commonjs": true,
"es6": true,
"node": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.vscode-test/
*.vsix
5 changes: 5 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'test/**/*.test.js',
});
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
10 changes: 10 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.vscode/**
.vscode-test/**
test/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/jsconfig.json
**/*.map
**/.eslintrc.json
**/.vscode-test.*
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "depilot" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

- Initial release
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Depilot - Decentralized Copilot for Developers

Welcome to Depilot! Depilot is a decentralized Visual Studio Code extension designed to empower developers by providing a collaborative coding environment where developers can monetize their coding style and skills. Coding is an art, and with Depilot, developers can generate side income by sharing their expertise and assisting other developers in their coding journey.

## Features

- **Decentralized Collaboration**: Depilot creates a decentralized network of developers, enabling collaboration and knowledge sharing in real-time.
- **Monetize Your Coding Style**: Developers can monetize their coding style and expertise by offering assistance and suggestions to other developers.
- **Enhanced Coding Experience**: Depilot enhances the coding experience by providing real-time code analysis, suggestions, and auto-fix features.
- **Customizable Settings**: Depilot offers customizable settings, allowing developers to tailor the extension to their preferences and coding style.

## Installation

You can install Depilot via the Visual Studio Code Marketplace or by searching for "Depilot" in the Extensions view in Visual Studio Code.

## Usage

1. Once installed, Depilot automatically connects you to the decentralized network of developers.
2. Start coding as usual, and Depilot will provide real-time suggestions and assistance based on your coding style and preferences.
3. Earn side income by sharing your coding expertise and assisting other developers within the Depilot network.

## Configuration

Depilot supports various configuration options to personalize your coding experience:

- `depilot.enable`: Enable or disable Depilot (default: true).
- `depilot.analysisLevel`: Set the level of code analysis (basic, medium, advanced).
- `depilot.highlightErrors`: Enable or disable syntax error highlighting (default: true).
- `depilot.autoFix`: Enable or disable auto-fix suggestions (default: true).

To configure these options, open the settings JSON file (Settings > Open Settings (JSON)) and add the desired configuration options.

## Known Issues

- None at the moment.

## Contributing

Contributions are welcome! If you'd like to contribute to Depilot, please follow these steps:

1. Fork the repository and create your branch from `main`.
2. Open a pull request with your changes, describing the feature or fix.

## License

Depilot is licensed under the MIT License. See [LICENSE](LICENSE) for more information.

## Contact

If you have any questions or feedback, feel free to contact the maintainer at [[email protected]](mailto:[email protected]).

Happy coding with Depilot!
26 changes: 26 additions & 0 deletions extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const vscode = require('vscode');

function activate(context) {
let activeEditor = vscode.window.activeTextEditor;

if (activeEditor) {
// Initial code reading
processCode(activeEditor.document.getText());

// Listen for text document changes
let disposable = vscode.workspace.onDidChangeTextDocument((event) => {
processCode(event.document.getText());
});

context.subscriptions.push(disposable);
}
}

function processCode(code) {
// Process and analyze the code here
console.log(code);
}

module.exports = {
activate
};
13 changes: 13 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"module": "Node16",
"target": "ES2022",
"checkJs": true, /* Typecheck .js files. */
"lib": [
"ES2022"
]
},
"exclude": [
"node_modules"
]
}
Loading

0 comments on commit d710f30

Please sign in to comment.