Skip to content

Using xvlog for vivado-based linting #55

Description

@skjeeth1

How can i use xvlog -sv for linting systemverilog files using svlangserver?

I tried this in Noevim v0.11.5:

    ---@type vim.lsp.Config
    svlangserver = {
        cmd = { "svlangserver", "--stdio" },
        root_markers = { ".git" },
        filetypes = { "verilog", "systemverilog" },
        settings = {
            systemverilog = {
                includeIndexing = { '*.{v,vh,sv,svh}', '**/*.{v,vh,sv,svh}' },
                launchConfiguration = "xvlog -sv",
            },
        },
        on_attach = function(client, bufnr)
            vim.api.nvim_buf_create_user_command(bufnr, 'LspSvlangserverBuildIndex', function()
                client:exec_cmd({
                    title = 'Build Index',
                    command = 'systemverilog.build_index',
                }, { bufnr = bufnr })
            end, {
                desc = 'Instructs language server to rerun indexing',
            })
            vim.api.nvim_buf_create_user_command(bufnr, 'LspSvlangserverReportHierarchy', function()
                client:exec_cmd({
                    title = 'Build Index',
                    command = 'systemverilog.build_index',
                    arguments = { vim.fn.expand '<cword>' },
                }, { bufnr = bufnr })
            end, {
                desc = 'Generates hierarchy for the given module',
            })
        end,
    }

No diagnostics are shown. However, keyword completion is working.
xvlog is in my path and is found in my nvim instance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions