5.0 KiB
5.0 KiB
Wishlist of features
([X] = complete, [ ] = planned)
My current goal is to work on completions a little bit more.
- create a release
refactor brainstorm:
-
get rid of
bytesstuff and use "stack" everywhere -
search caching
-
search depth limit / stop recursion
-
search into calls
-
entry point measurement for reference search
-
arg return count
- i guess searching into calls could do this?
-
diagnostic code actions
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) - People have tried fennel-ls in:
- 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
- [1/2] 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 special do/valueswith only one inner form- redundant
doas the last/only item in a form that accepts a "body" values/unpackin a non tail position- numbers and strings in a non tail position
- deprecated specials/macros
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) - unused values in
λ(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
- function names work properly and are counted once
- 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?
fn-arg-nil: Function arguments are assumed to be nil in a function body, until there's a type system to give more information.
hashfn: Hash functions currently don't work well.
refs-dedup: