Skip to content

Commit 4b84424

Browse files
authored
Fix glitches caused by Verible LS (#503)
* Suppress diagnostics and formatter of verible LS Since HDL-support has implemented the diagnostics and formatter, the verible LS should not directly provide these features. * Fix trailing comma
1 parent 051d46b commit 4b84424

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)\
66

7+
## [Unreleased] - 2024-xx-xx
8+
9+
### Fixed
10+
11+
- Fix same warning of Verible LS shows twice [#449](https://github.com/mshr-h/vscode-verilog-hdl-support/issues/449)
12+
- Fix Verible formatter arguments not working [#487](https://github.com/mshr-h/vscode-verilog-hdl-support/issues/487)
13+
714
## [1.15.3] - 2024-10-26
815

916
### Fixed

src/extension.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: MIT
22
import * as vscode from 'vscode';
3-
import { LanguageClient, LanguageClientOptions, ServerOptions } from 'vscode-languageclient/node';
3+
import { LanguageClient, LanguageClientOptions, Message, ServerOptions } from 'vscode-languageclient/node';
44

55
import LintManager from './linter/LintManager';
66
import { CtagsManager } from './ctags';
@@ -249,6 +249,18 @@ function initAllLanguageClients() {
249249

250250
// init verible-verilog-ls
251251
setupLanguageClient('veribleVerilogLs', 'verible-verilog-ls', [], [], {
252+
connectionOptions: {
253+
messageStrategy: {
254+
handleMessage: (message, next) => {
255+
if (Message.isResponse(message) && message.result['capabilities']) {
256+
delete message.result['capabilities']['diagnosticProvider'];
257+
delete message.result['capabilities']['documentFormattingProvider'];
258+
delete message.result['capabilities']['documentRangeFormattingProvider'];
259+
}
260+
next(message);
261+
},
262+
},
263+
},
252264
documentSelector: [
253265
{ scheme: 'file', language: 'verilog' },
254266
{ scheme: 'file', language: 'systemverilog' },

0 commit comments

Comments
 (0)