ghdl / ghdl-language-server

Language server based on ghdl
MIT License
91 stars 8 forks source link

Usage section missing details #63

Open dstadelm opened 4 years ago

dstadelm commented 4 years ago

I'm very interested in ghdl_ls there are however some starting hurdles that I've got to overcome.

1. How does a project have to be setup for multiple libraries (not only work). Multiple sections?

{
    "options": {
        "ghdl_analysis": [
            "--workdir=lib1",
            "--ieee=synopsys",
            "-fexplicit"
        ]
    },
    "files": [
...
    ]
}
{
    "options": {
        "ghdl_analysis": [
            "--workdir=lib2",
            "--ieee=synopsys",
            "-fexplicit"
        ]
    },
    "files": [
...
    ]
}

2. Can patterns be used for "files"?

    "files": [
        { "file": "rtl/**/hdl/*.vhd",           "language": "vhdl" },
        { "file": "assembly/core_fpga.vhd", "language": "vhdl" },
        { "file": "sim/tb_core.vhd",        "language": "vhdl" }
    ]

3. What alternatives to "vhdl" are there for "language", doesn't ghdl only support vhdl anyway?

tgingold commented 4 years ago
  1. How does a project have to be setup for multiple libraries (not only work). Multiple sections? { "options": { "ghdl_analysis": [ "--workdir=lib1", "--ieee=synopsys", "-fexplicit" ] }, "files": [ ... ] } { "options": { "ghdl_analysis": [ "--workdir=lib2", "--ieee=synopsys", "-fexplicit" ] }, "files": [ ... ] }

Currently you cannot. You have to first analyze all the files not in the work library and create a project for the work library. For sure, that needs to be changed.

I propose to add a library attribute per file.

  1. Can patterns be used for "files"? "files": [ { "file": "rtl/*/hdl/.vhd", "language": "vhdl" }, { "file": "assembly/core_fpga.vhd", "language": "vhdl" }, { "file": "sim/tb_core.vhd", "language": "vhdl" } ]

No. The project file is low-level and files must be explicit.

  1. What alternatives to "vhdl" are there for "language", doesn't ghdl only support vhdl anyway?

All the non-vhdl files are ignored.