multi-fixes

This commit is contained in:
2026-02-22 15:24:48 +00:00
parent 982c2c8b44
commit e2dc4a1f40
11 changed files with 498 additions and 48 deletions
+4 -1
View File
@@ -18,6 +18,7 @@ import (
"github.com/smacker/go-tree-sitter/html"
"github.com/smacker/go-tree-sitter/javascript"
"github.com/smacker/go-tree-sitter/python"
"github.com/smacker/go-tree-sitter/rust"
"github.com/smacker/go-tree-sitter/typescript/typescript"
"github.com/lukaszraczylo/mcp-filepuff/pkg/errors"
@@ -117,10 +118,12 @@ func getLanguage(lang protocol.Language) (*sitter.Language, error) {
return html.GetLanguage(), nil
case protocol.LangElixir:
return elixir.GetLanguage(), nil
case protocol.LangRust:
return rust.GetLanguage(), nil
default:
return nil, errors.New(errors.ErrInvalidLanguage, fmt.Sprintf("language %s is not supported", lang)).
WithContext("language", string(lang)).
WithRemediation("Supported languages: Go, TypeScript, JavaScript, Python, C, C++, HTML, Vue, Elixir")
WithRemediation("Supported languages: Go, TypeScript, JavaScript, Python, C, C++, HTML, Vue, Elixir, Rust")
}
}