MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
558 stars 122 forks source link

Integrate to Neovim as a language server #1006

Closed MinhTran0911 closed 1 month ago

MinhTran0911 commented 1 month ago

I am wondering if this can be used as a language server for Neovim via Neovim’s LSP to provide linting/code completion/syntax highlighting? If it is possible then how to set it up?

udif commented 1 month ago

Have you tried: https://danielmangum.com/posts/setup-verible-verilog-neovim/ ?

I think Verible is more suitable for this task:

The Verible project's main mission is to parse SystemVerilog (IEEE 1800-2017) (as standardized in the SV-LRM) for a wide variety of applications, including developer tools.

It was born out of a need to parse un-preprocessed source files, which is suitable for single-file applications like style-linting and formatting. In doing so, it can be adapted to parse preprocessed source files, which is what real compilers and toolchains require.

MikePopoloski commented 1 month ago

slang works fine as the engine for a language server; some things I know about via a quick search:

Hopefully that gets you started.