Replies: 5 comments 16 replies
-
So I'm not quite clear what you/emi2k01 are suggesting/currently doing? If all the filetype-specific configuration is doing is tracking what a function call is called in Treesitter for that lang, is it necessary for the user to explicitly The reason Treesitter itself does not make you specify each language you want to use (at least as long as you accept the default of |
Beta Was this translation helpful? Give feedback.
-
Separate idea: since we already have things like |
Beta Was this translation helpful? Give feedback.
-
Ok even ignoring all of the previous statements, there's a need for an interface for getting the pair of selections from the buffer, Tree-sitter style. This is because for the following cases, there is no Lua pattern that can properly handle deleting the function call: print(":)")
print(":(") |
Beta Was this translation helpful? Give feedback.
-
Hi, with a634889cb4a02b370f5c5e51c925ef1bc8b1982f, it seems like the issue has been remedied a bit by enabling use of query captures, which can come from |
Beta Was this translation helpful? Give feedback.
-
I notice that you unconditionally You should at least do something like local has_ts, _ = pcall(require, "nvim-treesitter")
if has_ts then
...
end to avoid trying to require the heavy submodules |
Beta Was this translation helpful? Give feedback.
-
With the upcoming Tree-sitter support, one of the problems is that each language uses a different naming scheme for defining what a "function call" is. For example:
function_call
call
call_expression
Since I want to include some Tree-sitter configuration by default, there needs to be a way for the user to "pick and choose" which filetypes they want Tree-sitter configurations for. As suggested by emi2k01, I am currently using
lspconfig
-style configuration, e.g.Are there any alternative ways to setup these "filetype-specific" defaults that anybody has that might be more intuitive? With the current configuration I fear that users might put their filetype-specific configurations into the setup function, expecting it to be called via an autocommand. If you think that I'm overthinking this and the current situation is fine, feel free to leave a 👍 or a comment below. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions