HaraldKi, German
@HaraldKi@nrw.social avatar

I am having the same question: How and work together in an editor?

The answers given are so la la.

Can anyone add more insight? Would it make sense to let tree-sitter ask the language server for the ast?

Asking, because I am working on semantic token fontification for and not using treesitter.

https://github.com/tree-sitter/tree-sitter/issues/2149

holgerschurig,

@HaraldKi

Would it make sense to let tree-sitter ask the language server for the ast?

No, it wouldn't.

Because then tree-sitter would actually be able to setup a compilation environment and know how to compile this one specific file. But maybe this one specific file is a C header file? Or compilation ois complicated because it xsn only happen in OpenEmbedded or a Docker container?

Also: the AST of GCC is different to the AST of clang is different to the one of Rust which is different to the one of Nim etc etc etc.

AST's aren't normed, they are an implementation detail of the compiler. Would a compiler change its AST, things would stop working.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • emacs
  • Durango
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • everett
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ethstaker
  • osvaldo12
  • modclub
  • normalnudes
  • provamag3
  • tester
  • anitta
  • Leos
  • megavids
  • lostlight
  • All magazines