mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
feat: json mode + code folding in response view
This commit is contained in:
parent
8b586bdfae
commit
12d0890b83
@ -12,7 +12,13 @@ const QueryResult = ({data, isLoading, width}) => {
|
||||
if (editor.current && !cmEditor) {
|
||||
const _cmEditor = CodeMirror.fromTextArea(editor.current, {
|
||||
value: '',
|
||||
lineNumbers: true
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
autoCloseBrackets: true,
|
||||
mode: "application/json",
|
||||
foldGutter: true,
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
|
||||
lineWrapping: true
|
||||
});
|
||||
|
||||
setCmEditor(_cmEditor);
|
||||
|
@ -9,6 +9,13 @@ import actions from 'providers/Store/actions';
|
||||
import { useStore } from '../../providers/Store/index';
|
||||
import StyledWrapper from './StyledWrapper';
|
||||
|
||||
import 'codemirror/mode/javascript/javascript';
|
||||
import 'codemirror/addon/edit/matchbrackets';
|
||||
import 'codemirror/addon/fold/brace-fold';
|
||||
import 'codemirror/addon/fold/foldgutter';
|
||||
|
||||
import 'codemirror/addon/fold/foldgutter.css';
|
||||
|
||||
const RequestTabPanel = dynamic(import('@grafnode/components').then(mod => mod.RequestTabPanel), { ssr: false });
|
||||
|
||||
export default function Main() {
|
||||
|
Loading…
Reference in New Issue
Block a user