d2-vim
d2-vim copied to clipboard
neovim v0.9.5 and astonvim install
How do I install this with AstoNvim?
nvim ~/.config/nvim/lua/user/plugins.lua
return {
{ "terrastruct/d2-vim", lazy = "false" },
}
but ft=d2 is not available when I open up a file with a .d2 suffix.
I believe, I have the same problem:
Error detected while processing BufNewFile Autocommands for "*.d2"..FileType Autocommands for "*"..Syntax Autocommands for "d2"..function d2#syntax_post:
line 1:
E121: Undefined variable: b:included_syntaxes
E116: Invalid arguments for function index
on an empty .d2 file
~Same as @ngoettin here - on any .d2 file. Mine is a simple lazy setup via kickstarter where i am just loading as a plugin:~
~Its completely none functional... no highlighting or anything~
EDIT: five mins later I found a solution
local d2 = {
'terrastruct/d2-vim',
ft = 'd2',
}
return { d2 }
Thanks @erzz for your solution that worked for me