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

Cant get the linter to work in neovim #283

Open
cpt-n3mo opened this issue Feb 23, 2024 · 1 comment
Open

Cant get the linter to work in neovim #283

cpt-n3mo opened this issue Feb 23, 2024 · 1 comment

Comments

@cpt-n3mo
Copy link

i have installed svls via mason, and added the following config

["svls"] = function()
    lspconfig.svls.setup{
      name = 'svls',
      cmd = {"svls", "-d"},
      whitelist = {'systemverilog','verilog'},
      filetypes = {'verilog','systemverilog'}

    }
  end

added a .svls.toml to the root of my project containing

[verilog]
include_paths = ['modules/', 'tb/']

[option]
linter = true

but i cant get the linter to work..

LspInfo give

 Detected filetype:   verilog
 
 0 client(s) attached to this buffer: 
 
 Other clients that match the filetype: verilog
 
 Config: svls
 	filetypes:         verilog, systemverilog
 	root directory:    Not found.
 	cmd:               /home/n3m0/.local/share/nvim/mason/bin/svls -d
 	cmd is executable: true
 	autostart:         true
 	custom handlers:   

small section of LSPLog

[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token "10"'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token ";"'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token "\n\n  "'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token "select"'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token " "'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token "="'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token " \n\n\n"'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token "#"'
[ERROR][2024-02-22 22:38:01] ...lsp/handlers.lua:535	'ERROR: Assumption made for token re-ranging broken for token "1000"'
[ERROR][2024-02-22 22:46:36] ...lsp/handlers.lua:535	"ERROR: Tokenization might be incorrect as token search ran into infinite loop at 105 - 106"
[ERROR][2024-02-22 22:46:36] ...lsp/handlers.lua:535	"ERROR: TypeError: Cannot read properties of undefined (reading 'scopes')"
[ERROR][2024-02-22 22:46:48] ...lsp/handlers.lua:535	"ERROR: Formatting gave errors"
[START][2024-02-22 23:37:36] LSP logging initiated
[ERROR][2024-02-22 23:37:36] ...lsp/handlers.lua:535	"ERROR: Error: ENOENT: no such file or directory, lstat '/null'"

how would i fix this..?

kind regards

@mksoc
Copy link

mksoc commented Mar 1, 2024

Try to run inside a git repo. I had the same problem with svls as well as Verible and I fixed both in one go with this: chipsalliance/verible#1342

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

No branches or pull requests

2 participants