diff --git a/packages.dhall b/packages.dhall new file mode 100644 index 0000000..52adbd2 --- /dev/null +++ b/packages.dhall @@ -0,0 +1,128 @@ +{- +Welcome to your new Dhall package-set! + +Below are instructions for how to edit this file for most use +cases, so that you don't need to know Dhall to use it. + +## Warning: Don't Move This Top-Level Comment! + +Due to how `dhall format` currently works, this comment's +instructions cannot appear near corresponding sections below +because `dhall format` will delete the comment. However, +it will not delete a top-level comment like this one. + +## Use Cases + +Most will want to do one or both of these options: +1. Override/Patch a package's dependency +2. Add a package not already in the default package set + +This file will continue to work whether you use one or both options. +Instructions for each option are explained below. + +### Overriding/Patching a package + +Purpose: +- Change a package's dependency to a newer/older release than the + default package set's release +- Use your own modified version of some dependency that may + include new API, changed API, removed API by + using your custom git repo of the library rather than + the package set's repo + +Syntax: +Replace the overrides' "{=}" (an empty record) with the following idea +The "//" or "⫽" means "merge these two records and + when they have the same value, use the one on the right:" +------------------------------- +let overrides = + { packageName = + upstream.packageName // { updateEntity1 = "new value", updateEntity2 = "new value" } + , packageName = + upstream.packageName // { version = "v4.0.0" } + , packageName = + upstream.packageName // { repo = "https://www.example.com/path/to/new/repo.git" } + } +------------------------------- + +Example: +------------------------------- +let overrides = + { halogen = + upstream.halogen // { version = "master" } + , halogen-vdom = + upstream.halogen-vdom // { version = "v4.0.0" } + } +------------------------------- + +### Additions + +Purpose: +- Add packages that aren't already included in the default package set + +Syntax: +Replace the additions' "{=}" (an empty record) with the following idea: +------------------------------- +let additions = + { package-name = + { dependencies = + [ "dependency1" + , "dependency2" + ] + , repo = + "https://example.com/path/to/git/repo.git" + , version = + "tag ('v4.0.0') or branch ('master')" + } + , package-name = + { dependencies = + [ "dependency1" + , "dependency2" + ] + , repo = + "https://example.com/path/to/git/repo.git" + , version = + "tag ('v4.0.0') or branch ('master')" + } + , etc. + } +------------------------------- + +Example: +------------------------------- +let additions = + { benchotron = + { dependencies = + [ "arrays" + , "exists" + , "profunctor" + , "strings" + , "quickcheck" + , "lcg" + , "transformers" + , "foldable-traversable" + , "exceptions" + , "node-fs" + , "node-buffer" + , "node-readline" + , "datetime" + , "now" + ] + , repo = + "https://github.com/hdgarrood/purescript-benchotron.git" + , version = + "v7.0.0" + } + } +------------------------------- +-} + + +let upstream = + https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200309/packages.dhall sha256:9221987b4e7ea99ccd0efbe056f7bebc872cd92e0058efe5baa181d73359e7b3 + +let overrides = {=} + +let additions = {=} + +in upstream // overrides // additions diff --git a/spago.dhall b/spago.dhall new file mode 100644 index 0000000..bebdab4 --- /dev/null +++ b/spago.dhall @@ -0,0 +1,18 @@ +{- +Welcome to a Spago project! +You can edit this file as you like. +-} +{ name = "monaco" +, dependencies = + [ "aff" + , "aff-promise" + , "console" + , "effect" + , "foreign" + , "psci-support" + , "record" + , "web-html" + ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] +} diff --git a/src/Monaco/Editor.js b/src/Monaco/Editor.js index 3b0404e..f9bb261 100644 --- a/src/Monaco/Editor.js +++ b/src/Monaco/Editor.js @@ -3,24 +3,25 @@ const LeftObjName = "Left" const RightObjName = "Right" mapMaybes = function (options) { - var newObj = {} + var newObj = {}; for (prop in options) { - var propKey = prop - var propValue = options[prop] - var newValue = undefined + var propKey = prop; + var propValue = options[prop]; + var newValue = undefined; if (propValue.constructor.name == JustObjName) { newValue = propValue["value0"]; - if (newValue.constructor.name == LeftObjName - || newValue.constructor.name == RightObjName) { + if (newValue.constructor.name == LeftObjName || + newValue.constructor.name == RightObjName) { newValue = newValue["value0"]; } - else if (newValue === Object(newValue) && newValue.constructor != Array) { + else if (newValue === Object(newValue) && + newValue.constructor != Array) { newValue = mapMaybes(newValue); } - newObj[propKey] = newValue + newObj[propKey] = newValue; } } - return newObj + return newObj; } @@ -34,19 +35,20 @@ exports.createImpl = function (options) { return function () { return new Promise(function (resolve, reject) { // Check for nodejs environment (e.g. electron) - if(self.process != null){ + if (self.process != null) { // make it happy for nodejs env - var path = require('path'); + const path = require('path'); function uriFromPath(_path) { - var pathName = path.resolve(_path).replace(/\\/g, '/'); + let pathName = path.resolve(_path).replace(/\\/g, '/'); if (pathName.length > 0 && pathName.charAt(0) !== '/') { pathName = '/' + pathName; } + console.log(pathName); return encodeURI('file://' + pathName); } - + monacoRequire.config({ - baseUrl: uriFromPath(path.join(__dirname, './monaco-editor/min')) + baseUrl: uriFromPath(path.join(__dirname, '../node_modules/monaco-editor/min')) }); // workaround monaco-css not understanding the environment self.module = undefined; @@ -57,15 +59,17 @@ exports.createImpl = function (options) { // make it happy for browser env monacoRequire.config({ paths: { 'vs': './monaco-editor/min/vs' } }); } - - monacoRequire(['vs/editor/editor.main'], function () { - var mappedOpts = mapMaybes(options) - var editor = monaco.editor.create(el, mappedOpts); + console.log(options); + const mappedOpts = mapMaybes(options); + console.log(mappedOpts); + console.log(el); + const editor = monaco.editor.create(el, mappedOpts); + console.log(editor); resolve(editor); }); }); - } + }; }; }; diff --git a/src/Monaco/Editor.purs b/src/Monaco/Editor.purs index 8fa9c5d..8dee236 100644 --- a/src/Monaco/Editor.purs +++ b/src/Monaco/Editor.purs @@ -2,25 +2,22 @@ module Monaco.Editor ( create ) where -import Control.Monad.Aff -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Exception (EXCEPTION) +import Effect.Aff (Aff) +import Effect (Effect) import Control.Promise (Promise, toAffE) -import DOM (DOM) -import DOM.HTML.Types (HTMLElement) -import Data.Foreign (Foreign, toForeign) -import Monaco.Types (Editor, EditorConstructionOptions, MONACO) +import Web.HTML (HTMLElement) +import Foreign (Foreign, unsafeToForeign) +import Monaco.Types (Editor, EditorConstructionOptions) foreign import createImpl - ∷ forall e. Foreign + :: Foreign -> HTMLElement - -> Eff (monaco :: MONACO, dom ∷ DOM, exception ∷ EXCEPTION|e) (Promise Editor) + -> Effect (Promise Editor) create - ∷ forall e. - EditorConstructionOptions + :: EditorConstructionOptions -> HTMLElement - -> Aff (monaco :: MONACO, dom ∷ DOM, exception ∷ EXCEPTION|e) Editor + -> Aff Editor create options el = - let effProm = createImpl (toForeign options) el in - toAffE effProm \ No newline at end of file + let effProm = createImpl (unsafeToForeign options) el in + toAffE effProm diff --git a/src/Monaco/Types.purs b/src/Monaco/Types.purs index 5784c8e..d6c1cc9 100644 --- a/src/Monaco/Types.purs +++ b/src/Monaco/Types.purs @@ -1,85 +1,84 @@ module Monaco.Types -( Editor -, FontWeight -, fontWeightNormal -, fontWeightBold -, fontWeightBolder -, fontWeightLighter -, fontWeightInitial -, fontWeightInherit -, fontWeight100 -, fontWeight200 -, fontWeight300 -, fontWeight400 -, fontWeight500 -, fontWeight600 -, fontWeight700 -, fontWeight800 -, fontWeight900 -, WordWrapState -, wordwrapOff -, wordwrapOn -, wordwrapColumn -, wordwrapBounded -, MultiCursorModifier -, ctrlCmd -, alt -, AccessibilitySupport -, accessibilitySupportOn -, accessibilitySupportOff -, accessibilitySupportAuto -, AcceptSuggestion -, acceptSuggestionOn -, acceptSuggestionOff -, acceptSuggestionSmart -, SnippetSuggestion -, snippetSuggestionTop -, snippetSuggestionBottom -, snippetSuggestionInline -, snippetSuggestionNone -, ShowFoldingControls -, showFoldingControlsAlways -, showFoldingControlsMouseOver -, RenderWhiteSpace -, renderWhiteSpaceNone -, renderWhiteSpaceBoundary -, renderWhiteSpaceAll -, RenderHighLight -, renderHighLightNone -, renderHighLightGutter -, renderHighLightLine -, renderHighLightAll -, LineNumberFunction -, LineNumbers -, lineNumbersOn -, lineNumbersOff -, lineNumbersRelative -, lineNumberFunction -, EditorOptionsMixin -, EditorConstructionOptions -, EditorScrollbarOptions -, ShowSlider -, showSliderAlways -, showSliderMouseOver -, ScrollbarVisibility -, scrollbarVisibilityAuto -, scrollbarVisibilityHidden -, scrollbarVisibilityVisible -, EditorMinimapOptions -, EditorFindOptions -, defaultConstuctorOptions -, MONACO -) + ( Editor + , FontWeight + , fontWeightNormal + , fontWeightBold + , fontWeightBolder + , fontWeightLighter + , fontWeightInitial + , fontWeightInherit + , fontWeight100 + , fontWeight200 + , fontWeight300 + , fontWeight400 + , fontWeight500 + , fontWeight600 + , fontWeight700 + , fontWeight800 + , fontWeight900 + , WordWrapState + , wordwrapOff + , wordwrapOn + , wordwrapColumn + , wordwrapBounded + , MultiCursorModifier + , ctrlCmd + , alt + , AccessibilitySupport + , accessibilitySupportOn + , accessibilitySupportOff + , accessibilitySupportAuto + , AcceptSuggestion + , acceptSuggestionOn + , acceptSuggestionOff + , acceptSuggestionSmart + , SnippetSuggestion + , snippetSuggestionTop + , snippetSuggestionBottom + , snippetSuggestionInline + , snippetSuggestionNone + , ShowFoldingControls + , showFoldingControlsAlways + , showFoldingControlsMouseOver + , RenderWhiteSpace + , renderWhiteSpaceNone + , renderWhiteSpaceBoundary + , renderWhiteSpaceAll + , RenderHighLight + , renderHighLightNone + , renderHighLightGutter + , renderHighLightLine + , renderHighLightAll + , LineNumberFunction + , LineNumbers + , lineNumbersOn + , lineNumbersOff + , lineNumbersRelative + , lineNumberFunction + , EditorOptionsMixin + , EditorConstructionOptions + , EditorScrollbarOptions + , ShowSlider + , showSliderAlways + , showSliderMouseOver + , ScrollbarVisibility + , scrollbarVisibilityAuto + , scrollbarVisibilityHidden + , scrollbarVisibilityVisible + , EditorMinimapOptions + , EditorFindOptions + , defaultConstuctorOptions + , MONACO + ) where import Data.Either (Either(..)) import Data.Maybe (Maybe(..)) -import Data.Record.Builder -import Control.Monad.Eff (kind Effect) +import Record.Builder (build, merge) foreign import data Editor ∷ Type -foreign import data MONACO :: Effect +foreign import data MONACO :: Type newtype FontWeight = FontWeight String @@ -235,386 +234,311 @@ lineNumberFunction f = LineNumbers (Right f) type EditorOptionsMixin a = { - {- - The aria label for the editor's textarea (when it is focused). - -} + -- | The aria label for the editor's textarea (when it is focused). ariaLabel :: Maybe String, - {- - Render vertical lines at the specified columns. - Defaults to empty array. - -} + + -- | Render vertical lines at the specified columns. + -- | Defaults to empty array. rulers :: Maybe (Array Number), - {- - A String containing the word separators used when doing word navigation. - Defaults to `~!@#$%^&*()-=+[{]}\\|;:\'",.<>/? - -} + + -- | A String containing the word separators used when doing word navigation. + -- | Defaults to `~!@#$%^&*()-=+[{]}\\|;:\'",.<>/? wordSeparators :: Maybe String, - {- - Enable Linux primary clipboard. - Defaults to true. - -} + + -- | Enable Linux primary clipboard. + -- | Defaults to true. selectionClipboard :: Maybe Boolean, - {- - Control the rendering of line Numbers. - If it is a function, it will be invoked when rendering a line Number and the return value will be rendered. - Otherwise, if it is a truey, line Numbers will be rendered normally (equivalent of using an identity function). - Otherwise, line Numbers will not be rendered. - Defaults to true. - -} + + -- | Control the rendering of line Numbers. + -- | If it is a function, it will be invoked when rendering a line Number and the return value will be rendered. + -- | Otherwise, if it is a truey, line Numbers will be rendered normally (equivalent of using an identity function). + -- | Otherwise, line Numbers will not be rendered. + -- | Defaults to true. lineNumbers :: Maybe LineNumbers, - {- - Should the corresponding line be selected when clicking on the line Number? - Defaults to true. - -} + + -- | Should the corresponding line be selected when clicking on the line Number? + -- | Defaults to true. selectOnLineNumbers :: Maybe Boolean, - {- - Control the width of line Numbers, by reserving horizontal space for rendering at least an amount of digits. - Defaults to 5. - -} + + -- | Control the width of line Numbers, by reserving horizontal space for rendering at least an amount of digits. + -- | Defaults to 5. lineNumbersMinChars :: Maybe Number, - {- - Enable the rendering of the glyph margin. - Defaults to true in vscode and to false in monaco-editor. - -} + + -- | Enable the rendering of the glyph margin. + -- | Defaults to true in vscode and to false in monaco-editor. glyphMargin :: Maybe Boolean, - {- - The width reserved for line decorations (in px). - Line decorations are placed between line Numbers and the editor content. - You can pass in a String in the format floating point followed by "ch". e.g. 1.3ch. - Defaults to 10. - -} + + -- | The width reserved for line decorations (in px). + -- | Line decorations are placed between line Numbers and the editor content. + -- | You can pass in a String in the format floating point followed by "ch". e.g. 1.3ch. + -- | Defaults to 10. lineDecorationsWidth :: Maybe (Either Number String), - {- - When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle. - This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport. - Defaults to 30 (px). - -} + + -- | When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle. + -- | This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport. + -- | Defaults to 30 (px). revealHorizontalRightPadding :: Maybe Number, - {- - Render the editor selection with rounded borders. - Defaults to true. - -} + + -- | Render the editor selection with rounded borders. + -- | Defaults to true. roundedSelection :: Maybe Boolean, - {- - Class name to be added to the editor. - -} + + -- | Class name to be added to the editor. extraEditorClassName :: Maybe String, - {- - Should the editor be read only. - Defaults to false. - -} + + -- | Should the editor be read only. + -- | Defaults to false. readOnly :: Maybe Boolean, - {- - Control the behavior and rendering of the scrollbars. - -} + + -- | Control the behavior and rendering of the scrollbars. scrollbar :: Maybe EditorScrollbarOptions, - {- - Control the behavior and rendering of the minimap. - -} + + -- | Control the behavior and rendering of the minimap. minimap :: Maybe EditorMinimapOptions, - {- - Control the behavior of the find widget. - -} + + -- | Control the behavior of the find widget. find :: Maybe EditorFindOptions, - {- - Display overflow widgets as `fixed`. - Defaults to `false`. - -} + + -- | Display overflow widgets as `fixed`. + -- | Defaults to `false`. fixedOverflowWidgets :: Maybe Boolean, - {- - The Number of vertical lanes the overview ruler should render. - Defaults to 2. - -} + + -- | The Number of vertical lanes the overview ruler should render. + -- | Defaults to 2. overviewRulerLanes :: Maybe Number, - {- - Controls if a border should be drawn around the overview ruler. - Defaults to `true`. - -} + + -- | Controls if a border should be drawn around the overview ruler. + -- | Defaults to `true`. overviewRulerBorder :: Maybe Boolean, - {- - Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'. - Defaults to 'blink'. - -} + + -- | Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'. + -- | Defaults to 'blink'. cursorBlinking :: Maybe String, - {- - Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl. - Defaults to false. - -} + + -- | Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl. + -- | Defaults to false. mouseWheelZoom :: Maybe Boolean, - {- - Control the cursor style, either 'block' or 'line'. - Defaults to 'line'. - -} + + -- | Control the cursor style, either 'block' or 'line'. + -- | Defaults to 'line'. cursorStyle :: Maybe String, - {- - Enable font ligatures. - Defaults to false. - -} + + -- | Enable font ligatures. + -- | Defaults to false. fontLigatures :: Maybe Boolean, - {- - Disable the use of `will-change` for the editor margin and lines layers. - The usage of `will-change` acts as a hint for browsers to create an extra layer. - Defaults to false. - -} + + -- | Disable the use of `will-change` for the editor margin and lines layers. + -- | The usage of `will-change` acts as a hint for browsers to create an extra layer. + -- | Defaults to false. disableLayerHinting :: Maybe Boolean, - {- - Disable the optimizations for monospace fonts. - Defaults to false. - -} + + -- | Disable the optimizations for monospace fonts. + -- | Defaults to false. disableMonospaceOptimizations :: Maybe Boolean, - {- - Should the cursor be hidden in the overview ruler. - Defaults to false. - -} + + -- | Should the cursor be hidden in the overview ruler. + -- | Defaults to false. hideCursorInOverviewRuler :: Maybe Boolean, - {- - Enable that scrolling can go one screen size after the last line. - Defaults to true. - -} + + -- | Enable that scrolling can go one screen size after the last line. + -- | Defaults to true. scrollBeyondLastLine :: Maybe Boolean, - {- - Enable that the editor will install an interval to check if its container dom node size has changed. - Enabling this might have a severe performance impact. - Defaults to false. - -} + + -- | Enable that the editor will install an interval to check if its container dom node size has changed. + -- | Enabling this might have a severe performance impact. + -- | Defaults to false. automaticLayout :: Maybe Boolean, - {- - Control the wrapping of the editor. - When `wordWrap` = "off", the lines will never wrap. - When `wordWrap` = "on", the lines will wrap at the viewport width. - When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`. - When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). - Defaults to "off". - -} + + -- | Control the wrapping of the editor. + -- | When `wordWrap` = "off", the lines will never wrap. + -- | When `wordWrap` = "on", the lines will wrap at the viewport width. + -- | When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`. + -- | When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). + -- | Defaults to "off". wordWrap :: Maybe WordWrapState, - {- - Control the wrapping of the editor. - When `wordWrap` = "off", the lines will never wrap. - When `wordWrap` = "on", the lines will wrap at the viewport width. - When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`. - When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). - Defaults to 80. - -} + + -- | Control the wrapping of the editor. + -- | When `wordWrap` = "off", the lines will never wrap. + -- | When `wordWrap` = "on", the lines will wrap at the viewport width. + -- | When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`. + -- | When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). + -- | Defaults to 80. wordWrapColumn :: Maybe Number, - {- - Force word wrapping when the text appears to be of a minified/generated file. - Defaults to true. - -} + + -- | Force word wrapping when the text appears to be of a minified/generated file. + -- | Defaults to true. wordWrapMinified :: Maybe Boolean, - {- - Control indentation of wrapped lines. Can be: 'none', 'same' or 'indent'. - Defaults to 'same' in vscode and to 'none' in monaco-editor. - -} + + -- | Control indentation of wrapped lines. Can be: 'none', 'same' or 'indent'. + -- | Defaults to 'same' in vscode and to 'none' in monaco-editor. wrappingIndent :: Maybe String, - {- - Configure word wrapping characters. A break will be introduced before these characters. - Defaults to '{([+'. - -} + + -- | Configure word wrapping characters. A break will be introduced before these characters. + -- | Defaults to '{([+'. wordWrapBreakBeforeCharacters :: Maybe String, - {- - Configure word wrapping characters. A break will be introduced after these characters. - Defaults to ' \t})]?|&,;'. - -} + + -- | Configure word wrapping characters. A break will be introduced after these characters. + -- | Defaults to ' \t})]?|&,;'. wordWrapBreakAfterCharacters :: Maybe String, - {- - Configure word wrapping characters. A break will be introduced after these characters only if no `wordWrapBreakBeforeCharacters` or `wordWrapBreakAfterCharacters` were found. - Defaults to '.'. - -} + + -- | Configure word wrapping characters. + -- | A break will be introduced after these characters only if + -- | no `wordWrapBreakBeforeCharacters` or `wordWrapBreakAfterCharacters` were found. + -- | Defaults to '.'. wordWrapBreakObtrusiveCharacters :: Maybe String, - {- - Performance guard: Stop rendering a line after x characters. - Defaults to 10000. - Use -1 to never stop rendering - -} + -- | Performance guard: Stop rendering a line after x characters. + -- | Defaults to 10000. + -- | Use -1 to never stop rendering stopRenderingLineAfter :: Maybe Number, - {- - Enable hover. - Defaults to true. - -} + + -- | Enable hover. + -- | Defaults to true. hover :: Maybe Boolean, - {- - Enable detecting links and making them clickable. - Defaults to true. - -} + + -- | Enable detecting links and making them clickable. + -- | Defaults to true. links :: Maybe Boolean, - {- - Enable custom contextmenu. - Defaults to true. - -} + + -- | Enable custom contextmenu. + -- | Defaults to true. contextmenu :: Maybe Boolean, - {- - A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events. - Defaults to 1. - -} + + -- | A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events. + -- | Defaults to 1. mouseWheelScrollSensitivity :: Maybe Number, - {- - The modifier to be used to add multiple cursors with the mouse. - Defaults to 'alt' - -} + + -- | The modifier to be used to add multiple cursors with the mouse. + -- | Defaults to 'alt' multiCursorModifier :: Maybe MultiCursorModifier, - {- - Configure the editor's accessibility support. - Defaults to 'auto'. It is best to leave this to 'auto'. - -} + + -- | Configure the editor's accessibility support. + -- | Defaults to 'auto'. It is best to leave this to 'auto'. accessibilitySupport :: Maybe AccessibilitySupport, - {- - Enable quick suggestions (shadow suggestions) - Defaults to true. - -} + + -- | Enable quick suggestions (shadow suggestions) + -- | Defaults to true. quickSuggestions :: Maybe ( Either Boolean { other :: Boolean, comments :: Boolean, strings :: Boolean }), - {- - Quick suggestions show delay (in ms) - Defaults to 500 (ms) - -} + + -- | Quick suggestions show delay (in ms) + -- | Defaults to 500 (ms) quickSuggestionsDelay :: Maybe Number, - {- - Enables parameter hints - -} + + -- | Enables parameter hints parameterHints :: Maybe Boolean, - {- - Render icons in suggestions box. - Defaults to true. - -} + + -- | Render icons in suggestions box. + -- | Defaults to true. iconsInSuggestions :: Maybe Boolean, - {- - Enable auto closing brackets. - Defaults to true. - -} + + -- | Enable auto closing brackets. + -- | Defaults to true. autoClosingBrackets :: Maybe Boolean, - {- - Enable auto indentation adjustment. - Defaults to false. - -} + + -- | Enable auto indentation adjustment. + -- | Defaults to false. autoIndent :: Maybe Boolean, - {- - Enable format on type. - Defaults to false. - -} + + -- | Enable format on type. + -- | Defaults to false. formatOnType :: Maybe Boolean, - {- - Enable format on paste. - Defaults to false. - -} + + -- | Enable format on paste. + -- | Defaults to false. formatOnPaste :: Maybe Boolean, - {- - Controls if the editor should allow to move selections via drag and drop. - Defaults to false. - -} + + -- | Controls if the editor should allow to move selections via drag and drop. + -- | Defaults to false. dragAndDrop :: Maybe Boolean, - {- - Enable the suggestion box to pop-up on trigger characters. - Defaults to true. - -} + + -- | Enable the suggestion box to pop-up on trigger characters. + -- | Defaults to true. suggestOnTriggerCharacters :: Maybe Boolean, - {- - Accept suggestions on ENTER. - Defaults to 'on'. - -} + + -- | Accept suggestions on ENTER. + -- | Defaults to 'on'. acceptSuggestionOnEnter :: Maybe AcceptSuggestion, - {- - Accept suggestions on provider defined characters. - Defaults to true. - -} + + -- | Accept suggestions on provider defined characters. + -- | Defaults to true. acceptSuggestionOnCommitCharacter :: Maybe Boolean, - {- - Enable snippet suggestions. Default to 'true'. - -} + + -- | Enable snippet suggestions. Default to 'true'. snippetSuggestions :: Maybe SnippetSuggestion, - {- - Copying without a selection copies the current line. - -} + + -- | Copying without a selection copies the current line. emptySelectionClipboard :: Maybe Boolean, - {- - Enable word based suggestions. Defaults to 'true' - -} + + -- | Enable word based suggestions. Defaults to 'true' wordBasedSuggestions :: Maybe Boolean, - {- - The font size for the suggest widget. - Defaults to the editor font size. - -} + + -- | The font size for the suggest widget. + -- | Defaults to the editor font size. suggestFontSize :: Maybe Number, - {- - The line height for the suggest widget. - Defaults to the editor line height. - -} + + -- | The line height for the suggest widget. + -- | Defaults to the editor line height. suggestLineHeight :: Maybe Number, - {- - Enable selection highlight. - Defaults to true. - -} + + -- | Enable selection highlight. + -- | Defaults to true. selectionHighlight :: Maybe Boolean, - {- - Enable semantic occurrences highlight. - Defaults to true. - -} + + -- | Enable semantic occurrences highlight. + -- | Defaults to true. occurrencesHighlight :: Maybe Boolean, - {- - Show code lens - Defaults to true. - -} + + -- | Show code lens + -- | Defaults to true. codeLens :: Maybe Boolean, - {- - Enable code folding - Defaults to true in vscode and to false in monaco-editor. - -} + + -- | Enable code folding + -- | Defaults to true in vscode and to false in monaco-editor. folding :: Maybe Boolean, - {- - Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. - Defaults to 'mouseover'. - -} + + -- | Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. + -- | Defaults to 'mouseover'. showFoldingControls :: Maybe ShowFoldingControls, - {- - Enable highlighting of matching brackets. - Defaults to true. - -} + + -- | Enable highlighting of matching brackets. + -- | Defaults to true. matchBrackets :: Maybe Boolean, - {- - Enable rendering of whitespace. - Defaults to none. - -} + + -- | Enable rendering of whitespace. + -- | Defaults to none. renderWhitespace :: Maybe RenderWhiteSpace, - {- - Enable rendering of control characters. - Defaults to false. - -} + + -- | Enable rendering of control characters. + -- | Defaults to false. renderControlCharacters :: Maybe Boolean, - {- - Enable rendering of indent guides. - Defaults to false. - -} + + -- | Enable rendering of indent guides. + -- | Defaults to false. renderIndentGuides :: Maybe Boolean, - {- - Enable rendering of current line highlight. - Defaults to all. - -} + + -- | Enable rendering of current line highlight. + -- | Defaults to all. renderLineHighlight :: Maybe RenderHighLight, - {- - Inserting and deleting whitespace follows tab stops. - -} + + -- | Inserting and deleting whitespace follows tab stops. useTabStops :: Maybe Boolean, - {- - The font family - -} + + -- | The font family fontFamily :: Maybe String, - {- - The font weight - -} + + -- | The font weight fontWeight :: Maybe FontWeight, - {- - The font size - -} + + -- | The font size fontSize :: Maybe Number, - {- - The line height - -} + + -- | The line height lineHeight :: Maybe Number, - {- - The letter spacing - -} + + -- | The letter spacing letterSpacing :: Maybe Number | a @@ -729,62 +653,50 @@ scrollbarVisibilityHidden :: ScrollbarVisibility scrollbarVisibilityHidden = ScrollbarVisibility "hidden" type EditorScrollbarOptions = { - {- - * The size of arrows (if displayed). - * Defaults to 11. - -} + -- | The size of arrows (if displayed). + -- | Defaults to 11. arrowSize :: Maybe Number, - {- - * Render vertical scrollbar. - * Accepted values: 'auto', 'visible', 'hidden'. - * Defaults to 'auto'. - -} + + -- | Render vertical scrollbar. + -- | Accepted values: 'auto', 'visible', 'hidden'. + -- | Defaults to 'auto'. vertical :: Maybe ScrollbarVisibility, - {- - * Render horizontal scrollbar. - * Accepted values: 'auto', 'visible', 'hidden'. - * Defaults to 'auto'. - -} + + -- | Render horizontal scrollbar. + -- | Accepted values: 'auto', 'visible', 'hidden'. + -- | Defaults to 'auto'. horizontal :: Maybe ScrollbarVisibility, - {- - * Cast horizontal and vertical shadows when the content is scrolled. - * Defaults to true. - -} + + -- | Cast horizontal and vertical shadows when the content is scrolled. + -- | Defaults to true. useShadows :: Maybe Boolean, - {- - * Render arrows at the top and bottom of the vertical scrollbar. - * Defaults to false. - -} + + -- | Render arrows at the top and bottom of the vertical scrollbar. + -- | Defaults to false. verticalHasArrows :: Maybe Boolean, - {- - * Render arrows at the left and right of the horizontal scrollbar. - * Defaults to false. - -} + + -- | Render arrows at the left and right of the horizontal scrollbar. + -- | Defaults to false. horizontalHasArrows :: Maybe Boolean, - {- - * Listen to mouse wheel events and react to them by scrolling. - * Defaults to true. - -} + + -- | Listen to mouse wheel events and react to them by scrolling. + -- | Defaults to true. handleMouseWheel :: Maybe Boolean, - {- - * Height in pixels for the horizontal scrollbar. - * Defaults to 10 (px). - -} + + -- | Height in pixels for the horizontal scrollbar. + -- | Defaults to 10 (px). horizontalScrollbarSize :: Maybe Number, - {- - * Width in pixels for the vertical scrollbar. - * Defaults to 10 (px). - -} + + -- | Width in pixels for the vertical scrollbar. + -- | Defaults to 10 (px). verticalScrollbarSize :: Maybe Number, - {- - * Width in pixels for the vertical slider. - * Defaults to `verticalScrollbarSize`. - -} + + -- | Width in pixels for the vertical slider. + -- | Defaults to `verticalScrollbarSize`. verticalSliderSize :: Maybe Number, - {- - * Height in pixels for the horizontal slider. - * Defaults to `horizontalScrollbarSize`. - -} + + -- | Height in pixels for the horizontal slider. + -- | Defaults to `horizontalScrollbarSize`. horizontalSliderSize :: Maybe Number } @@ -813,25 +725,20 @@ showSliderMouseOver :: ShowSlider showSliderMouseOver = ShowSlider "mouseover" type EditorMinimapOptions = { - {- - * Enable the rendering of the minimap. - * Defaults to false. - -} + -- | Enable the rendering of the minimap. + -- | Defaults to false. enabled :: Maybe Boolean, - {- - * Control the rendering of the minimap slider. - * Defaults to 'mouseover'. - -} + + -- | Control the rendering of the minimap slider. + -- | Defaults to 'mouseover'. showSlider :: Maybe ShowSlider, - {- - * Render the actual text on a line (as opposed to color blocks). - * Defaults to true. - -} + + -- | Render the actual text on a line (as opposed to color blocks). + -- | Defaults to true. renderCharacters :: Maybe Boolean, - {- - * Limit the width of the minimap to render at most a certain number of columns. - * Defaults to 120. - -} + + -- | Limit the width of the minimap to render at most a certain number of columns. + -- | Defaults to 120. maxColumn :: Maybe Int } @@ -844,13 +751,9 @@ defaultMinimapOptions = { } type EditorFindOptions = { - {- - * Controls if we seed search string in the Find Widget with editor selection. - -} + -- | Controls if we seed search string in the Find Widget with editor selection. seedSearchStringFromSelection :: Maybe Boolean, - {- - * Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor. - -} + + -- | Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor. autoFindInSelection :: Maybe Boolean } -