Skip to content

Intellisense does not activate when the directory is included in a workspace but not the first directory. #921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Andrew-Forster opened this issue Mar 11, 2024 · 3 comments · Fixed by #957
Assignees

Comments

@Andrew-Forster
Copy link

Describe your issue

When using this file path for my VS workspace, I run into an issue where the extension does not recognize the config file.

"folders": [
	{
		"path": "src"
	},
	{
		"path": "../../../Components"
	},
	{
		"path": "."
	}

When trying to use . at the top path it works however my live server plugin then breaks, I've been fiddling with both extensions to no avail. Is there a better way to setup my directory so they both work or is there any setting options to make the extension to check under all the files?

@thecrypticace thecrypticace self-assigned this Mar 11, 2024
@ben-laird
Copy link

I've been having a similar issue. Tailwind Intellisense isn't kicking in for me in a SvelteKit workspace, but it does when I open it as a single directory. I even tried moving the root folder entry to the top of the folders array, and that doesn't work either.

.code-workspace file:

{
    "folders": [
        {
            "name": "Main",
            "path": "."
        },
        {
            "name": "Source Code",
            "path": "src"
        }
        
    ]
}

package.json:

{
	"name": "tutorial",
	"version": "0.0.1",
	"private": true,
	"scripts": {
		"dev": "vite dev",
		"build": "vite build",
		"preview": "vite preview",
		"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
		"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
		"test": "vitest",
		"lint": "prettier --check . && eslint .",
		"format": "prettier --write ."
	},
	"devDependencies": {
		"@sveltejs/adapter-auto": "^3.0.0",
		"@sveltejs/kit": "^2.0.0",
		"@sveltejs/vite-plugin-svelte": "^3.0.0",
		"@types/eslint": "^8.56.0",
		"@typescript-eslint/eslint-plugin": "^7.0.0",
		"@typescript-eslint/parser": "^7.0.0",
		"autoprefixer": "^10.4.18",
		"eslint": "^8.56.0",
		"eslint-config-prettier": "^9.1.0",
		"eslint-plugin-svelte": "^2.35.1",
		"postcss": "^8.4.35",
		"prettier": "^3.1.1",
		"prettier-plugin-svelte": "^3.1.2",
		"svelte": "^4.2.7",
		"svelte-check": "^3.6.0",
		"tailwindcss": "^3.4.1",
		"tslib": "^2.4.1",
		"typescript": "^5.0.0",
		"vite": "^5.0.3",
		"vitest": "^1.2.0"
	},
	"type": "module"
}

@thecrypticace
Copy link
Contributor

@Andrew-Forster @ben-laird Can either of you provide a git repo I can clone where it doesn't work?

The current pre-release version looks like it's working for me. Though this might only be incidentally due to fs path stuff. I know we don't handle the workspaceFolders initialization param right now but I'm a little surprised it appears that we're not needing to.

Screenshot 2024-03-26 at 15 56 17

@thecrypticace thecrypticace added the question Further information is requested label Mar 26, 2024
@thecrypticace thecrypticace removed their assignment Mar 26, 2024
@ben-laird
Copy link

The repo I was working on is here, although the .code-workspace file was removed in a previous commit because it got in the way of our workflow. Please be sure to clone the dev branch and not the main one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants