[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Developing a PHP package
From: |
Hugo Thunnissen |
Subject: |
Developing a PHP package |
Date: |
Sat, 04 Sep 2021 16:37:22 +0000 |
Hello emacs developers,
I am working on a package to work with PHP code. It currently consists
of a (very tolerant) recursive descent parser and company-mode + eldoc
backends. The parser is written from scratch in emacs lisp and has no
outside dependencies. The company-mode and eldoc backends (partially)
lex the syntax tree produced by the parser to provide intelligent
completion for and information about the code someone is working on. It
is still a work in progress but It's starting to come along quite nicely
and I've been considering what to do with the work. Contributing it to
the emacs core would have my preference. Is there interest in having
such a package in the emacs core?
If so, I have several questions:
- How does the process of contributing a package to emacs usually go?
- I have read that there is work being done on incorporating lib
tree-sitter in emacs, would tree-sitter make a package like mine
obsolete?
- The parser is currently only used for completion, but could
theoretically also be used (with some modifications) to do syntax
highlighting and indentation, making for somewhat of an alternative to
PHP-mode in the future. Would there be interest in something like
that?
- The package has a dependency on a bash script that uses some GNU
coreutils (find, grep) and diff from GNU diffutils. The script is used
to find files containing definitions of PHP classes and namespaces,
but not for any of code parsing. What is the policy for emacs packages
having dependencies on external programs like that?
- I am currently in the process of cleaning up the code and writing some
documentation/tests. When I have made some progress on that, would it
be OK for me to submit my code to this mailing list for
feedback/reviews? That would be very helpful.
For those interested, I also made a reddit post with a small demo video,
which sprouted some conversation in its comment section:
https://www.reddit.com/r/emacs/comments/peezh4/teaser_a_php_parser_and_company_backend_in_emacs/
Thank you for taking the time to read this mail, and for future
discourse: I am new to mailing list etiquette, feel free to point out
when I am doing it wrong :)
- Hugo Thunnissen
- Developing a PHP package,
Hugo Thunnissen <=