otter.nvim
otter.nvim copied to clipboard
Support Just / Justifies
Hi - I'm having trouble getting otter to recognize embedded bash or fish in Justfiles.
Here's an example:
build-packages +packages='all':
#!/usr/bin/env fish
echo "{{ packages }}"
I can see the otter embedded language server. Using the default config.
The extensions portion of the configuration obviously only works for files with extension, while "Justfile" doesn't have one.
Thanks.
The extension is meant for the embedded language, fish in your case, which exists. Do you have have treesitter injections for Justfiles working?
Yes, injections appear to be working:
Looks like Justfiles are a current limitation of the way we extract the injected languages. The injection.content node starts before the injection.language node, but because otter goes through the treesitter nodes in order of appearance it doesn't retroactively assign the language to the content.
Ok - so this is an issue with tree-sitter-just it sounds like. Or I can see about updating a local injections.scm to override?
No, it's an issue in otter.nvim itself, so it can be fixed.