bjorn3 opened issue #5752:
Currently ISLE doesn't have any IDE functionality. It would be nice to get the following:
- [ ] Syntax highlighting
- [ ] Code formatting
- [ ] Inline error reporting
- [ ] Go to definition
- [ ] Go to references
- [ ] Show compiled rust source for rule
- [ ] Inlay hints
* [ ] Types
* [ ] Argument names
cfallin commented on issue #5752:
I would love for an LSP implementation to exist someday for ISLE -- if anyone is looking for a fairly substantial and impactful, but well-defined and orthogonal, project, then this would be a great one.
Regarding syntax highlighting and automatic code formatting: I've gotten decent results by treating ISLE like Lisp, FWIW:
lisp-mode
in Emacs auto-indents the s-expressions and lets me navigate the structure (paired parens, up a level, etc). Vim likely has equivalents too. A very janky first-draft implementation ofisle-fmt
might just be Emacs in batch mode runningindent-region
over the file! (Ideally we have something more self-contained and efficient than that eventually, of course.)
jameysharp commented on issue #5752:
Apparently somebody has already implemented the "run Emacs in batch mode" approach to formatting Lisp source: https://github.com/eschulte/lisp-format/blob/master/lisp-format
elliottt commented on issue #5752:
As a quick way to get go-to-definition working, it would be pretty easy to emit a tags file from islec.
vim
andemacs
both know how to navigate those, and that could make working with the codebase a little bit easier.
bjorn3 commented on issue #5752:
I don't think it would be much harder to implement a basic lsp server. Rust-analyzer has the lsp-server crate that does half the work.
bjorn3 edited issue #5752:
Currently ISLE doesn't have any IDE functionality. It would be nice to get the following:
- [ ] Syntax highlighting
- [ ] Code formatting
- [ ] Inline error reporting
- [ ] Documentation on hover
- [ ] Go to definition
- [ ] Go to references
- [ ] Show compiled rust source for rule
- [ ] Inlay hints
* [ ] Types
* [ ] Argument names
yuyang-ok commented on issue #5752:
https://github.com/yuyang-ok/isle-analyzer/blob/main/editors/code/README.md
I have been developing IDE support for ISLE language right now I think it is ready to lauch.
yuyang-ok edited a comment on issue #5752:
https://github.com/yuyang-ok/isle-analyzer/blob/main/editors/code/README.md
I have been developing IDE support for ISLE language for a while.
right now I think it is ready to lauch.
yuyang-ok edited a comment on issue #5752:
https://github.com/yuyang-ok/isle-analyzer/blob/main/editors/code/README.md
I have been developing IDE support for ISLE language for a while.
right now I think it is ready to launch.
yuyang-ok edited a comment on issue #5752:
https://github.com/yuyang-ok/isle-analyzer/blob/main/editors/code/README.md
I have been developing IDE support for ISLE language a while.
right now I think it is ready to launch.
bjorn3 commented on issue #5752:
Cool! What license does it have?
yuyang-ok commented on issue #5752:
@bjorn3 Apache License 2.0 :-)
jwnrt commented on issue #5752:
I made a tree sitter grammar which is working pretty well for syntax highlighting and navigation in Helix, but I haven't tested it very thoroughly yet.
https://github.com/jwnrt/tree-sitter-isle
FYI, I think the grammar in the language reference has fallen out of sync with the parser. It's missing some additions like
if-let
,if
,partial
,pure
, andinfallible
.
cfallin commented on issue #5752:
@jwnrt this is pretty cool! If you'd like to link to it from the ISLE docs, please feel free to submit a PR for that (maybe
cranelift/isle/docs/language-reference.md
-- we'd be happy to take updates to the grammar there too if you have them top-of-mind, as it seems likely we've missed updates there as you note).
Last updated: Nov 22 2024 at 16:03 UTC