Comments (5)
that seems to work only for the current buffer, i.e.: if a reference is defined on another file and that file is not visited by Emacs then the implementation will move you to the first reference of that symbol in the same file.
Let me ask you something: do we really want such feature? (if we don't want it, you can always write a package and publish it) I see you are part of emacs-lsp, which makes me wonder what is wrong with lsp-mode that having such feature with help of emacs-tree-sitter seems so attractive?
from elisp-tree-sitter.
Let me ask you something: do we really want such feature? (if we don't want it, you can always write a package and publish it) I see you are part of emacs-lsp, which makes me wonder what is wrong with lsp-mode that having such feature with help of emacs-tree-sitter seems so attractive?
There are a couple of things I like about tree-sitter
here:
- I would expect
tree-sitter
-based symbol-at-point-highlighting to be faster than what we do inlsp-mode
, which is to make atextDocument/documentHighlight
request. - I would also expect a
tree-sitter
-based function that goes to the next occurrence in the buffer of the symbol at point to be faster thanlsp-ui-find-next-reference
, which makes a newtextDocument/references
request each time we call it.
that seems to work only for the current buffer, i.e.: if a reference is defined on another file and that file is not visited by Emacs then the implementation will move you to the first reference of that symbol in the same file.
xref
is expected to support falling back on different backends someday. So having tree-sitter
-based definition-jumping should be worth it if/when that day comes.
from elisp-tree-sitter.
Why should copying our implementation be a problem for GNU MELPA? Isn't the actual problem for you the implementation in Lua? Our implementation could be improved regarding speed (better caching and look-in by hash tables) for using it for semantic highlighting (not only highlighting of current symbol but resolving the definition for queries that ask for the definition of a symbol). It's nevertheless very fast. We also helped with the draft of sidekick https://github.com/ElPiloto/sidekick.nvim which might be worth to look at.
The feature is handy for smart rename for languages that don't have a language server.
from elisp-tree-sitter.
Why should copying our implementation be a problem for GNU MELPA?
I've asked the #emacs
and #fsf
IRC channels about whether code released under a GPL-compatible license such as nvim-tree-sitter
's Apache 2.0 license can be copied and included as part of Emacs without further steps (I think ELPA qualifies as "part of Emacs"). I did not receive an answer from anyone with any legal training, but some of the other people there who had contributed to Emacs speculated that for the code to be included, the people who originally wrote the copied code would need to sign papers -- presumably authorizing the FSF to redistribute the code under GPL 3+ or something.
Thanks for the implementation hints. If I ever get an affirmative answer on the whole copyrighting issue, I'll study your guys' code.
from elisp-tree-sitter.
@leungbk we know all the contributers and could ask them about dual licensing if this is an issue.
from elisp-tree-sitter.
Related Issues (20)
- tsc-lang-abi-too-new when installing new language HOT 11
- Crash when large file contains an ERROR node
- Invalid version syntax: ‘[email protected] HOT 2
- Colors look wrong in haskell mode. HOT 3
- `tree-sitter-debug-mode` is broken
- Crash when loading one particular Markdown file HOT 7
- Reporting Vulnerability
- (ts-fold-indicators-mode) not working when running emacs from terminal
- How do I add a new grammer to this mode? HOT 2
- why the submodule langs pointed to an old commit?
- tree-sitter-hl-mode doesn't honor the :extend font face in single line comments HOT 1
- request to rebuild tsc-dyn.so with older Linux OS
- Provide `aarch64` build of `tsc-dyn.so` for AArch64 Linux HOT 1
- Repetitions and Predicate Problems HOT 2
- Tree sitter not loading in Raspberry Pi 5 with Emacs GNU Emacs 28.2 HOT 2
- `tsc-current-field` doesn't work against starting node HOT 7
- Returned parent node doesn't contain given node as child HOT 1
- `tree-sitter-hl-mode` highlights only lvalue variables, not rvalue variables.
- Setting (global-tree-sitter-mode) in config.el causes warning on Emacs startup HOT 1
- Support for Linux aarch64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elisp-tree-sitter.