4.9 KiB
4.9 KiB
Wishlist of features
([X] = complete, [ ] = planned)
code unit count (not to be confused with code points)
code point # |utf8 |utf16| offset 000000 - 00007F | 1 | 1 | 0 000080 - 0007FF | 2 | 1 | -1 000800 - 00FFFF | 3 | 1 | -2 010000 - 10FFFF | 4 | 2 | -2
utf8 chart 000000 - 00007F 0xxxxxxx 000080 - 0007FF 110xxxxx 10xxxxxx 000800 - 00FFFF 1110xxxx 10xxxxxx 10xxxxxx 010000 - 10FFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx My current goal is to work on completions a little bit more.
- Fix crash-files.test2
Here is my feature wishlist. I don't expect to ever get all of this done, but these are the sort of enhancements I am thinking about.
- Able to connect to a client
- Support for UTF-8 characters that aren't just plain ASCII. (especially
λ) (perhaps just tell the IDE that I want to communicate with utf-8 offsets) - Settings to configure lua / fennel path, allowed globals, etc
- Supporting builds for anything other than arch linux
- Testing/support/instructions for any clients: (LSP is supposed to be editor-agnostic, but that's only if you're able to actually follow the spec, and I'm not sure that fennel-ls is compliant)
- Neovim (This project isn't a neovim plugin, but there are instructions on how to inform neovim of the fennel-ls binary once you build it.)
- emacs
- helix
- vscode (publish an extension)
- vim+coc (publish a node thingy)
- Go-to-definition:
- literal table constructor
- table destructuring
- multisyms
.special form (when called with constants)doandletspecial formrequireand cross-module definition lookups- goes to a.method on
(: a :method)when triggered at:method - expanded macros (a little bit)
- table mutation via
fnspecial:(fn obj.new-field []) - macro calls / which macros are in scope
- setmetatable
- can search through function arguments / function calls / method calls
- local/table mutation via set/tset
- .lua files (antifennel decompiler)
- mutation on aliased tables (difficult)
- Completion Suggestions
- from globals
- from current scope
- from macros (only on first form in a list)
- from specials (only on first form in a list)
- "dot completion" for table fields
- dot completion is aware of a stdlib
- actually compliant rules about lexical scope (only see things declared before, not after)
- show docs/icons on each suggestion
- "dot completion" for metatable
__indexfields (. obj :string completions(: "foo" :string completions(require :module completions- from anywhere else that I'm forgetting right now
- snippets? maybe more?
- Reports compiler errors
- Report more than one error per top-level form
- Reports linting issues
- Unused locals
- Unknown fields of modules
- Discarding results from pcall/xpcall/other functions
unpackorvaluesinto a specialdo/valueswith only one inner form- redundant
doas the last/only item in a form that accepts a "body" varforms that could belocal- Arity checking
- Too many args (assuming there is no ... argument)
- Too few args (assuming the last argument is statically countable, and also account for ?optional arguments)
- I need to also make it work for built-in functions
- warn if an optional arg is present, but no call ever passes the arg
- Code that matches the shape of
accumulateoricollectorcollect?? or other macros?? - Dead code (I'm not sure what sort of things cause dead code)
- Unused fields (difficult)
- unification in a
matchpattern (difficult) - Brainstorm more linting patterns (I spent a couple minutes brainstorming these ideas, other ideas are welcome of course)
- Type Checking
- Hover over a symbol for documentation
- Signature help
- respond to signature help queries
- hide or grey out the
selfin ana:bmultisym call
- Go-to-references
- lexical scope in the same file
- fields
- go to references of fields when tables are aliased
- global search across other files
- Options / Configuration
- Configure over LSP
- Configure with some sort of per-project config file
- Configure with environment variables I guess??
- fennel/lua path
- lua version
- allowed global list
- enable/disable various linters
- rename
- local symbols
- module fields (may affect code behavior, may modify other files)
- arbitrary fields (may affect code behavior, may modify other files)
- formatting with fnlfmt
- Type annotations? Global type inference?