Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Does not work in another languages than english #4

@gbprod

Description

@gbprod

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions