Improve VSCode support

This commit is contained in:
venashial 2022-05-07 16:37:50 -07:00
parent 179dcdcd04
commit e553f1fdbd
7 changed files with 101 additions and 9 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ WixTools
# TEMPORARY: ignore my test instance and metadata
theseus_cli/launcher
theseus_cli/foo
.DS_Store
.pnpm-debug.log

12
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
"recommendations": [
"tauri-apps.tauri-vscode",
"vunguyentuan.vscode-css-variables",
"stylelint.vscode-stylelint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"pivaszbs.svelte-autoimport",
"svelte.svelte-vscode",
"ardenivanov.svelte-intellisense"
]
}

56
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,56 @@
{
"cssVariables.lookupFiles": [
"**/*.postcss",
"**/node_modules/omorphia/**/*.postcss"
],
"cssVariables.blacklistFolders": [
"**/.git",
"**/.svn",
"**/.hg",
"**/CVS",
"**/.DS_Store",
"**/.git",
"**/bower_components",
"**/tmp",
"**/dist",
"**/tests"
],
"gitlens.showWelcomeOnInstall": false,
"gitlens.showWhatsNewAfterUpgrades": false,
"gitlens.plusFeatures.enabled": false,
"gitlens.currentLine.enabled": false,
"gitlens.currentLine.pullRequests.enabled": false,
"gitlens.currentLine.scrollable": true,
"gitlens.codeLens.enabled": false,
"gitlens.hovers.enabled": false,
"CSSNavigation.activeCSSFileExtensions": [
"css",
"postcss"
],
"CSSNavigation.activeHTMLFileExtensions": [
"html",
"svelte",
"js",
"ts"
],
"CSSNavigation.excludeGlobPatterns": [
"**/bower_components/**",
"**/vendor/**",
"**/coverage/**"
],
"CSSNavigation.alwaysIncludeGlobPatterns": [
"./theseus_gui/node_modules/omorphia/**/*.postcss"
],
"html-css-class-completion.HTMLLanguages": [
"html",
"svelte"
],
"html-css-class-completion.includeGlobPattern": "**/*.{postcss,svelte}",
"html-css-class-completion.CSSLanguages": [
"postcss",
],
"svelte.enable-ts-plugin": true,
"svelte.ask-to-enable-ts-plugin": false,
"svelte.plugin.css.diagnostics.enable": false,
"svelte.plugin.svelte.diagnostics.enable": false,
}

View File

@ -1,12 +1,12 @@
<script lang="ts">
import { SvelteComponent } from 'svelte'
import { page } from "$app/stores";
export let items: {
label: string,
/** Page href, without slash prefix */
href: string,
icon: SvelteComponent
/** An icon, as a svelte component */
icon: any, // `SvelteComponentDev` has type errors
}[];
/** Path level in URL, zero-indexed */

View File

@ -1,5 +1,4 @@
<script lang="ts">
import Instance from "$components/Instance.svelte";
import CardRow from "$components/CardRow.svelte";
</script>

View File

@ -1,7 +1,3 @@
<script context="module" lang="ts">
</script>
<script lang="ts">
import { Checkbox, FormField, TextInput, Button } from "omorphia"
import GlobalSettings from "$components/GlobalSettings.svelte"
@ -17,4 +13,31 @@
</div>
<style lang="postcss">
.section {
display: flex;
flex-direction: column;
padding: 1rem;
grid-gap: 1rem;
&__title {
display: flex;
grid-gap: 1rem;
align-items: center;
&::after {
flex: 1 1;
content: " ";
background-color: hsla(0, 0%, 100%, 0.2);
height: 0.2rem;
border-radius: var(--rounded-max);
}
}
&__items {
display: flex;
flex-direction: column;
grid-gap: 1rem;
padding: 0 8px;
}
}
</style>

View File

@ -24,13 +24,13 @@
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": "../test/Modrinth",
"baseUrl": "./",
"allowJs": true,
"checkJs": true,
"paths": {
"$assets/*": ["src/assets/*"],
"$components/*": ["src/components/*"],
"$layout/*": ["src/components/*"],
"$layout/*": ["src/layout/*"],
"$lib/*": ["src/lib/*"],
"$stores/*": ["src/stores/*"],
"$styles/*": ["src/styles/*"],