Tuấn-Anh Nguyễn

Results 21 issues of Tuấn-Anh Nguyễn

By "high level", I mean: - Fewer places in user code where `unsafe` is necessary. - Improved ergonomics, e.g. seamless conversion between basic types, block closure, exception `Result`. Do you...

This will fix https://github.com/emacs-tree-sitter/elisp-tree-sitter/issues/78. The design is described in https://github.com/emacs-tree-sitter/elisp-tree-sitter/pull/202. For Python, it can be enabled by evaluating `(tree-sitter-enable 'python)` in the REPL buffer. It should also work for other...

- Module code can store values for later use, e.g. in background threads. - Frequently-used symbols won't require repeated `intern` calls into the Lisp runtime. We can have `emacs::sym::nil`, `emacs::sym::t`....

enhancement

It's mostly about generating a useful type name, for error reporting. Using [typename](https://docs.rs/typename/0.1.1/typename/) crate is one option.

- [x] Signature should use argument names defined in Rust, instead of `ARG1`, `ARG2`, like currently. This can be done by either: + Using `advertised-signature-table`. + Adding `usage:` to the...

enhancement

Often time, there's no initialization logic needed. Modules should be able to put `#![emacs::module]` at the root of the crate, instead of this: ```rust // So much boilerplate! #[emacs::module] fn...

waiting for external changes

Writing a module still involves many ad-hoc scripts (`test.sh`, `load.sh`) and manual steps (e.g. renaming files). There should be a cargo's subcommand that supports at least the following: - `new`:...

`static mut` is extremely hard to use correctly: https://github.com/rust-lang/rust/issues/53639. We should use [once_cell](https://github.com/matklad/once_cell) instead. (It can also replace our uses of `lazy_static!`.)

enhancement

A simplistic `imenu-create-index-function` can look like this: ```emacs-lisp (defun tree-sitter-rust-imenu-index-function () (thread-last (tree-sitter-query [(function_item (identifier) @function)]) (seq-map (lambda (capture) (pcase-let ((`(_ . ,node) capture)) (cons (ts-node-text node) (ts-node-start-position node))))))) ```...

help wanted

This will allow `jupyter-repl` to integrate with `tree-sitter` and `tree-sitter-hl`. See #78 for more context. I initially tried to make `tree-sitter` parse only the narrowed region. However, since tree-sitter's incremental...