neorg
neorg copied to clipboard
Neorg tangling does not want to work with custom filetypes.
File:
@document.meta
tangle: ./foo.bar
@end
@code bar
test
@end
Running :Neorg tangle current-file: Nothing to tangle!
When directly specifying the file with #tangle tag tangling works. The filetype is defined in filetype.lua
@vhyrro
I guess that because the extension isn't recognized
i guess you could use this
I also have this problem, even copying the exact same examples given in the tangle tutorial.
A more explicit example of a script that says "Nothing to tangle":
@document.meta
title: tangletest
authors: egolep
tangle: {
languages: {
lua: ./test-lua-output.lua
python: ./test-python-output.py
julia: ./test-julia-output.jl
rust: ./test-rust-output.rs
}
scope: all
}
@end
@code lua
print("Hello")
@end
@code lua
print("Sup")
@end
@code python
print("Ayo")
@end
@code julia
println("What")
@end
@code rust
println!("Hey")
@end
I used your example (@shift-d) and I didn't have any problems. Is the issue relevant?
I've added new filetype:
" ~/.config/nvim/ftdetect/bar.vim
autocmd BufNewFile,BufRead *.bar set filetype=bar
And run tangle. I got the expected result (foo.bar):
test
I'm running into this as well:
@document.meta
tangle: ./test-vifmrc
@end
* This is a test, should export the below to a new file
@code vifm
test
@end
I did define a ~/.config/nvim/ftdetect/vifm.vim file as so
✦ ➜ cat /home/vendion/.config/nvim/ftdetect/vifm.vim
autocmd BufNewFile,BufRead *.vifm set filetype=vifm
But when I try to tangle the file, I get “Nothing to tangle!”
Doing the following worked for me, but seems like a hack
@document.meta
tangle: {
languages: {
vifm: ./test
}
scope: all
}
@end
* This is a test, should export the below to a new file
@code vifm
test
@end