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

Document/Add Helix support #163

Open
H2WO4 opened this issue Jul 21, 2024 · 2 comments
Open

Document/Add Helix support #163

H2WO4 opened this issue Jul 21, 2024 · 2 comments

Comments

@H2WO4
Copy link

H2WO4 commented Jul 21, 2024

Is your feature request related to a problem? Please describe.
Using sqls with helix is possible; but incomplete.

Describe the solution you'd like
Similarly to the individual editors plugins done for vim and others, to have more "specialized" support for Helix.
Or at least document what config options are available in order to be able to "hack in" support.

Here is what works:

  • Tables and columns autocomplete (sometimes, line breaks seem to break it)
  • Tables and columns hover (markdown tables rendering is currently broken, but that comes from helix: bug report)

Here is what doesn't seems to work:

  • Keyword autocomplete
  • Tables and columns autocomplete needs to often be brought up manually and are sometimes unable to work from a "blank start" (as in you need to start typing at least 1 character for it to work)
  • Signature help
  • Commands

Describe alternatives you've considered
Using the other SQL LSP, or switching editor; but neither option is a solution.

Additional context
I was not able to figure out why completion doesn't work; but the reason why commands do not seems to be that the commands are registered as code actions, instead of workspace commands.

@mmorley0395
Copy link

also interested in this. @H2WO4 what does your languages.toml look like right now for helix for sqls? I'm having trouble even getting that working.

@H2WO4
Copy link
Author

H2WO4 commented Aug 21, 2024

A straightforward configuration should have sqls somewhat working.

Here's my languages.toml:

[[language]]
name = "sql"
autoformat = false
language-servers = ["sqls"]

# ...

[language-server.sqls]
command = "sqls"

You should also have a sqls/config.yml set up:

connections:
- alias: "connection-name"
  driver: "your-db"
  dataSourceName: "url://to:your@db/"

You may need to change the command field to the absolute path to the sqls executable if it is not in your $PATH.

If you need info for troubleshooting, the :log-open helix command is very useful.

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

No branches or pull requests

2 participants