Comments (10)
We have tried the log you fed back more than a year ago. We don’t know why the /competitions request is still not returned after normal feedback from the request request. We don’t know the reason.
from lsp-bridge.
@manateelazycat, alright, it makes sense. If I figure out that black magic one day, I'll contribute;) Lsp-bridge is a great tool.
from lsp-bridge.
How do I send initializationOptions
? I tried smth like this, but didn't work:
{
"name": "tailwindcss",
"languageId": "tailwindcss",
"command": ["tailwindcss-language-server", "--stdio"],
"settings": {
"tailwindCSS": {
"emmetCompletions": false,
"showPixelEquivalents": true,
"rootFontSize": 16,
"validate": true,
"hovers": true,
"suggestions": true,
"codeActions": true,
"lint": {
"invalidScreen": "error",
"invalidVariant": "error",
"invalidTailwindDirective": "error",
"invalidApply": "error",
"invalidConfigPath": "error",
"cssConflict": "warning",
"recommendedVariantOrder": "warning"
},
"experimental": {
"classRegex": ""
},
"classAttributes": ["class", "className", "ngClass"]
}
}
}
from lsp-bridge.
We have tried supporting Tailwind LSP server, but Tailwind LSP server does not return any completion information.
Therefore, lsp-bridge has a built-in backend for Tailwind. Although it cannot perform syntax completion like Tailwind LSP server, it will complete Tailwind's CSS keywords, which requires you to add the tailwind.config.js file in the project root location.
from lsp-bridge.
Hey, @manateelazycat, thanks for getting back. This backend is cool but I believe it doesn't reflect custom changes, does it?
Somehow this backend from lsp-mode
works pretty Ok. It's slow, but it gives relevant completion.
I traced their logs, here's how the eventual configuration looks like:
[Trace - 07:18:09 PM] Sending response 'workspace/configuration - (1)'. Processing request took 0ms
Params: {
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"emmetCompletions": false,
"showPixelEquivalents": true,
"rootFontSize": 16,
"validate": true,
"hovers": true,
"suggestions": true,
"codeActions": true,
"lint": {
"invalidScreen": "error",
"invalidVariant": "error",
"invalidTailwindDirective": "error",
"invalidApply": "error",
"invalidConfigPath": "error",
"cssConflict": "warning",
"recommendedVariantOrder": "warning"
},
"experimental": {
"classRegex": ""
},
"classAttributes": [
"class",
"className",
"ngClass"
]
}
]
}
The actual config in code looks like this.
Could it be vital? I struggled to understand how to properly provide these settings via the lsp-bridge
config.
If you help, I'll happily contribute:)
I didn't find a way to send those initializationOptions
to see if it could be a quick fix.
from lsp-bridge.
The response is indeed returned. I use the same server, basically same machine with the server globally installed:
Tailwing would be a super cool secondary LSP for so many servers and it would require then less maintenance.
[Trace - 07:34:31 PM] Received response 'textDocument/completion - (29)' in 622ms.
Result: {
"isIncomplete": null,
"items": [
{
"kind": 9,
"data": {
"_projectKey": "0",
"_type": "variant"
},
"command": {
"title": "",
"command": "editor.action.triggerSuggest"
},
"sortText": "-00000000",
"label": "*:",
"detail": "& > *",
"additionalTextEdits": [],
"textEdit": {
"newText": "*:",
"range": {
"start": {
"line": 11,
"character": 116
},
"end": {
"line": 11,
"character": 125
}
}
}
},
{
"kind": 9,
"data": {
"_projectKey": "0",
"_type": "variant"
},
"command": {
"title": "",
"command": "editor.action.triggerSuggest"
},
"sortText": "-00000001",
"label": "first-letter:",
"detail": "&::first-letter",
"additionalTextEdits": [],
"textEdit": {
"newText": "first-letter:",
"range": {
"start": {
"line": 11,
"character": 116
},
"end": {
"line": 11,
"character": 125
}
}
}
},
{
"kind": 9,
"data": {
"_projectKey": "0",
"_type": "variant"
},
"command": {
"title": "",
"command": "editor.action.triggerSuggest"
},
"sortText": "-00000002",
"label": "first-line:",
"detail": "&::first-line",
"additionalTextEdits": [],
"textEdit": {
"newText": "first-line:",
"range": {
"start": {
"line": 11,
"character": 116
},
"end": {
"line": 11,
"character": 125
}
}
}
},
from lsp-bridge.
Can you advise how I influence the initialize
request? Meaning how to I add anything into it's fields by leveraging lsp-bridge
config files?
from lsp-bridge.
Hey, @manateelazycat, thanks for getting back. This backend is cool but I believe it doesn't reflect custom changes, does it?
Somehow this backend from
lsp-mode
works pretty Ok. It's slow, but it gives relevant completion.I traced their logs, here's how the eventual configuration looks like:
[Trace - 07:18:09 PM] Sending response 'workspace/configuration - (1)'. Processing request took 0ms Params: { "jsonrpc": "2.0", "id": 1, "result": [ { "emmetCompletions": false, "showPixelEquivalents": true, "rootFontSize": 16, "validate": true, "hovers": true, "suggestions": true, "codeActions": true, "lint": { "invalidScreen": "error", "invalidVariant": "error", "invalidTailwindDirective": "error", "invalidApply": "error", "invalidConfigPath": "error", "cssConflict": "warning", "recommendedVariantOrder": "warning" }, "experimental": { "classRegex": "" }, "classAttributes": [ "class", "className", "ngClass" ] } ] }The actual config in code looks like this.
Could it be vital? I struggled to understand how to properly provide these settings via the
lsp-bridge
config. If you help, I'll happily contribute:) I didn't find a way to send thoseinitializationOptions
to see if it could be a quick fix.
If you want send response to workspace/configuration, please track
Line 644 in 7c70339
and
Line 503 in 7c70339
If you want response to initialize , example send customize initializationOptions, you need create tailwindcss.json under directory lspbridge/langserver, then fill initializationOptions field in tailwindcss.json, example
lsp-bridge/langserver/jdtls.json
Line 15 in 7c70339
from lsp-bridge.
Thanks for quickly getting back. I played with configuration in many ways and tried to compare the communication logs, but no luck or magic so far.
I might ask the author of the lsp-tailwind
package. There everything works well, hover
, autocomplete
, etc.
I'm lacking knowledge a bit, to hack with it further, but your suggestion helped me move forward with ideas.
lsp-bridge
is absolutely great and solves quite some fundamental issues around LSP support.
from lsp-bridge.
@manateelazycat, my debugging via logs didn't yield result yet. The server configuration sequences look pretty similar now but completion requests return nothing for lsp-bridge
while for very similar requests for lsp-mode
it does work.
I used the latest tailwindcss server version for both clients on the very same project.
Attaching session logs if someone can help:
lsp-bridge-log.json
lsp-mode-log.json
Here's my config,
tailwindcss.json
Any ideas how to debug it further? Are there logs generated by python for server calls, serialization, etc.?
Feels like I miss smth obvious knowing it works.
from lsp-bridge.
Related Issues (20)
- java 多个工程代码跳转的问题 HOT 5
- markdown default lang sever is incorrect HOT 1
- [Feature-Request]/Question: Tree-like view of symbols from lsp-bridge HOT 3
- vscode-html-language-server日志返回candidates为0 HOT 8
- diagnostic功能无法显示整个project的异常 HOT 3
- 在启用auto-insert-mode之后,在打开新.sh文件时会出错 HOT 1
- How to setup for lisp mode? HOT 2
- Tailwindcss and Eslint working with javascriptreact but not typescriptreact. HOT 1
- Support macro expand for rust HOT 6
- auto-completed content comes to end of the line HOT 6
- lsp-bridge-peek-mode with errors HOT 3
- jdtls code action error, it cannot pop candidates. HOT 1
- Build a multi-thread backend for CAPF
- completion not working on windows with doomemacs HOT 2
- Submit to GNU ELPA HOT 1
- Rust mode does not show expected diagnostic info HOT 1
- Win10行安装后报错: No compression program defined HOT 1
- completion word from a file HOT 4
- basedpyright_ruff issue HOT 1
- dart中import无法补全库名称 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-bridge.