goToDingoPathWithConfig converts a .go path to its .dingo source path using config.
(goPath string, cfg *config.Config)
| 325 | |
| 326 | // goToDingoPathWithConfig converts a .go path to its .dingo source path using config. |
| 327 | func goToDingoPathWithConfig(goPath string, cfg *config.Config) string { |
| 328 | if !strings.HasSuffix(goPath, ".go") { |
| 329 | return goPath |
| 330 | } |
| 331 | |
| 332 | // Use unified path calculation |
| 333 | dingoPath, err := transpiler.GoPathToDingoPath(goPath, cfg) |
| 334 | if err != nil { |
| 335 | // Fallback to simple suffix replacement if calculation fails |
| 336 | log.Printf("[LSP Translator] goToDingoPath: calculation failed for %s: %v, using fallback", goPath, err) |
| 337 | return strings.TrimSuffix(goPath, ".go") + ".dingo" |
| 338 | } |
| 339 | return dingoPath |
| 340 | } |
| 341 | |
| 342 | // expandTabsInColumn adjusts a column position from Go (tabs) to Dingo (spaces). |
| 343 | // Go files use tabs for indentation, Dingo files use 4 spaces. |
no test coverage detected