Open teto opened 1 year ago
I would like the equivalent of :LspInfo that dumps only what is relevant to debug my current buffer, maybe something like :TSInfo ?
So you would like to have something like :TSModuleInfo
? But filtered for the languages for the current buffer?
I've tried :h :TSInstall to no avail, so I wonder what's the difference between TSInstallFromGrammar and TSInstall ? Might be worth adding to documentation.
:TSInstall
installs the parsers with minimal steps needed. Typically, just compiling the C sources. :TSInstallFromGrammar
generates the parser from grammar.js
so you need node
and for some parsers even npm
when they have dependencies on other grammars.
As for the "OS info" part, if every plugin starts to add a similar output to its healthcheck, we are doomed. It is relevant though so maybe it should be upstreamed to bneovim instead.
Yes, we really need the OS info since we often debug compiler errors. In particular, we would like to know whether they are on MacOS, Windows or Linux, and the arch on Windows and MacOS.Many users compile for the wrong architecture (e.g. 32bit parsers on 64bit Neovim or arm64 parsers for a Rosetta emulated x64 Neovim or vice-versa. Many users don't seem to be able to provide this information reliably as they didn't notice that their OS runs a different architecture for them. This would be something that could be somehow deducible from nvim --version
It is relevant though so maybe it should be upstreamed to bneovim instead.
What do you mean? Where upstream Neovim should put it? It's just the output of vim.loop.os_uname()
So you would like to have something like :TSModuleInfo? But filtered for the languages for the current buffer?
Yes, I would be happy with :TSModuleInfo <filetype>
but since there are already TSBuf
commands maybe TSBufInfo could be an alias to :TSModuleInfo <filetype>
It's just the output of vim.loop.os_uname()
I understand it's valuable information but we can't have every plugin dump that in checkhealth. Rather than displaying this in treesitter, I say let's dump it in require("nvim.health").check()
so that all plugins can get the info (ask for a full dump of checkhealth in the bug report).
Thnaks for the explanation about TSInstall
. Worth adding to docs imo
I've tried :h :TSInstall to no avail, so I wonder what's the difference between TSInstallFromGrammar and TSInstall ? Might be worth adding to documentation.
I just tried to fix that. But I discovered that we already have a :TSInstall
tag. Did you miss generating the help tags for nvim-treesitter.
yeah I can see the tag now, not sure why it didn't work before. I've been playing with the playground it's great, but I think I hit https://github.com/nvim-treesitter/playground/issues/88 . I've ran a nvim-treesitter checkhealth could the message say in which query the errors were found ?
NB: found the issue, I had not the "query" grammar installed
Is your feature request related to a problem? Please describe.
I would like the equivalent of
:LspInfo
that dumps only what is relevant to debug my current buffer, maybe something like:TSInfo
? TSModuleInfo dumps too much information, here it dumps 137 lines for all the languages I have nothing installed.Other remarks on checkhealth:
I install all my grammars via nix, I find it weird to see the absence of a compiler. It should be a warning or popup when running TSInstall.
I've tried
:h :TSInstall
to no avail, so I wonder what's the difference between TSInstallFromGrammar and TSInstall ? Might be worth adding to documentation. As for the "OS info" part, if every plugin starts to add a similar output to its healthcheck, we are doomed. It is relevant though so maybe it should be upstreamed to bneovim instead.