More README changes
This commit is contained in:
parent
224684d688
commit
33e938b8db
68
README.md
68
README.md
@ -4,31 +4,68 @@ Uses static analysis, and doesn't actually run your code, which makes it perfect
|
||||
If you want live analysis of your code as it runs, consider using a REPL.
|
||||
|
||||
Features / To Do List / Things I would enjoy patches for:
|
||||
([X] = complete, [ ] = incomplete)
|
||||
|
||||
- [X] Able to connect to a client
|
||||
- [ ] Support for UTF-8 characters that aren't just plain ASCII. (especially `λ`)
|
||||
- [ ] Settings to configure lua / fennel path, allowed globals, etc
|
||||
- [ ] Builds for anything other than arch linux
|
||||
- [ ] 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)
|
||||
- [X] 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
|
||||
- [ ] vscode
|
||||
- [ ] vim+coc
|
||||
- [ ] Go-to-definition understands:
|
||||
- [X] literal table constructor
|
||||
- [X] table destructuring
|
||||
- [X] require
|
||||
- [X] multisyms
|
||||
- [X] . builtin (when called with constants)
|
||||
- [X] macros (a little bit)
|
||||
- [ ] lua files
|
||||
- [X] `.` special form (when called with constants)
|
||||
- [ ] `do` special form
|
||||
- [X] `require` and cross-module definition lookups
|
||||
- [X] macro bodies (a little bit)
|
||||
- [ ] mutation via set/tset
|
||||
- [ ] mutation from `fn`: `(fn obj.new-field [])`
|
||||
- [ ] actual macro calls
|
||||
- [ ] .lua files
|
||||
- [ ] setmetatable
|
||||
- [ ] function arguments / function calls
|
||||
- [ ] mutation on aliased tables (difficult)
|
||||
- [X] Reports compiler errors
|
||||
- [ ] including in macro files
|
||||
- [ ] Reports linting issues
|
||||
- [ ] Think of more linting patterns (I spent a couple minutes brainstorming these ideas, other ideas are welcome of course)
|
||||
- [ ] Dead code. I'm not sure what sort of things would cause dead code in fennel
|
||||
- [ ] Unused variables / fields (maybe difficult)
|
||||
- [ ] Discarded results for some calls
|
||||
- [ ] `do`/`values` with only one inner form
|
||||
- [ ] Warning when unification is happening on a `match` pattern (may be difficult)
|
||||
|
||||
- [ ] Completion Suggestions
|
||||
- [ ] from standard library
|
||||
- [ ] "dot completion" for multisyms
|
||||
- [ ] from current scope
|
||||
- [ ] `(: "foo" :` complete the string
|
||||
- [ ] snippets? I guess?
|
||||
- [X] Hover over a symbol for documentation
|
||||
- [ ] Signature help
|
||||
- [ ] Regular help
|
||||
- [ ] hide or grey out the `self` in a `a:b` multisym call
|
||||
- [ ] Go-to-references
|
||||
- [ ] rename
|
||||
- [ ] lexical scope in the same file
|
||||
- [ ] fields, including when tables are aliased
|
||||
- [ ] global search across other files
|
||||
- [ ] Options
|
||||
- [ ] 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
|
||||
- [ ] rename module fields (may affect code behavior, may modify other files)
|
||||
- [ ] rename arbitrary things (may affect code behavior, may modify other files)
|
||||
- [ ] formatting with fnlfmt
|
||||
- [ ] Maybe some sort of type checking???
|
||||
- [ ] Type annotations? Global type inference?
|
||||
|
||||
{field: {}}
|
||||
|
||||
@ -48,8 +85,9 @@ make
|
||||
```
|
||||
|
||||
3. Configure your editor to use this language server
|
||||
LSP is 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.
|
||||
|
||||
So far, I've only ever tested it with Neovim using the native language client and lspconfig.
|
||||
So far, I've only ever tested it with Neovim using the native language client and `lspconfig`.
|
||||
If you know what that means, here's the relevant code to help you set up Neovim in the same way:
|
||||
```lua
|
||||
local lspconfig = require('lspconfig')
|
||||
@ -69,9 +107,9 @@ lspconfig["fennel-ls"].setup(
|
||||
)
|
||||
```
|
||||
|
||||
## Caveats
|
||||
Until I change this readme, you can assume that this project is incomplete and not meant to be used.
|
||||
It should be possible to set up for other clients, but I haven't looked into these steps. If you get it working in any other environments, I'd love to know! It would be great to have instructions on how to set up other editors!
|
||||
|
||||
## Caveats
|
||||
So far, I am only testing this project with Neovim. Since Neovim also uses Lua, there may be instances where fennel-ls encodes JSON incorrectly which may be compatible with Neovim, but not other editors. (ie, a json field that is supposed to be null may be missing, or [] and {} may be conflated). User beware!
|
||||
|
||||
If you want to help fix this, `./src/fennel-ls/message.fnl` is where messages are being constructed,
|
||||
@ -80,8 +118,8 @@ and `./src/fennel-ls/json-rpc.fnl` is where messages are being converted to json
|
||||
## License
|
||||
fennel-ls is licensed under the MIT license. See LICENSE for more info.
|
||||
However, this project contains files from other projects:
|
||||
* test/pl comes from [Penlight](https://github.com/lunarmodules/Penlight)
|
||||
* src/json comes from [json.lua](https://github.com/rxi/json.lua)
|
||||
* fennel and src/fennel.lua are built from [fennel](https://git.sr.ht/~technomancy/fennel)
|
||||
* test/pl comes from [Penlight](https://github.com/lunarmodules/Penlight) [MIT license]
|
||||
* src/json comes from [json.lua](https://github.com/rxi/json.lua) [MIT license]
|
||||
* fennel and src/fennel.lua are compiled from [fennel](https://git.sr.ht/~technomancy/fennel) [MIT license]
|
||||
|
||||
fennel-ls's license does not apply to these files; check those projects for their respective code licenses.
|
||||
fennel-ls's license may not apply to these files; check those projects for more details.
|
||||
|
||||
@ -65,19 +65,17 @@
|
||||
(it "can go up and down field accesses"
|
||||
(check :goto-definition.fnl 45 15 :goto-definition.fnl 40 7 40 13))
|
||||
|
||||
|
||||
(it "works directly on a require/include (require XXX))"
|
||||
(check :goto-definition.fnl 1 5 :bar.fnl 0 0 0 2)))
|
||||
|
||||
;; (it "can go to a reference that occurs in a macro")
|
||||
;; (it "doesn't have ghost definitions from the same byte ranges as the macro files it's using")
|
||||
;; (it "can go to a function in another file imported via destructuring assignment")
|
||||
;; (it "can work with a custom fennelpath")
|
||||
;; TODO
|
||||
;; (it "can go to a function in another file imported via destructuring assignment") ;; WORKS, just needs a test case
|
||||
;; (it "doesn't have ghost definitions from the same byte ranges as the macro files it's using") ;; Unconfirmed, I saw some weird behavior a while ago
|
||||
;; (it "can go through more than one extra file")
|
||||
;; (it "will give up instead of freezing on recursive requires")
|
||||
;; (it "does slightly better in the presense of macros")
|
||||
;; (it "finds the definition of macros")
|
||||
;; (it "can follow import-macros")
|
||||
;; (it "finds the definition of in-file macros")
|
||||
;; (it "can follow import-macros (destructuring)")
|
||||
;; (it "can follow import-macros (namespaced)")
|
||||
;; (it "can go to the definition even in a lua file")
|
||||
;; (it "can go to a function's arguments when they're available")
|
||||
|
||||
;; (it "can work with a custom fennelpath") ;; Wait until an options system is done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user