Skip to content

[Enhancement] Pass arguments to lsp #446

Closed
@Yakkhini

Description

@Yakkhini

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions