File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -948,17 +948,29 @@ void didChangeWorkspaceFolders(DidChangeWorkspaceFoldersParams params)
948948@protocolNotification(" textDocument/didOpen" )
949949void onDidOpenDocument (DidOpenTextDocumentParams params)
950950{
951- string lintSetting = config(params.textDocument.uri).d.lintOnFileOpen;
951+ auto config = workspace(params.textDocument.uri).config;
952+ auto document = documents[params.textDocument.uri];
953+
954+ string lintSetting = config.d.lintOnFileOpen;
952955 bool shouldLint;
953956 if (lintSetting == " always" )
954957 shouldLint = true ;
955958 else if (lintSetting == " project" )
956959 shouldLint = workspaceIndex(params.textDocument.uri) != size_t .max;
957960
958961 if (shouldLint)
962+ {
959963 onDidChangeDocument(DidChangeTextDocumentParams(
960964 VersionedTextDocumentIdentifier(
961965 params.textDocument.uri, params.textDocument.version_)));
966+
967+ if (config.d.enableCcdbLinting && document.languageId == " d" )
968+ {
969+ import served.linters.ccdb;
970+
971+ lint(document);
972+ }
973+ }
962974}
963975
964976@protocolNotification(" textDocument/didClose" )
You can’t perform that action at this time.
0 commit comments