zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.47k stars 1.16k forks source link

infocomplete: Complete filetypes #3090

Closed JoeKar closed 6 months ago

JoeKar commented 7 months ago

This will add the capability to auto complete the filetype option.

Attention: The duplicated entries will be solved with #3066.

Closes #3089

JoeKar commented 7 months ago

@dustdfg It doesn't took that long. Maybe you can have a look next time, if you can provide the solution directly as PR without creating a new issue. :smile:

dustdfg commented 7 months ago

@dustdfg It doesn't took that long. Maybe you can have a look next time, if you can provide the solution directly as PR without creating a new issue. 😄

You are absolutely right... But I:

  1. Usually write spaghetti
  2. Didn't look at auto-completion before at all
  3. Didn't need it so bad
  4. Knew about PR (https://github.com/zyedidia/micro/pull/3021)

I knew that the PR will likely invalidate my PR (if I decide to write it) if it will be merged so I decided just to create issue without attempts to create PR and even looking on that part of code...

One note: I even didn't look at code of that PR but the name sounds like it can conflict

JoeKar commented 7 months ago

One note: I even didn't look at code of that PR but the name sounds like it can conflict

Most probably OptionValueComplete() will need a small resolve, bu in general they don't really conflict each other, since #3021 tracks a specific kind of option predefined as list/choices. The filetype on the other hand is similar to the colorscheme, which uses stored filenames.