* Disable Choose button if draft file is a directory
* Fix warnings
* Decide if choose is disabled on handle info
* Revert "Decide if choose is disabled on handle info"
This reverts commit 43a2cbc5ea.
* Use the disabled attribute
This reduces memory consumption by the runtime,
especially when using intellisense features which
may generate a lot of garbage.
There is an odd chance this can generate slow downs
in certain cases but, for that to happen, I would
expect the notebook to either have a lot of data
allocated or many users interacting with it and
triggering completion and other features at the same
time.
We don't worry about the second case because the
goal is to move completion to an ephemeral separate
process anyway, which would remove the need for GC
during completion altogether (and allow several
completions to run concurrently). If this happens,
we can consider moving GC out of the evaluator and
have the session explicitly trigger it once it
terminates a chain of evaluation.
It is also worth triggering the GC whenever
we forget an evaluation context.
* 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
* Fix error on back after closing session
Clicking the browsers back button after closing a session
resulted in an error since it was trying to close an already closed notebook
* Overwrite back history on section delete
* Make cell status italic when content changed
* Add Ctrl+Shift+Enter for evaluating all cells
* Improve the behaviour of evaluating all cells
* Fix typo