You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I'm trying to make this parser works in Neovim but I'm having an issue because I'm using git in french :/
Your parser seems to look for english text and does not works and does not works...
I think it's not a good idea to include all possible translations into this parser but maybe there is another way to do that ?
Eg:
Introduce git-commit parser
This commit...
# Veuillez saisir le message de validation pour vos modifications. Les lignes
# commençant par '#' seront ignorées, et un message vide abandonne la validation.
#
# Sur la branche main
# Votre branche est à jour avec 'origin/main'.
#
# Modifications qui seront validées :
# modifié : lua/usr/treesitter.lua
#
# ------------------------ >8 ------------------------
# Ne touchez pas à la ligne ci-dessus.
# Tout ce qui suit sera éliminé.
diff --git a/lua/usr/treesitter.lua b/lua/usr/treesitter.lua
index 2962f73..04abaab 100644
--- a/lua/usr/treesitter.lua
+++ b/lua/usr/treesitter.lua
@@ -9,6 +9,16 @@ function treesitter.plugins(use)
use("nvim-treesitter/playground")
use("JoosepAlviste/nvim-ts-context-commentstring")
use("windwp/nvim-ts-autotag")
+ local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
+ parser_config.git_commit = {
+ install_info = {
+ url = "https://github.com/the-mikedavis/tree-sitter-git-commit",
+ files = { "src/parser.c" },
+ branch = "main",
+ },
+ filetype = "gitcommit",
+ }
end
function treesitter.setup()
@@ -33,6 +43,7 @@ function treesitter.setup()
"markdown",
"diff",
"bash",
+ "gitcommit",
},
textobjects = {
select = {
I'll try something but I'd like to have your advice on what you think it should be done ?
Thanks
The text was updated successfully, but these errors were encountered:
Oh hmm, this may be tough to handle nicely. I think the cleanest way to support it would be to have per-language forks that replace the hard-coded English words with the appropriate translation. That way the queries could be re-used between each language fork and the grammar wouldn't need to become larger and more complex.
Hi!
I'm trying to make this parser works in Neovim but I'm having an issue because I'm using git in french :/
Your parser seems to look for english text and does not works and does not works...
I think it's not a good idea to include all possible translations into this parser but maybe there is another way to do that ?
Eg:
I'll try something but I'd like to have your advice on what you think it should be done ?
Thanks
The text was updated successfully, but these errors were encountered: