Skip to content
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

Disable class hover #90

Open
odb23 opened this issue Aug 28, 2024 · 3 comments
Open

Disable class hover #90

odb23 opened this issue Aug 28, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@odb23
Copy link

odb23 commented Aug 28, 2024

Is there an option to remove the tooltip that shows a class CSS rules whenever it is hovered?

@remcohaszing
Copy link
Owner

Can this be done in VSCode / Tailwind language server? It would be neat if we can make this configurable. That would mean all options supported in VSCode are supported here as well. If VSCode doesn’t have an option for this, we can’t support it either.

async getConfiguration() {
return {
editor: { tabSize: 2 },
// Default values are based on
// https://github.com/tailwindlabs/tailwindcss-intellisense/blob/v0.9.1/packages/tailwindcss-language-server/src/server.ts#L259-L287
tailwindCSS: {
emmetCompletions: false,
classAttributes: ['class', 'className', 'ngClass'],
codeActions: true,
hovers: true,
suggestions: true,
validate: true,
colorDecorators: true,
rootFontSize: 16,
lint: {
cssConflict: 'warning',
invalidApply: 'error',
invalidScreen: 'error',
invalidVariant: 'error',
invalidConfigPath: 'error',
invalidTailwindDirective: 'error',
recommendedVariantOrder: 'warning'
},
showPixelEquivalents: true,
includeLanguages: {},
files: {
// Upstream defines these values, but we don’t need them.
exclude: []
},
experimental: {
classRegex: [],
// Upstream types are wrong
configFile: {}
}
}
}
}
// This option takes some properties that we don’t have nor need.
} as Partial<EditorState> as EditorState

@odb23
Copy link
Author

odb23 commented Aug 30, 2024

@remcohaszing This can be done in VSCode by disabling hints popup using "editor.parameterHints": false in settings.json

@remcohaszing
Copy link
Owner

Ok great!

I envision the MonacoTailwindcssOptions interface gets a new property editorConfig. (The name is up for debate, settings?) These settings need to be passed to the worker. Possibly also a function on the MonacoTailwindcss interface to reconfigure the settings.

I currently don’t have the time to implement this. I’ll get to it when I get to it. In the mean time: PR welcome.

@remcohaszing remcohaszing added the enhancement New feature or request label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants