3 ms·
CLI / TUI parsers and analyzers of code. Let's not compartmentalize those into super-complex graphical IDEs. I'd like to be able to do e.g. `$TOOL functions pa
by pdimitar 4y ago
CLI / TUI parsers and analyzers of code. Let's not compartmentalize those into super-complex graphical IDEs.
I'd like to be able to do e.g. `$TOOL functions path/to/module.rs` and get a flat list with only names or full function signatures (configurable by CLI switches).
I'd also like to have some pre-baked analyzers e.g. find all controllers in Rails / Phoenix / Laravel / ActixWeb projects. Or all views, templates, etc.
Furthermore, CLI/TUI refactoring please! I want to rename a function, or a module, or even just a local function variable, let me do it!
In general: tooling for massaging source. We need much more of that.
- abrichr 4y agoInteresting. What are the limitations associated with current tooling, e.g. described at https://kadimi.com/cli-refactoring/ https://kadimi.com/cli-refactoring/ and https://waylonwalker.com/refactor-in-cli/ https://waylonwalker.com/refactor-in-cli/ ?
- pdimitar 4y agoThe limitations are that these are very plain regexes. I've screwed up a good amount of time doing that, it's not good enough. We need actual structured semantic analysis, the way the compiler / interpreter does it.
- bbkane 4y agoThis sounds like a great use case for Tree-sitter ( https://tree-sitter.github.io/tree-sitter/ https://tree-sitter.github.io/tree-sitter/ ) GitHub uses Tree-sitter for code highlighting and goto definition, so it already has grammars for many languages
- Diris 4y agoI could see 1 and 3 not being too hard to build using treesitter[0] Too bad, I don't have time to build it [0] https://github.com/tree-sitter/tree-sitter https://github.com/tree-sitter/tree-sitter
- pdimitar 4y agoYep I know, there are various CLI LSP tools and then you have awesome tools like `rust-analyzer`. What I am lacking is a complete tool you can command to do specific isolated actions.