Closed LetsZiggy closed 2 years ago
Duplicate of #27.
Hi @rchl,
The LSP still getting error after Fix document selector for ST4 #28 update. I even trimmed the LSP-tailwindcss
settings in my .sublime-project
file.
I don't know if this matters but the error started when I updated node_module package tailwindcss
to v3.0.0
(see above under package.json
).
Was working before and has been using Sublime Text 4.
Console output (same error as before the #28
update):
Traceback (most recent call last):
File "/home/pc-5002/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/session_view.py", line 179, in on_capability_added_async
File "/home/pc-5002/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/session_view.py", line 100, in _register_auto_complete_triggers
File "/home/pc-5002/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/session_view.py", line 134, in _apply_auto_complete_triggers
TypeError: sequence item 8: expected str instance, NoneType found
neither "command" nor "tcp_port" is provided; cannot start a language server
[]
- selector
source.jsx | source.js.react | source.js | source.tsx | source.ts | source.css | source.scss | source.less | text.html.vue | text.html.svelte | text.html.basic | text.html.twig | text.blade | embedding.php
- priority_selector
(text.html.basic)|(embedding.php)|(text.blade)|(text.html.twig)|(source.jsx)|(source.js.react)|(source.js)|(source.css)|(source.tsx)|(source.ts)|(source.scss)|(source.less)|(text.html.vue)|(text.html.svelte)
- init_options
```json
{}
{
"tailwindCSS": {
"classAttributes": [
"class",
"className",
"ngClass"
],
"colorDecorators": true,
"emmetCompletions": false,
"experimental": {
"classRegex": []
},
"includeLanguages": {},
"lint": {
"cssConflict": "warning",
"invalidApply": "error",
"invalidConfigPath": "error",
"invalidScreen": "error",
"invalidTailwindDirective": "error",
"invalidVariant": "error",
"recommendedVariantOrder": "warning"
},
"rootFontSize": 16,
"showPixelEquivalents": true,
"validate": true
}
}
{
"PATH": "/usr/bin:/usr/bin:"
}
/home/pc-5002/code/project-root-5/aureliajs/src/resources/elements/au-header.html
{
"auto_complete_selector": "meta.tag, text.html, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
"lsp_active": true,
"syntax": "Packages/HTML/HTML.sublime-syntax"
}
text.html.basic
[
"/home/pc-5002/code/project-root-5/aureliajs",
"/home/pc-5002/code/project-root-5"
]
{
"folders": [
/* truncated */
],
"settings": {
/* truncated */
"LSP-tailwindcss": {
"settings": {
"tailwindCSS.emmetCompletions": true
}
}
}
}
{}
I don't use tailwindcss but as far as I remember, an error like that:
TypeError: sequence item 8: expected str instance, NoneType found
was happening before when there was no proper configuration in the root of the project.
You have two folders in the project:
"/home/pc-5002/code/project-root-5/aureliajs",
"/home/pc-5002/code/project-root-5"
I would guess that one of them doesn't have tailwindcss configuration file in the root so try removing one of them.
I'm sorry for pinging you I mistakenly assumed you are part of LSP-tailwindcss maintainer team Thanks for your help
.sublime-project
file to the folder with tailwind.config.js
and amended the folder
setting accordingly to have only one folder path
tailwind.config.js
The only other solution I can think of is to allow us set the config path explicitly
$folder
:
pc-5002 00:05:33 ~/code/project-root-5/aureliajs master 2✎ 1+ SIGINT
$ ls -AXgc
total 1240
drwxr-xr-x 5 pc-5002 4096 Dec 13 22:56 aurelia_project
drwxr-xr-x 6 pc-5002 4096 Dec 13 22:56 cypress
drwxr-xr-x 913 pc-5002 36864 Dec 11 15:28 node_modules
drwxr-xr-x 2 pc-5002 4096 Dec 10 22:12 scripts
drwxr-xr-x 5 pc-5002 4096 Dec 13 22:56 src
drwxr-xr-x 2 pc-5002 4096 Dec 3 16:24 static
drwxr-xr-x 2 pc-5002 4096 Dec 13 22:56 tailwindcss-plugins
drwxr-xr-x 3 pc-5002 4096 Dec 13 22:56 test
-rw-r--r-- 1 pc-5002 275 Dec 13 22:56 tailwind.css
-rw-r--r-- 1 pc-5002 28 Dec 13 22:56 .eslintignore
-rw-r--r-- 1 pc-5002 852 Dec 13 22:56 index.html
-rw-r--r-- 1 pc-5002 369 Dec 13 22:56 cypress.config.js
-rw-r--r-- 1 pc-5002 3787 Dec 13 22:56 .eslintrc.js
-rw-r--r-- 1 pc-5002 2671 Dec 13 22:56 karma.conf.js
-rw-r--r-- 1 pc-5002 3519 Dec 13 22:56 .stylelintrc.js
-rw-r--r-- 1 pc-5002 1359 Dec 13 22:56 tailwind.config.js
-rw-r--r-- 1 pc-5002 2 Dec 13 22:56 cypress.json
-rw-r--r-- 1 pc-5002 3668 Dec 13 22:56 package.json
-rw-r--r-- 1 pc-5002 1093192 Dec 13 22:56 package-lock.json
-rw-r--r-- 1 pc-5002 1561 Dec 13 22:56 tsconfig.json
-rw-r--r-- 1 pc-5002 56 Dec 13 22:56 .npmrc
-rw-r--r-- 1 pc-5002 14 Dec 13 22:56 .stylelintignore
-rw-r--r-- 1 pc-5002 12331 Dec 13 23:49 editor.sublime-project
-rw-r--r-- 1 pc-5002 35876 Dec 13 23:41 editor.sublime-workspace
pc-5002 00:07:11 ~/code/project-root-5/aureliajs master 2✎ 1+ SIGINT
$ node_modules/.bin/tailwind --help
tailwindcss v3.0.0
Usage:
tailwindcss [--input input.css] [--output output.css] [--watch] [options...]
tailwindcss init [--full] [--postcss] [options...]
Commands:
init [options]
Options:
-i, --input Input file
-o, --output Output file
-w, --watch Watch for changes and rebuild as needed
--content Content paths to use for removing unused classes
--postcss Load custom PostCSS configuration
-m, --minify Minify the output
-c, --config Path to a custom config file
--no-autoprefixer Disable autoprefixer
-h, --help Display usage information
LSP global settings:
// Settings in here override those in "LSP/LSP.sublime-settings"
{
"clients":
{
"LSP-stylelint": { "enabled": false },
"LSP-bash": { "enabled": false },
"LSP-typescript": { "enabled": false },
"LSP-dockerfile": { "enabled": false },
"LSP-json": { "enabled": false },
"LSP-eslint": { "enabled": false },
"LSP-graphql": { "enabled": false },
// "LSP-tailwindcss": { "enabled": false },
},
}
tailwind.config.js:
"use strict"
/**
* @type { import("tailwindcss/tailwind-config").TailwindConfig }
*/
module.exports = {
content: [
"./index.html",
"./src/**/*.{html,ts,js}",
],
theme: {
extend: {
/* ... */
},
},
plugins: [
require("@tailwindcss/aspect-ratio"),
require("@tailwindcss/forms"),
require("@tailwindcss/line-clamp"),
require("@tailwindcss/typography"),
require("./tailwindcss-plugins/fill-opacity"),
require("./tailwindcss-plugins/stroke-opacity"),
require("./tailwindcss-plugins/svg-attribute"),
],
}
Can you create a repro repo so I can take a closer look?
But withouth a repro or lsp logs, I can only say that I've experienced that tailwindcss can stop working when updating dependencies. See the comment here https://github.com/sublimelsp/LSP-tailwindcss/issues/21#issuecomment-943175827 to see if it can help in your case.
Hi @predragnikolic, Test repo
npm i -D postcss
) as advice but still doesn't workEdit:
tailwindcss-v2
branch and amended the tailwind.config.js
accordingly for jit
modeLSP-tailwindcss
works with tailwindcss v2Thanks for the repro :)
Here is my conclusion:
lsp-tailwindcss-client-error << root folder
├── aureliajs
│ ├── aurelia_project
│ ├── cypress
│ ├── cypress.config.js
│ ├── cypress.json
│ ├── favicon.ico
│ ├── index.html
│ ├── karma.conf.js
│ ├── node_modules << important - node_modules is inside of the aureliajs
│ ├── package.json
│ ├── package-lock.json
│ ├── src
│ ├── tailwind.config.js
│ ├── tailwind.css
│ ├── tailwindcss-plugins
│ ├── test
│ └── tsconfig.json
currently we try to resolve the tailwindcss
dependency based on the root folder, see https://github.com/sublimelsp/LSP-tailwindcss/blob/master/plugin.py#L55,
Becase we do not have a node_modules in the root folder, the tailwindcss_path will be empty. https://github.com/sublimelsp/LSP-tailwindcss/blob/master/plugin.py#L56
Thus we need to resolve the tailwindcss
path based on the file path that initialized the tailwindcss server.
And I got a fix for that ready.
But there is a different issue also present in your repo,
and that is the famous TypeError: sequence item 8: expected str instance, NoneType found
https://github.com/sublimelsp/LSP-tailwindcss/issues/21
The cause of that is maybe the following error that the tailwindcss server logs:
LSP-tailwindcss: Loaded tailwindcss v3.0.2: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss
LSP-tailwindcss: Tailwind CSS: format is not a function
TypeError: format is not a function
at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:197:47
at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:209:25
at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49667:17
at Array.forEach (<anonymous>)
at getVariants (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49631:49)
at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49481:34
at Generator.next (<anonymous>)
at fulfilled (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:48763:58)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
:: <- LSP-tailwindcss window/logMessage: {'message': 'Loaded tailwindcss v3.0.2: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss', 'type': 4}
:: <- LSP-tailwindcss textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/src/app.ts'}
:: <-- LSP-tailwindcss client/registerCapability(1): {'registrations': [{'method': 'textDocument/hover', 'registerOptions': {'documentSelector': None}, 'id': '907f77fc-3a64-45a0-b2af-37fbf113f028'}, {'method': 'textDocument/documentColor', 'registerOptions': {'documentSelector': None}, 'id': '68cbd19f-5cf2-44dc-a42d-694665571dce'}, {'method': 'textDocument/codeAction', 'registerOptions': {'documentSelector': None}, 'id': 'a66860a7-6545-43e2-a33d-67bb8ec909c4'}, {'method': 'textDocument/completion', 'registerOptions': {'documentSelector': None, 'triggerCharacters': ['"', "'", '`', ' ', '.', '[', '!', '/', None], 'resolveProvider': True}, 'id': '869f3687-a82e-419e-98ef-aef6e08a714b'}]}
:: >>> LSP-tailwindcss 1: None
:: <- LSP-tailwindcss window/logMessage: {'message': 'Tailwind CSS: format is not a function\nTypeError: format is not a function\n at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:197:47\n at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:209:25\n at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49667:17\n at Array.forEach (<anonymous>)\n at getVariants (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49631:49)\n at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49481:34\n at Generator.next (<anonymous>)\n at fulfilled (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:48763:58)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)', 'type': 1}
:: <? LSP-tailwindcss @/tailwindCSS/error: {'message': 'Tailwind CSS: format is not a function'}
For that issue I would advise you to report to https://github.com/tailwindlabs/tailwindcss-intellisense
NOTE: if you want to see the same error that I see, you can enable LSP logs by following this guide https://lsp.sublimetext.io/troubleshooting/#self-help-instructions)
@predragnikolic i have a feeling that that error was something already fixed in the server. Are we on latest version?
@rchl I am using "version": "0.7.1"
of the tailwindcss langauge server,
but seeing the releases of tailwindcss ls, the newest version is 0.7.4.
Let me update the server.
Hi @rchl @predragnikolic , Thanks for looking into this issue.
flat-folder-structure
branch
.sublime-project
file in same folder with tailwind.config.js
and node_modules
folderLSP-tailwindcss
doesn't work with flat folder structure (with tailwindcss v3
)
tailwindcss v2
and works
LSP-tailwindcss
doesn't work with flat folder structure (withtailwindcss v3
)
- Tested with
tailwindcss v2
and works
Yes I can confir that it works with v2, I tired tailwindcss v3 Here is the error message that tailwindcss language server throws:
LSP-tailwindcss: Found Tailwind CSS config file: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/tailwind.config.js
LSP-tailwindcss: Loaded postcss v8.4.5: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/postcss
LSP-tailwindcss: Loaded tailwindcss v3.0.5: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss
LSP-tailwindcss: Tailwind CSS: Cannot read property '700' of undefined
TypeError: Cannot read property '700' of undefined
at Object.module.exports [as typography] (/home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/@tailwindcss/typography/src/styles.js:16:65)
at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/util/resolveConfig.js:155:57
at Array.reduce (<anonymous>)
at resolveFunctionKeys (/home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/util/resolveConfig.js:152:32)
at Object.resolveConfig [as default] (/home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/util/resolveConfig.js:224:16)
at Object.resolveConfig [as module] (/home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/public/resolve-config.js:15:39)
at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49431:46
at Generator.next (<anonymous>)
at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:48766:71
at new Promise (<anonymous>)
I found a related issue Tailwind CSS: Cannot read property '500' of undefined
here https://github.com/tailwindlabs/tailwindcss-intellisense/issues/435#issue-1045297224
I mention a LSP-tailwindcss: Tailwind CSS: format is not a function
issue above.
I think it is related to the tailwindcss v3,
and someone else also has the same issue:
https://github.com/tailwindlabs/tailwindcss-intellisense/issues/448#issuecomment-994949549
you could start discussions in those threads if you want. You also have a repro repo, that will help the maintainer to reproduce the issue easily.
Ok
I'll create an issue if the problem persist after update server to 0.7.4 #31 and link it here
the LSP-tailwindcss: Tailwind CSS: Cannot read property '700' of undefined
error can be solved by bumping the dependencies.
https://stackoverflow.com/questions/70361974/upgrade-tailwind-v2-to-v3-typeerror-cannot-read-property/70361975
But I haven't found a way to address LSP-tailwindcss: Tailwind CSS: format is not a function
.
// /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:197:47
function buildPluginApi(tailwindConfig, context, { variantList , variantMap , offsets , classList }) {
// ...
return {
addVariant (variantName, variantFunctions, options = {}) {
variantFunctions = [].concat(variantFunctions).map((variantFunction)=>{
// ...
variantFunction = variantFunction.replace(/\n+/g, '').replace(/\s{1,}/g, ' ').trim();
let fns = parseVariantFormatString(variantFunction).map((str)=>{
if (!str.startsWith('@')) {
return ({ format })=>format(str) // It breaks here.
What are you testing with now?
I don't see that issue with the main
branch in the example repo.
I am using the main branch https://github.com/LetsZiggy/lsp-tailwindcss-client-error
:: --> LSP-tailwindcss initialize(1): {'rootPath': '/Users/me/lsp-tailwindcss-client-error', 'capabilities': {'workspace': {'didChangeWatchedFiles': {'dynamicRegistration': True}, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'applyEdit': True, 'executeCommand': {}, 'semanticTokens': {'refreshSupport': True}, 'workspaceFolders': True, 'codeLens': {'refreshSupport': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'symbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'tagSupport': {'valueSet': [1]}}, 'configuration': True}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}}, 'window': {'showDocument': {'support': True}, 'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}, 'textDocument': {'codeLens': {'dynamicRegistration': True}, 'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'declaration': {'linkSupport': True, 'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'synchronization': {'willSaveWaitUntil': True, 'dynamicRegistration': True, 'willSave': True, 'didSave': True}, 'semanticTokens': {'tokenModifiers': ['static', 'declaration', 'modification', 'deprecated', 'async', 'defaultLibrary', 'abstract', 'definition', 'readonly', 'documentation'], 'multilineTokenSupport': True, 'dynamicRegistration': True, 'tokenTypes': ['interface', 'keyword', 'modifier', 'macro', 'namespace', 'function', 'property', 'type', 'string', 'number', 'struct', 'enumMember', 'variable', 'enum', 'operator', 'regexp', 'method', 'typeParameter', 'parameter', 'class', 'comment', 'event'], 'overlappingTokenSupport': False, 'formats': ['relative'], 'requests': {'range': True, 'full': {'delta': True}}}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'selectionRange': {'dynamicRegistration': True}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'dataSupport': True, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'relatedInformation': True, 'codeDescriptionSupport': True, 'versionSupport': True, 'tagSupport': {'valueSet': [1, 2]}}, 'references': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'completion': {'insertTextMode': 2, 'dynamicRegistration': True, 'completionItem': {'snippetSupport': True, 'tagSupport': {'valueSet': [1]}, 'documentationFormat': ['markdown', 'plaintext'], 'labelDetailsSupport': True, 'insertTextModeSupport': {'valueSet': [2]}, 'deprecatedSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}}, 'completionItemKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}, 'documentSymbol': {'hierarchicalDocumentSymbolSupport': True, 'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'tagSupport': {'valueSet': [1]}}, 'formatting': {'dynamicRegistration': True}}}, 'rootUri': 'file:///Users/me/lsp-tailwindcss-client-error', 'initializationOptions': {}, 'workspaceFolders': [{'name': 'lsp-tailwindcss-client-error', 'uri': 'file:///Users/me/lsp-tailwindcss-client-error'}], 'clientInfo': {'name': 'Sublime Text LSP', 'version': '1.14.0'}, 'processId': 92534}
:: <<< LSP-tailwindcss 1: {'capabilities': {'textDocumentSync': {'didClose': {}, 'change': {'syncKind': 1}, 'didOpen': {}, 'save': {}}}}
:: -> LSP-tailwindcss initialized: {}
:: -> LSP-tailwindcss workspace/didChangeConfiguration: {'settings': {'tailwindCSS': {'showPixelEquivalents': True, 'colorDecorators': True, 'experimental': {'classRegex': []}, 'rootFontSize': 16, 'validate': True, 'emmetCompletions': False, 'classAttributes': ['class', 'className', 'ngClass'], 'includeLanguages': {}, 'lint': {'cssConflict': 'warning', 'invalidTailwindDirective': 'error', 'invalidApply': 'error', 'invalidConfigPath': 'error', 'invalidScreen': 'error', 'invalidVariant': 'error', 'recommendedVariantOrder': 'warning'}}}}
:: -> LSP-tailwindcss textDocument/didOpen: {'textDocument': {'uri': 'file:///Users/me/lsp-tailwindcss-client-error/aureliajs/src/main.ts', 'languageId': 'typescript', 'text': "import {Aurelia} from 'aurelia-framework';\nimport environment from './environment';\n\nexport function configure(aurelia: Aurelia): void {\n aurelia.use\n .standardConfiguration()\n .feature('resources');\n\n aurelia.use.developmentLogging(environment.debug ? 'debug' : 'warn');\n\n if (environment.testing) {\n aurelia.use.plugin('aurelia-testing');\n }\n\n aurelia.start().then(() => aurelia.setRoot());\n}\n", 'version': 0}}
:: <-- LSP-tailwindcss client/registerCapability(0): {'registrations': [{'registerOptions': {'watchers': [{'globPattern': '**/{tailwind,tailwind.config}.{js,cjs}'}, {'globPattern': '**/package.json'}]}, 'id': '63b1cd62-565a-48f8-affa-71b993c93780', 'method': 'workspace/didChangeWatchedFiles'}]}
:: >>> LSP-tailwindcss 0: None
LSP-tailwindcss:
LSP-tailwindcss: warn - The RTL features in Tailwind CSS are currently in preview.
LSP-tailwindcss: warn - Preview features are not covered by semver, and may be improved in breaking ways at any time.
LSP-tailwindcss: Found Tailwind CSS config file: /Users/me/lsp-tailwindcss-client-error/aureliajs/tailwind.config.js
LSP-tailwindcss: Loaded postcss v8.4.5: /Users/me/lsp-tailwindcss-client-error/aureliajs/node_modules/postcss
LSP-tailwindcss: Loaded tailwindcss v3.0.2: /Users/me/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss
LSP-tailwindcss: {}
:: <- LSP-tailwindcss window/logMessage: {'type': 4, 'message': 'Found Tailwind CSS config file: /Users/me/lsp-tailwindcss-client-error/aureliajs/tailwind.config.js'}
:: <- LSP-tailwindcss window/logMessage: {'type': 4, 'message': 'Loaded postcss v8.4.5: /Users/me/lsp-tailwindcss-client-error/aureliajs/node_modules/postcss'}
:: <- LSP-tailwindcss window/logMessage: {'type': 4, 'message': 'Loaded tailwindcss v3.0.2: /Users/me/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss'}
:: <- LSP-tailwindcss window/logMessage: {'type': 1, 'message': {}}
:: <-- LSP-tailwindcss workspace/configuration(1): {'items': [{'scopeUri': 'file:///Users/me/lsp-tailwindcss-client-error/aureliajs/src/main.ts', 'section': 'editor'}]}
:: >>> LSP-tailwindcss 1: [None]
:: <-- LSP-tailwindcss workspace/configuration(2): {'items': [{'scopeUri': 'file:///Users/me/lsp-tailwindcss-client-error/aureliajs/src/main.ts', 'section': 'tailwindCSS'}]}
:: >>> LSP-tailwindcss 2: [{'showPixelEquivalents': True, 'colorDecorators': True, 'experimental': {'classRegex': []}, 'rootFontSize': 16, 'validate': True, 'emmetCompletions': False, 'classAttributes': ['class', 'className', 'ngClass'], 'includeLanguages': {}, 'lint': {'cssConflict': 'warning', 'invalidTailwindDirective': 'error', 'invalidApply': 'error', 'invalidConfigPath': 'error', 'invalidScreen': 'error', 'invalidVariant': 'error', 'recommendedVariantOrder': 'warning'}}]
:: <-- LSP-tailwindcss client/registerCapability(3): {'registrations': [{'registerOptions': {'documentSelector': None}, 'id': '7c0ea141-c346-47b1-b6fb-a66be65a8d2a', 'method': 'textDocument/hover'}, {'registerOptions': {'documentSelector': None}, 'id': '71c530d3-9410-4ef2-af03-54058ca7b2d3', 'method': 'textDocument/documentColor'}, {'registerOptions': {'documentSelector': None}, 'id': '53a7cb63-046e-4d12-b59b-05fab4e3dd74', 'method': 'textDocument/codeAction'}, {'registerOptions': {'resolveProvider': True, 'documentSelector': None, 'triggerCharacters': ['"', "'", '`', ' ', '.', '[', '!', '/', ':']}, 'id': '660bbb8a-2f02-46a9-9f6f-8018dcf6770e', 'method': 'textDocument/completion'}]}
:: >>> LSP-tailwindcss 3: None
:: <- LSP-tailwindcss textDocument/publishDiagnostics: {'uri': 'file:///Users/me/lsp-tailwindcss-client-error/aureliajs/src/main.ts', 'diagnostics': []}
:: --> LSP-tailwindcss initialize(1): {'workspaceFolders': [{'name': 'lsp-tailwindcss-client-error', 'uri': 'file:///home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error'}], 'clientInfo': {'name': 'Sublime Text LSP', 'version': '1.13.0'}, 'rootPath': '/home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error', 'processId': 27198, 'capabilities': {'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}}, 'workspace': {'semanticTokens': {'refreshSupport': True}, 'workspaceFolders': True, 'didChangeConfiguration': {'dynamicRegistration': True}, 'configuration': True, 'symbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'tagSupport': {'valueSet': [1]}}, 'didChangeWatchedFiles': {'dynamicRegistration': True}, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'applyEdit': True, 'executeCommand': {}}, 'window': {'showDocument': {'support': True}, 'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}, 'textDocument': {'rangeFormatting': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'documentSymbol': {'hierarchicalDocumentSymbolSupport': True, 'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'tagSupport': {'valueSet': [1]}}, 'completion': {'insertTextMode': 2, 'dynamicRegistration': True, 'completionItem': {'deprecatedSupport': True, 'insertTextModeSupport': {'valueSet': [2]}, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'tagSupport': {'valueSet': [1]}, 'snippetSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'labelDetailsSupport': True}, 'completionItemKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}, 'formatting': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'publishDiagnostics': {'relatedInformation': True, 'dataSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'versionSupport': True, 'codeDescriptionSupport': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'semanticTokens': {'multilineTokenSupport': True, 'tokenTypes': ['event', 'parameter', 'type', 'method', 'typeParameter', 'interface', 'regexp', 'enumMember', 'variable', 'enum', 'class', 'namespace', 'string', 'function', 'property', 'modifier', 'keyword', 'macro', 'number', 'struct', 'operator', 'comment'], 'formats': ['relative'], 'overlappingTokenSupport': False, 'requests': {'full': {'delta': True}, 'range': True}, 'tokenModifiers': ['defaultLibrary', 'definition', 'documentation', 'readonly', 'abstract', 'async', 'deprecated', 'modification', 'static', 'declaration'], 'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'codeAction': {'resolveSupport': {'properties': ['edit']}, 'dynamicRegistration': True, 'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'documentHighlight': {'dynamicRegistration': True}, 'synchronization': {'willSaveWaitUntil': True, 'dynamicRegistration': True, 'willSave': True, 'didSave': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}}}, 'rootUri': 'file:///home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error', 'initializationOptions': {}}
:: <<< LSP-tailwindcss 1: {'capabilities': {'textDocumentSync': {'didClose': {}, 'change': {'syncKind': 1}, 'didOpen': {}, 'save': {}}}}
:: -> LSP-tailwindcss initialized: {}
:: -> LSP-tailwindcss workspace/didChangeConfiguration: {'settings': {'tailwindCSS': {'emmetCompletions': False, 'classAttributes': ['class', 'className', 'ngClass'], 'lint': {'invalidConfigPath': 'error', 'invalidScreen': 'error', 'invalidVariant': 'error', 'cssConflict': 'warning', 'recommendedVariantOrder': 'warning', 'invalidTailwindDirective': 'error', 'invalidApply': 'error'}, 'colorDecorators': True, 'includeLanguages': {}, 'showPixelEquivalents': True, 'experimental': {'classRegex': []}, 'rootFontSize': 16, 'validate': True}}}
:: -> LSP-tailwindcss textDocument/didOpen: {'textDocument': {'uri': 'file:///home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/src/main.ts', 'languageId': 'typescript', 'text': "import {Aurelia} from 'aurelia-framework';\nimport environment from './environment';\n\nexport function configure(aurelia: Aurelia): void {\n aurelia.use\n .standardConfiguration()\n .feature('resources');\n\n aurelia.use.developmentLogging(environment.debug ? 'debug' : 'warn');\n\n if (environment.testing) {\n aurelia.use.plugin('aurelia-testing');\n }\n\n aurelia.start().then(() => aurelia.setRoot());\n}\n", 'version': 0}}
:: -> LSP-tailwindcss textDocument/didClose: {'textDocument': {'uri': 'file:///home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/src/main.ts'}}
:: -> LSP-tailwindcss textDocument/didOpen: {'textDocument': {'uri': 'file:///home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/src/main.ts', 'languageId': 'typescript', 'text': "import {Aurelia} from 'aurelia-framework';\nimport environment from './environment';\n\nexport function configure(aurelia: Aurelia): void {\n aurelia.use\n .standardConfiguration()\n .feature('resources');\n\n aurelia.use.developmentLogging(environment.debug ? 'debug' : 'warn');\n\n if (environment.testing) {\n aurelia.use.plugin('aurelia-testing');\n }\n\n aurelia.start().then(() => aurelia.setRoot());\n}\n", 'version': 0}}
:: <-- LSP-tailwindcss client/registerCapability(0): {'registrations': [{'id': '665e6d5a-6587-4291-9d68-46d0f9eef782', 'method': 'workspace/didChangeWatchedFiles', 'registerOptions': {'watchers': [{'globPattern': '**/{tailwind,tailwind.config}.{js,cjs}'}, {'globPattern': '**/package.json'}]}}]}
:: >>> LSP-tailwindcss 0: None
LSP-tailwindcss: Found Tailwind CSS config file: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/tailwind.config.js
LSP-tailwindcss: Loaded postcss v8.4.5: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/postcss
LSP-tailwindcss: Loaded tailwindcss v3.0.2: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss
LSP-tailwindcss: Tailwind CSS: format is not a function
TypeError: format is not a function
at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:197:47
at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:209:25
at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49667:17
at Array.forEach (<anonymous>)
at getVariants (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49631:49)
at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49481:34
at Generator.next (<anonymous>)
at fulfilled (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:48763:58)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
:: <- LSP-tailwindcss window/logMessage: {'type': 4, 'message': 'Found Tailwind CSS config file: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/tailwind.config.js'}
:: <- LSP-tailwindcss window/logMessage: {'type': 4, 'message': 'Loaded postcss v8.4.5: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/postcss'}
:: <- LSP-tailwindcss window/logMessage: {'type': 4, 'message': 'Loaded tailwindcss v3.0.2: /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss'}
:: <- LSP-tailwindcss textDocument/publishDiagnostics: {'uri': 'file:///home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/src/main.ts', 'diagnostics': []}
:: <-- LSP-tailwindcss client/registerCapability(1): {'registrations': [{'id': '9c4d600a-26a5-4e7a-9466-d4de6666b76c', 'method': 'textDocument/hover', 'registerOptions': {'documentSelector': None}}, {'id': 'bf3638c0-6070-4231-a45a-9c9b29a906e7', 'method': 'textDocument/documentColor', 'registerOptions': {'documentSelector': None}}, {'id': 'c0186475-04e8-4e9b-8e81-f30643440a2f', 'method': 'textDocument/codeAction', 'registerOptions': {'documentSelector': None}}, {'id': '6ada9c32-6bdf-42d3-86be-49e59e569b3e', 'method': 'textDocument/completion', 'registerOptions': {'resolveProvider': True, 'triggerCharacters': ['"', "'", '`', ' ', '.', '[', '!', '/', None], 'documentSelector': None}}]}
:: >>> LSP-tailwindcss 1: None
:: <- LSP-tailwindcss window/logMessage: {'type': 1, 'message': 'Tailwind CSS: format is not a function\nTypeError: format is not a function\n at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:197:47\n at /home/predragnikolic/Documents/sandbox/lsp-tailwindcss-client-error/aureliajs/node_modules/tailwindcss/lib/lib/setupContextUtils.js:209:25\n at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49667:17\n at Array.forEach (<anonymous>)\n at getVariants (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49631:49)\n at /home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:49481:34\n at Generator.next (<anonymous>)\n at fulfilled (/home/predragnikolic/Documents/sandbox/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server:48763:58)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)'}
:: <? LSP-tailwindcss @/tailwindCSS/error: {'message': 'Tailwind CSS: format is not a function'}
That looks like the output from the older server version (before the update).
Hi @rchl @predragnikolic , The issue is no more after the latest update
Thanks for your help
I am glad that you no longer experience the issue, but I still do :)
That looks like the output from the older server version (before the update).
I am on the new server. (v0.7.4)
I verified the Package Storage
folder just to make sure that I am using the latest server version,
and I am.
I don't know what to make out of this
odd:hover:sm:bg-blue-100
). Usually there is a red squiggly line if the variant order is not correct
I hope these info help you narrow down the problem. For me the issue is closed as my main problem is the suggestion not showing
neither "command" nor "tcp_port" is provided; cannot start a language server
--- / rest of troubleshoot report / ---
Hi, my lsp-tailwindcss stopped working after updating my dependencies. Any advice?
package.json (truncated)
Troubleshooting: LSP-tailwindcss
Version
Server Test Run
Server Configuration
(text.html.basic)|(embedding.php)|(embedding.php)|(source.js)|(source.css)|(source.scss)
(text.html.basic)|(embedding.php)|(text.blade)|(text.html.twig)|(source.jsx)|(source.js.react)|(source.js)|(source.css)|(source.tsx)|(source.ts)|(source.scss)|(source.less)|(text.html.vue)|(text.html.svelte)
Active view
Project / Workspace
LSP configuration
System PATH