-
nvim-ts-context-commentstring
Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I think GitHub still has some use for tree-sitter. In this post it's mentioned that their new code navigation system is based on tree-sitter. In a more recent post they welcome contributers to add special code navigation queries to existing languages. You can find their public repository here if you want to follow along with any developments. Since their code navigation system relies heavily on tree-sitter I don't think it's going anywhere soon (fingers crossed).
I think you're asking why Neovim chose to use tree-sitter for syntax highlighting over LSP? In addition to its speed over LSP and no dependency on a separate running server, tree-sitter is described as an incremental parsing library. When editing source code, until the user stops writing the syntax is usually considered incorrect and the code is in a broken state. Tree-sitter was designed to handle these sorts of syntax errors and highlight the rest of the file correctly while the current section is being edited. Tree-sitter also boasts a few unique features over LSP. Language injection is a cool feature where tree-sitter can parse multiple languages in the same source file and provide the correct highlighting for both languages. Common examples include HTML inside JSX, vimscript inside Neovim's Lua API, C code in Lua, Bash code inside Dockerfiles, etc. Furthermore the language injection feature can be extended like in the very cool nvim-ts-context-commentstring plugin that detects the current language under the cursor and applies the corresponding commentstring. Additionally tree-sitter allows the user to extend the concept of textobjects using the tree-sitter query language. The plugin nvim-treesitter-textobjects provides a collection of queries for common languages that define text objects such as classes, functions, parameters, etc. In turn this allows you to perform operations such as delete the contents of a function (using the motion dif), delete an entire class and enter insert mode (using the motion cac), and navigate to the next function (using the motion ]m).
I think you're asking why Neovim chose to use tree-sitter for syntax highlighting over LSP? In addition to its speed over LSP and no dependency on a separate running server, tree-sitter is described as an incremental parsing library. When editing source code, until the user stops writing the syntax is usually considered incorrect and the code is in a broken state. Tree-sitter was designed to handle these sorts of syntax errors and highlight the rest of the file correctly while the current section is being edited. Tree-sitter also boasts a few unique features over LSP. Language injection is a cool feature where tree-sitter can parse multiple languages in the same source file and provide the correct highlighting for both languages. Common examples include HTML inside JSX, vimscript inside Neovim's Lua API, C code in Lua, Bash code inside Dockerfiles, etc. Furthermore the language injection feature can be extended like in the very cool nvim-ts-context-commentstring plugin that detects the current language under the cursor and applies the corresponding commentstring. Additionally tree-sitter allows the user to extend the concept of textobjects using the tree-sitter query language. The plugin nvim-treesitter-textobjects provides a collection of queries for common languages that define text objects such as classes, functions, parameters, etc. In turn this allows you to perform operations such as delete the contents of a function (using the motion dif), delete an entire class and enter insert mode (using the motion cac), and navigate to the next function (using the motion ]m).