Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Implements basic autocompletion. Current completion candidates supported - Global modules - Global Structs - Struct fields - Remote functions (w/ documentation) - Special Forms - Bitstring modifiers - filesystem paths in strings More features, particularly features that rely on contextual information about the code itself (meaning, which identifiers, aliases, imports are available) will come in subsequent patches. Partially addresses #45 ## Experimental This patch also introduces a new initialization option, `experimental`. This feature will be gated as an experimental feature as it's built out. The purpose of this is so that early-early adopters can try it out and report bugs, but folks who would rather wait for something more stable won't have it affect their workflows. To enable this feature, toggle the completions experiment in your editor. ### Nvim (elixir-tools.nvim) ```lua require("elixir").setup({ nextls = { enable = true, init_options = { experimental = { completions = { enable = true } } } }, elixirls = {enable = false} }) ``` ### Visual Studio Code (elixir-tools.vscode) ```json { "elixir-tools.nextLS.experimental.completions.enable": true } ``` ### Other editors Not sure 😅 ## Demos TODO: record them my guy ## TODO - [x] integration tests - [ ] update elixir-tools.dev with instructions - [x] update README with instructions ## Acknowedgements This feature is initially based on `IEx.Autocomplete`. Huge thanks to the Elixir core team's efforts to help kickstart this feature. More deviations will likely occur as we gain more contextual parsing for things like imports, aliases and variables.
- Loading branch information