This library parses objdump text using tree-sitter to produce a light-weight grammar of the file.
This repository's parsing rules are subject to change.
Make sure you include the following somewhere in your init.lua
file.
require("nvim-treesitter.configs").setup {
ensure_installed = {"objdump"},
parser_install_dir = installation_directory,
highlight = { enable = true },
-- More stuff
}
- Install the tree-sitter-cli
cd {root}
tree-sitter test
All tests should pass.
The best way to test tree-sitter-objdump is to parse Objdump files in-action.
A quick way to do that is to run check.sh
check.sh # Searches the current directory
check.sh /path/to/place
This outputs objdump text to /tmp/objdump_files
Then run
cat /tmp/objdumps | xargs -I{} sh -c 'tree-sitter parse {} > /dev/null || echo "{}"' > /tmp/fails
If all is going well, the output file /tmp/fails
should be empty!