Skip to content

Commit

Permalink
ux improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kothavade committed Dec 11, 2023
1 parent 5c9e0af commit 3cdbfdb
Show file tree
Hide file tree
Showing 28 changed files with 4,554 additions and 195 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.lockb binary diff=lockb
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@
"tanstack"
],
"eslint.experimental.useFlatConfig": false,
"tailwindCSS.files.exclude": [
"**/.git/**",
"**/node_modules/**",
"**/.hg/**",
"**/.svn/**",
"**/.direnv/**",
"**/.next/**",
]
}
38 changes: 3 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# CodeSense

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
> [!IMPORTANT]
> This is a *WIP* re-write of the original CodeSense, which you can find on the `main` branch
Binary file removed bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
# Override nixpkgs to use the latest set of node packages
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
inputs.systems.url = "github:nix-systems/default";

outputs = { self, nixpkgs, flake-utils, systems, }:
flake-utils.lib.eachSystem (import systems) (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_18
nodePackages.pnpm
];
};
devShells.default =
# Need nodejs until https://github.com/oven-sh/bun/issues/6537 is in a release
pkgs.mkShell {
buildInputs = with pkgs; [ bun nodejs_18 nodePackages.pnpm ];
};
});
}
23 changes: 16 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
// get every tree-sitter package from package.json
const fs = require("fs");

const treeSitterPackages = fs.readdirSync("node_modules").filter((name) => {
return name.startsWith("tree-sitter");
});

/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverActions: true,
optimizeServerReact: true,
optimizeCss: true,
turbo: {
rules: {
"*.scm": ["raw-loader"],
"*.node": [""],
},
},
},
webpack: (config) => {
config.externals = [
...config.externals,
"tree-sitter",
"tree-sitter-c",
"tree-sitter-rust",
];
config.externals = [...config.externals, ...treeSitterPackages];
config.module.rules.push({
test: /\.scm/,
type: "asset/source",
Expand Down
39 changes: 24 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
"private": true,
"scripts": {
"dev": "next dev",
"turbo": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"trustedDependencies": ["tree-sitter", "tree-sitter-c", "tree-sitter-rust"],
"trustedDependencies": [
"tree-sitter",
"tree-sitter-c",
"tree-sitter-rust"
],
"dependencies": {
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
Expand All @@ -20,28 +25,32 @@
"@tanstack/react-table": "^8.10.7",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"next": "13.5.6",
"geist": "^1.2.0",
"next": "14.0.4",
"next-themes": "^0.2.1",
"prismjs": "^1.29.0",
"react": "^18",
"react-dom": "^18",
"raw-loader": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-simple-code-editor": "^0.13.1",
"tailwind-merge": "^1.14.0",
"tailwind-merge": "^2.1.0",
"tailwindcss-animate": "^1.0.7",
"tree-sitter": "^0.20.6",
"tree-sitter-c": "^0.20.6",
"tree-sitter-rust": "^0.20.4"
},
"devDependencies": {
"@types/node": "^20",
"@types/prismjs": "^1.26.2",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.6",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
"@types/node": "^20.10.4",
"@types/prismjs": "^1.26.3",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"autoprefixer": "^10.4.16",
"critters": "^0.0.20",
"eslint": "^8.55.0",
"eslint-config-next": "14.0.4",
"postcss": "^8.4.32",
"tailwind-scrollbar": "^3.0.5",
"tailwindcss": "^3.3.6",
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit 3cdbfdb

Please sign in to comment.