File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -368,9 +368,10 @@ impl LanguageServer for DjangoLanguageServer {
368
368
) ) ;
369
369
} ;
370
370
371
+ let path: Utf8PathBuf = url. path ( ) . into ( ) ;
372
+
371
373
// Only provide diagnostics for template files
372
- let file_kind = FileKind :: from ( url. path ( ) ) ;
373
- if file_kind != FileKind :: Template {
374
+ if FileKind :: from ( & path) != FileKind :: Template {
374
375
return Ok ( lsp_types:: DocumentDiagnosticReportResult :: Report (
375
376
lsp_types:: DocumentDiagnosticReport :: Full (
376
377
lsp_types:: RelatedFullDocumentDiagnosticReport {
@@ -385,7 +386,6 @@ impl LanguageServer for DjangoLanguageServer {
385
386
}
386
387
387
388
// Get diagnostics from the database
388
- let path: Utf8PathBuf = url. path ( ) . into ( ) ;
389
389
let diagnostics: Vec < lsp_types:: Diagnostic > = self
390
390
. with_session_mut ( |session| {
391
391
let file = session. get_or_create_file ( & path) ;
You can’t perform that action at this time.
0 commit comments