feat(editor): allow hiding query line numbers
This commit is contained in:
1 parent
eaad88cc80
commit
4a478acf07
18 files changed
+205
-7
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import type { Extension } from "@codemirror/state";
|
||||
import type { lineNumbers } from "@codemirror/view";
|
||||
|
||||
type LineNumbersFactory = typeof lineNumbers;
|
||||
type LineNumbersConfig = NonNullable<Parameters<LineNumbersFactory>[0]>;
|
||||
|
||||
export function buildQueryEditorLineNumbersExtension(factory: LineNumbersFactory | null, enabled: boolean, config: LineNumbersConfig): Extension {
|
||||
return enabled && factory ? factory(config) : [];
|
||||
}
|
||||
Reference in new issue
Block a user