actually fix lint styles (#3187)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -18,6 +18,7 @@ import type {
|
|||||||
ViewPlugin,
|
ViewPlugin,
|
||||||
} from '@codemirror/view'
|
} from '@codemirror/view'
|
||||||
import { EditorView, Tooltip } from '@codemirror/view'
|
import { EditorView, Tooltip } from '@codemirror/view'
|
||||||
|
import { linter } from '@codemirror/lint'
|
||||||
|
|
||||||
import type { PublishDiagnosticsParams } from 'vscode-languageserver-protocol'
|
import type { PublishDiagnosticsParams } from 'vscode-languageserver-protocol'
|
||||||
import type * as LSP from 'vscode-languageserver-protocol'
|
import type * as LSP from 'vscode-languageserver-protocol'
|
||||||
@ -572,6 +573,7 @@ export class LanguageServerPluginSpec
|
|||||||
lspHoverExt(plugin),
|
lspHoverExt(plugin),
|
||||||
lspIndentExt(),
|
lspIndentExt(),
|
||||||
lspSemanticTokensExt(),
|
lspSemanticTokensExt(),
|
||||||
|
linter(null),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,7 @@ import { Selections, processCodeMirrorRanges, Selection } from 'lib/selections'
|
|||||||
import { undo, redo } from '@codemirror/commands'
|
import { undo, redo } from '@codemirror/commands'
|
||||||
import { CommandBarMachineEvent } from 'machines/commandBarMachine'
|
import { CommandBarMachineEvent } from 'machines/commandBarMachine'
|
||||||
import { addLineHighlight, addLineHighlightEvent } from './highlightextension'
|
import { addLineHighlight, addLineHighlightEvent } from './highlightextension'
|
||||||
import {
|
import { Diagnostic, setDiagnosticsEffect } from '@codemirror/lint'
|
||||||
Diagnostic,
|
|
||||||
setDiagnostics,
|
|
||||||
setDiagnosticsEffect,
|
|
||||||
} from '@codemirror/lint'
|
|
||||||
|
|
||||||
const updateOutsideEditorAnnotation = Annotation.define<boolean>()
|
const updateOutsideEditorAnnotation = Annotation.define<boolean>()
|
||||||
export const updateOutsideEditorEvent = updateOutsideEditorAnnotation.of(true)
|
export const updateOutsideEditorEvent = updateOutsideEditorAnnotation.of(true)
|
||||||
@ -57,12 +53,6 @@ export default class EditorManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setEditorView(editorView: EditorView) {
|
setEditorView(editorView: EditorView) {
|
||||||
if (!this._editorView) {
|
|
||||||
// Initialize lint.
|
|
||||||
// This will initialize all the styles etc.
|
|
||||||
// We only want to do this once.
|
|
||||||
editorView.dispatch(setDiagnostics(editorView.state, []))
|
|
||||||
}
|
|
||||||
this._editorView = editorView
|
this._editorView = editorView
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user