-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Unable to get settings working on Helix editor #207
Comments
Hey, cool that you're setting up a Helix client and aur package @in0ni 🥳 I see from the Helix docs that
The way I'm reading that,
some-sass/packages/language-server/src/server.ts Lines 127 to 130 in e0b0af6
What you want is probably to add this to your [somesass]
suggestFromUseOnly = true
loadPaths = ["test/"] And then this would be (ish) what [language-server.some-sass-language-server]
command = "some-sass-language-server"
args = ["--stdio"]
[[language]]
name = "scss"
scope = "source.scss"
injection-regex = "scss"
file-types = ["scss"]
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "some-sass-language-server" ] |
It's a bit of legacy, and for sure can be a bit confusing. This whole project began as a language server that filled the gaps in VS Code. For that reason, I don't include things like completions and hover info for CSS attributes, among other things, since those shipped with the built-in CSS/SCSS/Less language features in Code. What I mean by that line is, you probably want to run both |
Hmm, seems Helix is strict about what goes in I see this PR is what introduced support for the |
Hey @wkillerud, took a brief look at this -- and did some quick checking of the verbose logs. I do think the workspace/config is passed. I hope to get some time today/tomorrow to dig deeper, will keep you posted. Thanks for the links/info, they are very helpful. |
I'm attaching a log file, that might help, I think we're getting a little closer:
From logs:
I see you are working with
Would you mind taking a quick look at the log? Maybe I need to tweak how the settings are sent, let me know if I can assist with anything on my end. |
Sorry for the late reply @in0ni, I missed your last post. That's great that the Helix language client "speaks" Looking at the logs, I think I see a potential issue in the message that's sent to the server. {
"settings": {
"somesass.loadPaths": ["web/themes/uw/theme/"],
"somesass.suggestFromUseOnly": true
}
} The server expects that This is the shape of the params sent by VS Code/VSCodium {
"settings": {
"somesass": {
"loadPaths": [],
"scannerDepth": 30,
"scannerExclude": [
"**/.git/**",
"**/node_modules/**",
"**/bower_components/**"
],
"scanImportedFiles": true,
"suggestionStyle": "all",
"suggestAllFromOpenDocument": false,
"suggestFromUseOnly": true,
"suggestFunctionsInStringContextAfterSymbols": " (+-*%",
"triggerPropertyValueCompletion": false
}
}
} I added a note to the docs on how you can log the messages sent by VS Code/VSCodium to the server in case you want to compare other messages. |
I tried running [language-server.some-sass-language-server]
command = "some-sass-language-server"
args = ["--stdio"]
config = { somesass = { suggestFromUseOnly = true, loadPaths = ["test/"], completion = { afterModule = "", beforeVariable = "" } } }
[[language]]
name = "scss"
scope = "source.scss"
injection-regex = "scss"
file-types = ["scss"]
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "some-sass-language-server" ]
auto-format = true
indent = { tab-width = 2, unit = " " } |
I see the completions are a bit quirky in some cases, adding an extra I think this is due to the grammar Helix uses for SCSS. We might be able to add some settings to the language server to work around that. Edit: added here, available in I updated the config example above with these new settings. |
Hey @wkillerud, saw this but have not had a change to implement and test. I will try these settings soon -- and confirm. Thank you. In terms of the bugs of extra Really appreciate it and look forward to finally using this lang server! |
Hey, so have updated to 1.7.0 -- no longer see the issue with double |
Whooohooo! I finally see I had updated to 1.7.1 -- but have not had a chance to tests (have not been working with scss and been a bit swamped). I see one bug which is I still get double Thanks much, this is something I've been needing for quite some time~! I will be ensuring colleagues install as well now that I have tested (for those that have vscode). |
Glad to hear that! I'll be shipping #232 soon which makes the settings |
Version 1.8.1 is out now, which rewrites the code that has caused us some grief with auto-complete. It makes the I tested the release in Helix and completions seem to work as they should. Of course I might have missed something, so let me know if you still get weird double |
Ok, aur updated -- and from initial tests, all is looking great! No more issues with double
Nothing else is needed (well add it to the list of lang servers for scss), so you may update your docs :) In case you're interested I have this for scss config
Thanks much! |
Glad to hear that! I'll close this issue now that we have it working. Thank you for testing and doing the config work and all 🙌 |
Hey, thanks for this language server, very much needed!
I will be maintaining the aur package for arch, and thinking about contributing to helix editor in terms of documenting on the wiki, and seeing about having it as one of the default lsp's for scss.
I have been unable to get the settings to work with Helix, I am using the aur package (npm 1.5.2). I know the lsp is working, as I have disabled
vscode-css-language-server
, and I'm able to get completion for modules (finally!!).In particular I cannot get the following settings to work:
somesass.suggestFromUseOnly
somesass.loadPaths
I have tried various methods to configure, last syntax (not too familiar with toml) is this:
I also tried variations such as:
and
For reference here are all the language server configs that come with Helix out-of-the-box: https://github.com/helix-editor/helix/blob/master/languages.toml
I have several language servers configured, and only efm-language-server with config settings -- and all works well. From my understanding the
suggestFromUseOnly
would avoid me gettingmap-get
as a suggestion, if I start typingmap
(unless I have added it with a@use
.Lastly, and a little unrelated:
Thanks much in advance!
The text was updated successfully, but these errors were encountered: