* Add completion for struct keys
Largely ported from `IEx.Autocomplete`.
* Add test for __exception__ field in struct
* Fix exception test
* Fix exceptions assetion
* Create `:in_struct_field` identifier
Along with a refactor
* Fix typespecs for `:map_field`
* Address feedback
* Update lib/livebook/intellisense/identifier_matcher.ex
Co-authored-by: José Valim <jose.valim@gmail.com>
* Use markdown snippet for both docs
* Fix tests
Co-authored-by: José Valim <jose.valim@gmail.com>
The currently suggested vim modeline formatting string to allow .livemd
files to render as markdown on GitHub works, but confuses vim itself.
```
<!-- vim: syntax=markdown -->
```
When opening a .livemd file with the suggested modeline in vim it errors
when it tries to parse `-->` as a modeline option.
e.g.
```
"2021/day2.livemd" 81L, 1616B
Error detected while processing modelines:
line 1:
E518: Unknown option: -->
```
The fix is to replace the suggested vim modeline
```
<!-- vim: syntax=markdown -->
```
With a modeline declaration format that indicates when the modeline
options are complete, allowing vim to ignore the rest of the line.
```
<!-- vim: set syntax=markdown: -->
```
Reference
- vim issue: https://github.com/vim/vim/issues/1648
- especially this comment: https://github.com/vim/vim/issues/1648#issuecomment-296386153Fixes#773
* Make cell status italic when content changed
* Add Ctrl+Shift+Enter for evaluating all cells
* Improve the behaviour of evaluating all cells
* Fix typo
* Add keywords to completion
* Fix signature request caching for call without parentheses
* Don't insert parentheses for def* macros
* Don't trigger missing runtime message when auto completion is enabled
* Don't insert parentheses for keyword macros
* Improve completion of env macros
* Apply review comments
* Update locals without parentheses
* Apply suggestions from code review
Co-authored-by: José Valim <jose.valim@dashbit.co>
* Format
Co-authored-by: José Valim <jose.valim@dashbit.co>
* Remove Code.Fragment backport
* Fix tests compatibility with Elixir 1.13
* Implement signature intellisense
* Don't show signatures on module attributes
* Add tests for calls with do-end block
* Unify spec formatting
* Insert parentheses when completing a function call
* Send all text until cursor in signature request
* Add configuration for completion/signature popups (#693)
* Add editor settings form
* Add configuration for intellisense defaults
* Read fresh settings when editor mounts
* Scope attribute names
* Fix disabled button styling
* Simplify signature box and enable by default
* Split settings into system and user sections
* Update lib/livebook_web/live/settings_live.ex
Co-authored-by: José Valim <jose.valim@dashbit.co>
* Update lib/livebook_web/live/settings_live.ex
Co-authored-by: José Valim <jose.valim@dashbit.co>
Co-authored-by: José Valim <jose.valim@dashbit.co>
* Fix spacing in documentation tests
Co-authored-by: José Valim <jose.valim@dashbit.co>
* Add support for controls output type
* Split controls into individual widgets
* Adjust ids
* Improve widget and controls garbage collection
* Allow arbitrary functions as object release hook
* Add type to button and input events
* Add keyboard status event
* Change release hooks into monitor messages
* Rename pointer to reference and return an error on bad monitor
* Improve notebook file locking to work across nodes
* Add node check for local file system opreations
* Replace node with host id
* Refactor process down cleanup
* Scope local file system with node
* local? -> type
* save static vegalite plot to livemd
* cleanup debug code
* using `vega-lite` as the type in the fenced code block
* wrap the text output in `{:text, output}` in take_outputs/2
* ignore :vega_lite_static when it is empty
* add import and export tests
* using `spec`
* format code
* keep the test focused
* improve tests for not including outputs
* always dump vage_lite spec
* Apply suggestions from code review
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Move notebook export menu item
* Add action for clearing evaluation and outputs
* Test data operation
* Update wording
* Update wording
* Reorder menu items
* Show reconnect for all runtime types when applicable
* Make it clear which runtime is the default
* Show Mix.install restart suggestion only for standalone runtimes
* Fix tests not to rely on the default runtime tab
* Added automatic evaluation
* apply review changes
* persist reevaluate_automatically and update test
* test for automatic reevaluation
* formatting
* Add import test
* Always show if a cell automatically reevaluates and link to settings
* Evaluate automatically reevaluating cells after queuing
* Always show evaluate button when cell is fresh
* Update icon
* Add test ensuring that fresh cells don't evaluate automatically
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* adding a new info flash on imported notebooks
* changing the imported notebook error flashes to warning level
* Update lib/livebook_web/live/session_helpers.ex
Co-authored-by: José Valim <jose.valim@gmail.com>
* adding unit tests for the flash messages and fixing put_import_flash/1 call location
* changing name of put_import_flash_messages/2 to put_import_warnings
* Update lib/livebook_web/live/home_live.ex
* formating code
Co-authored-by: José Valim <jose.valim@gmail.com>
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* add created_at to Session struct
* test + doc enhcncement
* change format creation date function name
* use helper function to format created_at
* use mix format
* apply review suggested changes and 2 more tests
* Store creation time in session state and sort by date by default
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Use Phoenix.Tracker to keep track of sessions within the cluster
* Apply review comments
* Cleanup topics and updates
* Update lib/livebook_web/live/session_live.ex
* Migrate the Evaluator process from GenServer to a regular process
* Update CHANGELOG
* Attach reference to every evaluator and pass in internal messages
* Use start_supervised/2 in tests
* Apply review comments