{"id":13648705,"url":"https://github.com/dalance/svls","last_synced_at":"2025-05-14T14:08:21.787Z","repository":{"id":36147492,"uuid":"221851427","full_name":"dalance/svls","owner":"dalance","description":"SystemVerilog language server","archived":false,"fork":false,"pushed_at":"2025-04-25T20:40:31.000Z","size":788,"stargazers_count":504,"open_issues_count":23,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-25T21:30:01.282Z","etag":null,"topics":["language-server","rust","systemverilog","verilog"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dalance.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"dalance"}},"created_at":"2019-11-15T05:34:40.000Z","updated_at":"2025-04-25T20:40:30.000Z","dependencies_parsed_at":"2024-06-03T04:40:29.347Z","dependency_job_id":"c65f942a-fd5a-4aa1-8da9-adba857ca954","html_url":"https://github.com/dalance/svls","commit_stats":{"total_commits":292,"total_committers":9,"mean_commits":32.44444444444444,"dds":0.5376712328767124,"last_synced_commit":"9cef909fee1385765e3a20543843adf72e98194e"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsvls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsvls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsvls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsvls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalance","download_url":"https://codeload.github.com/dalance/svls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159753,"owners_count":22024564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["language-server","rust","systemverilog","verilog"],"created_at":"2024-08-02T01:04:28.145Z","updated_at":"2025-05-14T14:08:21.762Z","avatar_url":"https://github.com/dalance.png","language":"Rust","readme":"# svls\n\nSystemVerilog language server\n\n[![Actions Status](https://github.com/dalance/svls/workflows/Regression/badge.svg)](https://github.com/dalance/svls/actions)\n\n[![Crates.io](https://img.shields.io/crates/v/svls.svg)](https://crates.io/crates/svls)\n[![svlint](https://snapcraft.io/svls/badge.svg)](https://snapcraft.io/svls)\n[![AUR version](https://img.shields.io/aur/version/svls?logo=Arch-Linux)](https://aur.archlinux.org/packages/svls/)\n\n![test](https://user-images.githubusercontent.com/4331004/68925756-23478f00-07c7-11ea-84f3-2afd23ed2764.gif)\n\n## Feature\n\n* Linter based on [svlint](https://github.com/dalance/svlint).\n\n## Installation\n\n### Download binary\n\nDownload from [release page](https://github.com/dalance/svls/releases/latest), and extract to the directory in PATH.\n\n### snapcraft\n\nYou can install from [snapcraft](https://snapcraft.io/svls)\n\n```\nsudo snap install svls\n```\n\n### Cargo\n\nYou can install by [cargo](https://crates.io/crates/svls).\n\n```\ncargo install svls\n```\n\n## Configuration\n\n### Language server\n\nsvls uses `.svls.toml` at the root of repository.\nThe example of `.svls.toml` is below:\n\n```toml\n[verilog]\ninclude_paths = [\"src/header\"]\ndefines = [\"DEBUG\", \"VAR=1\"]\nplugins = [\"path/to/libfoo.so\", \"path/to/libbar.so\"]\n\n[option]\nlinter = true\n```\n\n#### `[verilog]` section\n\n`include_paths` is include paths from the root of repository.\n`defines` is define strings.\n`plugins` is paths to svlint plugins from the working directory.\n\n#### `[option]` section\n\n`linter` shows whether linter feature is enabled.\n\n### Linter\n\nLinter uses `.svlint.toml` at the root of repository.\nIf `.svlint.toml` can't be used, all lint rules are enabled.\nPlease see [svlint#configuration](https://github.com/dalance/svlint/blob/master/MANUAL.md#configuration) for the detailed information.\n\n## Usage\n\n### Visual Studio Code\n\nPlease install [svls-vscode](https://marketplace.visualstudio.com/items?itemName=dalance.svls-vscode) extension from marketplace.\n\n### Vim/Neovim with [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim)\n\n```viml\nlet g:LanguageClient_serverCommands = {\n    \\ 'systemverilog': ['svls'],\n    \\ }\n```\n\n### Vim/Neovim with [vim-lsp](https://github.com/prabirshrestha/vim-lsp)\n\n```viml\nif executable('svls')\n    au User lsp_setup call lsp#register_server({\n        \\ 'name': 'svls',\n        \\ 'cmd': {server_info-\u003e['svls']},\n        \\ 'whitelist': ['systemverilog'],\n        \\ })\nendif\n```\n\n### Vim/Neovim with [coc.nvim](https://github.com/neoclide/coc.nvim)\n\nIn configuration file\n```json\n\"languageserver\": {\n    \"svls\": {\n        \"command\": \"svls\",\n        \"filetypes\": [\"systemverilog\"]\n    }\n}\n```\n\n### Neovim with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)\n\nIn configuration file\n```lua\n{\n  \"neovim/nvim-lspconfig\",\n  opts = {\n    servers = {\n      svls = {\n        root_dir = function(fname)\n          return require(\"lspconfig.util\").find_git_ancestor(fname)\n        end,\n        cmd = { \"svls\" },\n        filetypes = { \"verilog\", \"systemverilog\" },\n      },\n    },\n  },\n}\n```\n\n### Emacs with [lsp-mode](https://github.com/emacs-lsp/lsp-mode)\n\n```emacs-lisp\n(use-package flycheck\n  :ensure t\n  :defer t\n  :init (global-flycheck-mode t))\n\n(use-package company\n  :ensure t\n  :defer t\n  :init (global-company-mode t)\n  :config\n  ;; Company Flx adds fuzzy matching to company, powered by the sophisticated\n  ;; sorting heuristics  in =flx=\n  (use-package company-flx\n    :ensure t\n    :after company\n    :init (company-flx-mode t))\n  ;; Company Quickhelp\n  ;; When idling on a completion candidate the documentation for the\n  ;; candidate will pop up after `company-quickhelp-delay' seconds.\n  (use-package company-quickhelp\n    :after company\n    :ensure t\n    ;; :init (company-quickhelp-mode t)\n    :hook (prog-mode . (lambda ()\n                         (when (window-system)\n                           (company-quickhelp-local-mode))))\n    :config\n    (setq company-quickhelp-delay 0.2\n          company-quickhelp-max-lines nil)))\n\n(use-package lsp-mode\n  :defer t\n  :ensure t\n  :commands lsp\n  :config\n  (setq lsp-log-io nil\n        lsp-auto-configure t\n        lsp-auto-guess-root t\n        lsp-enable-completion-at-point t\n        lsp-enable-xref t\n        lsp-prefer-flymake nil\n        lsp-use-native-json t\n        lsp-enable-indentation t\n        lsp-response-timeout 10\n        lsp-restart 'auto-restart\n        lsp-keep-workspace-alive t\n        lsp-eldoc-render-all nil\n        lsp-enable-snippet nil\n        lsp-enable-folding t)\n   ;;; lsp-ui gives us the blue documentation boxes and the sidebar info\n  (use-package lsp-ui\n    :defer t\n    :ensure t\n    :after lsp\n    :commands lsp-ui-mode\n    :config\n    (setq lsp-ui-sideline-ignore-duplicate t\n          lsp-ui-sideline-delay 0.5\n          lsp-ui-sideline-show-symbol t\n          lsp-ui-sideline-show-hover t\n          lsp-ui-sideline-show-diagnostics t\n          lsp-ui-sideline-show-code-actions t\n          lsp-ui-peek-always-show t\n          lsp-ui-doc-use-childframe t)\n    :bind\n    (:map lsp-ui-mode-map\n          ([remap xref-find-definitions] . lsp-ui-peek-find-definitions)\n          ([remap xref-find-references] . lsp-ui-peek-find-references))\n    :hook\n    ((lsp-mode . lsp-ui-mode)\n     (lsp-after-open . (lambda ()\n                         (lsp-ui-flycheck-enable t)\n                         (lsp-ui-sideline-enable t)\n                         (lsp-ui-imenu-enable t)\n                         (lsp-lens-mode t)\n                         (lsp-ui-peek-enable t)\n                         (lsp-ui-doc-enable t)))))\n  ;;; company lsp\n  ;; install LSP company backend for LSP-driven completion\n  (use-package company-lsp\n    :defer t\n    :ensure t\n    :after company\n    :commands company-lsp\n    :config\n    (setq company-lsp-cache-candidates t\n          company-lsp-enable-recompletion t\n          company-lsp-enable-snippet t\n          company-lsp-async t)\n    ;; avoid, as this changes it globally do it in the major mode instead (push\n    ;; 'company-lsp company-backends) better set it locally\n    :hook (lsp-after-open . (lambda()\n                              (add-to-list (make-local-variable 'company-backends)\n                                           'company-lsp)))))\n\n(use-package verilog-mode\n  :defer t\n  :config\n  (require 'lsp)\n  (lsp-register-client\n   (make-lsp-client :new-connection (lsp-stdio-connection '(\"svls\"))\n   :major-modes '(verilog-mode)\n   :priority -1\n   ))\n  :hook (verilog-mode . (lambda()\n      (lsp)\n      (flycheck-mode t)\n      (add-to-list 'lsp-language-id-configuration '(verilog-mode . \"verilog\")))))\n```\n\n### Emacs with [verilog-ext](https://github.com/gmlarumbe/verilog-ext)\n\n```elisp\n(require 'verilog-ext)\n(verilog-ext-mode-setup)\n(verilog-ext-eglot-set-server 've-svls) ;`eglot' config\n(verilog-ext-lsp-set-server 've-svls)   ; `lsp' config\n```\n\n### Helix\n\nIn `languages.toml`:\n\n```toml\n[language-server.svls]\ncommand = \"svls\"\n\n[[language]]\nname = \"verilog\"\nlanguage-servers = [\"svls\"]\n```\n","funding_links":["https://github.com/sponsors/dalance"],"categories":["Rust","Hardware Description Language","Frameworks","Programming Languages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fsvls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalance%2Fsvls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fsvls/lists"}