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

[Enhancement] Pass arguments to lsp #446

Open
Yakkhini opened this issue Sep 5, 2023 · 4 comments
Open

[Enhancement] Pass arguments to lsp #446

Yakkhini opened this issue Sep 5, 2023 · 4 comments
Labels

Comments

@Yakkhini
Copy link

Yakkhini commented Sep 5, 2023

Describe the bug
I'm using verible-verilog-ls as my SystemVerilog Language Server and I found that there is no options to pass arguments for verible lsp or other language servers. I found that the plugins source code has wrote an interface for passing arguments to language servers in src/extensions.ts, function setupLanguageClient(), argument serverArgs but with some reason it isn't been exposed as an setting option.

I want to implement (or modify) this function to read lsp arguments from settings and pass to language server. Verible lsp working is enough for me, but it seems like modify the function would effects other lsp. So there is any plan to implement this feature or any reason not to implement it?

If the maintainer agree for implementing the feature, I would like contribute to this plugin.

(Plus, pass argument in path straightly not work, at least the verible lsp can't work. I will put relative info below.)

Environment (please complete the following information):

  • OS: NixOS 23.05.20230829
  • VS Code version 1.78.2
  • Extension version 1.13.0
  • Language server: verible-verilog-ls

Steps to reproduce
Steps to reproduce the behavior:

...
"verilog.languageServer.veribleVerilogLs.path": "verible-verilog-ls --rules=-unpacked-dimensions-range-ordering",
...

Log

[Error - 5:15:18 PM] veribleVerilogLs language server client: couldn't create connection to server.
Launching server using command verible-verilog-ls --rules=-unpacked-dimensions-range-ordering failed. Error: spawn verible-verilog-ls --rules=-unpacked-dimensions-range-ordering ENOENT

Expected behavior
Verible lsp works with custom rules.

Actual behavior

Couldn't create connection to server.

@Yakkhini Yakkhini added the bug label Sep 5, 2023
@Yakkhini
Copy link
Author

Yakkhini commented Sep 5, 2023

The command verible-verilog-ls --rules=-unpacked-dimensions-range-ordering works well in shell.

@bolinfest
Copy link

Please consider #447 when adding support for this feature.

@bolinfest
Copy link

@Yakkhini you could seemingly work around this by defining your own Bash script like so:

#!bin/bash

verible-verilog-ls --rules=-unpacked-dimensions-range-ordering "$@"

and then specifying the path to your Bash script as the value for the "verilog.languageServer.veribleVerilogLs.path" VS Code setting.

@Yakkhini
Copy link
Author

Yakkhini commented Sep 6, 2023

@Yakkhini you could seemingly work around this by defining your own Bash script like so:

#!bin/bash

verible-verilog-ls --rules=-unpacked-dimensions-range-ordering "$@"

and then specifying the path to your Bash script as the value for the "verilog.languageServer.veribleVerilogLs.path" VS Code setting.

It seems like a good idea. ;) I will give it a try later. As now, I've decided setting verible language server experimental feature to false and use this plugin with CHIPS ALLIANCE' official plugin together.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants