summaryrefslogtreecommitdiffstats
path: root/2020/info/23.md
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2020-12-01 00:34:46 -0500
committerSacha Chua <sacha@sachachua.com>2020-12-01 00:34:46 -0500
commitb49d5383ffb9ad3ae75c0963d16a29587a5c2a98 (patch)
tree28a7b3af4a99b1d7d004cab84c998ea598af7b42 /2020/info/23.md
parenta5359499330bab9a3b4dc3c98b8e52e65ece8c49 (diff)
downloademacsconf-wiki-b49d5383ffb9ad3ae75c0963d16a29587a5c2a98.tar.xz
emacsconf-wiki-b49d5383ffb9ad3ae75c0963d16a29587a5c2a98.zip
Tweak pad formatting
Diffstat (limited to '2020/info/23.md')
-rw-r--r--2020/info/23.md100
1 files changed, 34 insertions, 66 deletions
diff --git a/2020/info/23.md b/2020/info/23.md
index 25811ea5..dec66d6d 100644
--- a/2020/info/23.md
+++ b/2020/info/23.md
@@ -27,110 +27,88 @@ improvements and contribution from the community.
## Q19: The python mode example was pretty good. Is that something that one can use already?
-
-### Yes, already using it at work right now
+Yes, already using it at work right now
## Q18: Regarding Emacs integration, will it always need to be a foreign library or can it be included / linked directly in compilation?
+Building a parser from source needs Node.js <https://tree-sitter.github.io/tree-sitter/creating-parsers#dependencies> so I don't know if it'll be in-tree and included at compile time
-### Building a parser from source needs Node.js <https://tree-sitter.github.io/tree-sitter/creating-parsers#dependencies> so I don't know if it'll be in-tree and included at compile time
-
-
-### Core library dynamic module, would be better to be included in core Emacs eventually. Language definitions might be better distributed separately.
+Core library dynamic module, would be better to be included in core Emacs eventually. Language definitions might be better distributed separately.
## Q17: Is there a link to the slides?
+Yes, will post in IRC later. (FIXME: add link here).
-### Yes, will post in IRC later. (FIXME: add link here).
-
-
-### Slides: <https://ubolonton.org/slides/emacs-tree-sitter-emacsconf2020.pdf>
+Slides: <https://ubolonton.org/slides/emacs-tree-sitter-emacsconf2020.pdf>
## Q16: Are there any language major modes that have integrated already?
+Not yet (answered during talk)
-### Not yet (answered during talk)
-
-
-### Typescript : discussing integration, not integrated yet
+Typescript : discussing integration, not integrated yet
## Q15: Is it possible to use tree-sitter for structural editing?
-
-### Covered by Q4 / Q8 / Q11.
+Covered by Q4 / Q8 / Q11.
## Q14: Is there a folding mode for tree-sitter?
+Not yet. There are multiple code folding frameworks inside Emacs, and it's better to integrate with these modes rather than writing something new entirely.
-### Not yet. There are multiple code folding frameworks inside Emacs, and it's better to integrate with these modes rather than writing something new entirely.
-
-
-### +1 Would be nice if it worked with outshine mode or similar
++1 Would be nice if it worked with outshine mode or similar
## Q13: MaxCity on IRC asks: "That pop up M-x window. How do you get that?"
+ivy-posframe most likely <https://github.com/tumashu/ivy-posframe/>. Or not. Cool!
-### ivy-posframe most likely <https://github.com/tumashu/ivy-posframe/>. Or not. Cool!
-
-
-### Custom helm code
+Custom helm code
## Q12: I'm new to the tree-sitter world. Is it easy to install/use it also on windows ? (I have to use winbloat at work)
-
-### The usual approach is hoping someone else made a precompiled version for you and download it. Otherwise you'll have to set up a development environment with mingw-msys or whatever.
+The usual approach is hoping someone else made a precompiled version for you and download it. Otherwise you'll have to set up a development environment with mingw-msys or whatever.
## Q11: Is it possible to use this for refactoring too?
-
-### For the kind of refactoring inside a buffer, it's very doable right now with some glue code. For more extensive refactoring where you want to touch all files in a project, there needs to be some kind of understanding of the language model system, how they are laid out in the filesystem&#x2026; even files that are not yet loaded into Emacs. That sounds like something a lot more extensive. Sounds like an IDE in Emacs.
+For the kind of refactoring inside a buffer, it's very doable right now with some glue code. For more extensive refactoring where you want to touch all files in a project, there needs to be some kind of understanding of the language model system, how they are laid out in the filesystem&#x2026; even files that are not yet loaded into Emacs. That sounds like something a lot more extensive. Sounds like an IDE in Emacs.
## Q10: Can language major-mode authors start taking advantage of this now? Or is it intended to be used as a minor-mode? +1
-
-### Minor mode depended on by the major modes
+Minor mode depended on by the major modes
## Q9: I'm completely new to tree-sitter, how do I use it as an end user? Is there an easy example config out there by the organizer or otherwise that shows standard usage with whatever programming language? Or are we not there yet?
+Answering own question: Sounds like major mode maintainers need to integrate.
-### Answering own question: Sounds like major mode maintainers need to integrate.
-
+Syntax highlighting is pretty easy to activate <https://ubolonton.github.io/emacs-tree-sitter/getting-started/> - nice, tree-sitter-hl-mode looks easy
-### Syntax highlighting is pretty easy to activate <https://ubolonton.github.io/emacs-tree-sitter/getting-started/> - nice, tree-sitter-hl-mode looks easy
-
-
-### Need to add more examples to the documentation
+Need to add more examples to the documentation
## Q8: (Following on from Q4) Could there be a standardised approach to coding automatic refactorings in the future? e.g. so that whichever language mode you are using, you could see a menu of available refactoring operations?
+Not sure about this. Most refactoring operations are highly specific to a class of languages. Not one single approach for all the languages, but maybe one for object-oriented languages, one for Lisp-type languages, one for Javascript and Typescript&#x2026;
-### Not sure about this. Most refactoring operations are highly specific to a class of languages. Not one single approach for all the languages, but maybe one for object-oriented languages, one for Lisp-type languages, one for Javascript and Typescript&#x2026;
-
-
-### I meant the lisp and user interfaces being unified, not the implementations of the refactorings. But maybe it belongs in a separate mode on top. So you could have a defrefactor macro or similar.
+I meant the lisp and user interfaces being unified, not the implementations of the refactorings. But maybe it belongs in a separate mode on top. So you could have a defrefactor macro or similar.
## Q7: How extensive will the compatibility be between highlighting grammars for Emacs and those for Vim/Neovim with Tree-sitter?
-
-### For the time being it looks like nvim-treesitter also uses the S-exp syntax for queries so it shouldn't be too hard. See <https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/rust/highlights.scm>
+For the time being it looks like nvim-treesitter also uses the S-exp syntax for queries so it shouldn't be too hard. See <https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/rust/highlights.scm>
## Q6: Will it ever be possible to write tree-sitter grammars in a Lisp, or will JS be required?
-
-### The grammar part is written in JSON, you don't need to actually understand JS to write it. Using Lisp would merely give you a s-expression version, that wouldn't buy you much.
+The grammar part is written in JSON, you don't need to actually understand JS to write it. Using Lisp would merely give you a s-expression version, that wouldn't buy you much.
- Ah, so all that is needed is (json-encode '(grammar &#x2026;))? Great!
@@ -140,14 +118,12 @@ improvements and contribution from the community.
## Q4: Could this be used with packages like \`smartparens\` that aim to bring structrual editing to non-s-expression based languages? AST-based refactoring?
-
-### It is one of the goals, but not yet achieved.
+It is one of the goals, but not yet achieved.
## Q3: Do you think tree-sitter would be useful for Org buffers? I can imagine it being used to keep a parsed AST of an Org buffer (e.g. like org-element's output) updated in real time.+1+1
-
-### An obstacle here is Org not having anything anywhere close to a formal grammar, so that would need to be corrected first.
+An obstacle here is Org not having anything anywhere close to a formal grammar, so that would need to be corrected first.
- <https://orgmode.org/worg/dev/org-element-api.html>
@@ -159,44 +135,36 @@ improvements and contribution from the community.
- Note: relevant mailing list discussion <https://orgmode.org/list/68dc1ea1-52e8-7d9e-fb2d-bcf08c111eca@intrepidus.pl/>
-
-### FIXME: Add link to a emacs-tree-sitter project/snippet for org-mode.
+FIXME: Add link to a emacs-tree-sitter project/snippet for org-mode.
- Not sure if it is what you have in mind, but there is <https://github.com/gagbo/tree-sitter-org>
## Q2: Will elisp performance be more competitive with gccemacs enough to make tree-sitter in elisp more attractive? (+1)+1
+The point of this project is to reuse other people's efforts, not rewriting them.
-### The point of this project is to reuse other people's efforts, not rewriting them.
-
-
-### The garbage collection may still pose some problems and introduce GC latency.
+The garbage collection may still pose some problems and introduce GC latency.
## Q1: Do you think that his package can be included into emacs/GNU ELPA?
-
-### Yes, it is just matter of paperwork.
+Yes, it is just matter of paperwork.
# Notes
-## Project description: emacs-tree-sitter is an Emacs Lisp binding for tree-sitter, an incremental parsing library.
-
-
-### <https://github.com/ubolonton/emacs-tree-sitter> (<- bindings)
-
-
-### <https://tree-sitter.github.io/tree-sitter/> (<- parser)
+- Project description: emacs-tree-sitter is an Emacs Lisp binding for tree-sitter, an incremental parsing library.
+ - <https://github.com/ubolonton/emacs-tree-sitter> (<- bindings)
+ - <https://tree-sitter.github.io/tree-sitter/> (<- parser)
-## Regular expressions are not powerful enough.
+- Regular expressions are not powerful enough.
-## LSP has high latency and is resource intensive, oft.
+- LSP has high latency and is resource intensive, oft.
-## Extended video version will get uploaded eventually after the event. (FIXME: add link)
+- Extended video version will get uploaded eventually after the event. (FIXME: add link)