atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.85k stars 411 forks source link

built in text-editor #3162

Open lansingthomas opened 1 year ago

lansingthomas commented 1 year ago

Purpose of request: make some quick improvements to the built in text editor -- so that it is useful enough for new users to explore and edit their user files ^^

  1. improve discoverability of the basics (write)
  2. error prevention for lost work

Describe your proposed change: These are not original ideas... but here they are: [1] save button -- the command editor-write-file is great, seems to work. But is not discoverable.

[2] error prevention for closing an unsaved file

Describe alternatives you've considered the related path is helping people set up external text editors. I see this as a good thing, but not for today.

Additional context

lansingthomas commented 1 year ago

Ideas for extra-special features

  1. balance parentheses
  2. highlight comments and strings
  3. autoindent Lisp code
lansingthomas commented 1 year ago

This hypothetical UI would solve this issue.

jmercouris commented 10 months ago

Pull request #3296 will /partly/ close this issue. It will fix the problem and allow us to set this as the default editor for users. It will however not fix all the problems, it won't warn of closing unsaved files, etc. However, it will at least work out of the box!

aadcg commented 10 months ago

This issue was mistakenly closed via PR #3296.

aadcg commented 10 months ago

The following snippet should help you @jmercouris.

(define-configuration nyxt/mode/editor:editor-buffer
  ((default-modes (pushnew 'nyxt/mode/editor:plaintext-editor-mode %slot-value%))))