Giter Site home page Giter Site logo

d2-vim's People

Contributors

alixander avatar charlespascoe avatar nhooyr avatar pleshevskiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

d2-vim's Issues

E121 & E116 on LunarVim v1.3 & Neovim v0.9.4

image

I'm hitting the following errors:

  • E121: Undefined variable: b:included_syntaxes
  • E116: Invalid arguments for function index

I didn't do any customisations apart from installing the plugin.

Any ideas on how to fix this?


Running LunarVim 1.3 with:

NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1699801871

This is the d2-vim plugin version that I'm currently using:
image


Maybe related to #3

Undefined variable: g:d2_block_string_syntaxes

Using

~ % vim --version
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by bmizerany@blaptopvm

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

I installed d2-vim using vim's built-in plugins like:

; git clone https://github.com/terrastruct/d2-vim/ /home/bmizerany/.config/nvim/pack/github/start/d2-vim

Current HEAD is d1cb1e7e22bc0fb4d4034a1b93c2a13cc471acc6

When I opened vim x.d2, I got:

Error detected while processing /home/bmizerany/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/bmizerany/.config/nvim/init.lua:5: Vim(if):E121: Undefined variable: g:d2_block_string_syntaxes
stack traceback:
        [C]: in function 'cmd'
        /home/bmizerany/.config/nvim/init.lua:5: in main chunk
Press ENTER or type command to continue

I tried pre-defining in my ~/.vimrc like:

" d2
let g:d2_block_string_syntaxes = {
        \ 'd2': ['d2'],
        \ 'markdown': ['md', 'markdown'],
        \ 'javascript': ['javascript', 'js'],
        \ 'html': ['html'],
        \ 'json': ['json'],
        \ 'c': ['c'],
        \ 'go': ['go'],
        \ 'sh': ['sh', 'ksh', 'bash'],
        \ 'css': ['css'],
        \ 'vim': ['vim'],
        \ }

but that didn't help.

I'm a little stumped because my vim-script fu is weak. Any pointers would be appreciated.

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.

No such highlight group name: markdownCodeBlock

Error detected while processing BufRead Autocommands for ".d2"..FileType Autocommands for ""..Syntax Autocommands for "d2"..function d2#syntax_post:
line 2:
E28: No such highlight group name: markdownCodeBlock
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.