d2-vim icon indicating copy to clipboard operation
d2-vim copied to clipboard

neovim v0.9.5 and astonvim install

Open hholst80 opened this issue 2 years ago • 3 comments

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.

hholst80 avatar Jan 24 '24 21:01 hholst80

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

ngoettin avatar Feb 02 '24 15:02 ngoettin

~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 }

erzz avatar Apr 15 '24 09:04 erzz

Thanks @erzz for your solution that worked for me

jcarpenter12 avatar May 02 '24 09:05 jcarpenter12