Giter Site home page Giter Site logo

Comments (17)

wyardley avatar wyardley commented on June 5, 2024 2

Confirmed #5 resolves this for me (with vanilla vim 9), even if i remove filetype plugin on again.

from d2-vim.

nhooyr avatar nhooyr commented on June 5, 2024 1

Though you shouldn't need syntax on for folding.

from d2-vim.

wyardley avatar wyardley commented on June 5, 2024 1

FWIW, adding filetype plugin on before syntax on did resolve this issue for me.

from d2-vim.

pyrho avatar pyrho commented on June 5, 2024

I have this issue too, on NVIM v0.8.0-dev-1025-gfb39bba5a-dirty.

I was not able to understand where the error comes from neither, all functions referencing d2_block_string_syntaxes appears to check for its existence before hand. And this variable is defined fairly early too.

One interesting thing I found is that if you open n*vim first, then open a d2 file you won't have an issue.
The issue only shows when you open the file directly (ie. vim test.d2).

from d2-vim.

pleshevskiy avatar pleshevskiy commented on June 5, 2024

One interesting thing I found is that if you open n*vim first, then open a d2 file you won't have an issue.

Thank you for your explanation! Now I've reproduced it, too.

from d2-vim.

nhooyr avatar nhooyr commented on June 5, 2024

I'm not sure why but I'm not able to reproduce this issue. I'm on NVIM v0.9.0-dev-280+gfae754073 and don't have that variable predefined in my init.vim.

from d2-vim.

nhooyr avatar nhooyr commented on June 5, 2024

Do you guys have a syntax on or filetype plugin on somewhere in your init.vim?

from d2-vim.

pleshevskiy avatar pleshevskiy commented on June 5, 2024

yes

from d2-vim.

nhooyr avatar nhooyr commented on June 5, 2024

You don't need either in neovim, try removing and see if it works without error.

from d2-vim.

pleshevskiy avatar pleshevskiy commented on June 5, 2024

I checked on minimal configuration. It's true. syntax on broke this plugin.

I think it's very strange...

=============================================================================

  1. Quick start :syn-qstart

       	*:syn-enable* *:syntax-enable* *:syn-on* *:syntax-on*
    

Syntax highlighting is enabled by default. If you need to enable it again
after it was disabled (see below), use: >

:syntax enable

Alternatively: >

:syntax on

And I have to enable syntax on to enable syntax folding

from d2-vim.

nhooyr avatar nhooyr commented on June 5, 2024

If you add a filetype plugin on before syntax on things should work I think.

from d2-vim.

nhooyr avatar nhooyr commented on June 5, 2024

Just a friendly ping to see if you guys were able to fix by putting filetype plugin on before syntax on.

from d2-vim.

wyardley avatar wyardley commented on June 5, 2024

If this isn't "fixable", might be good to add a docs note about this in the README. I've never needed to set that up for other syntax plugins.

(side note: I'm using pathogen, if it matters)

from d2-vim.

alixander avatar alixander commented on June 5, 2024

hmm yeah, i'll leave this open after all then

from d2-vim.

pleshevskiy avatar pleshevskiy commented on June 5, 2024

I've already fixed this in MR. Why you don't want to merge it?

from d2-vim.

alixander avatar alixander commented on June 5, 2024

yeah i think if people are running into this with non-outlier vim configs, we should merge that. @nhooyr your call though

from d2-vim.

nhooyr avatar nhooyr commented on June 5, 2024

Ok I'll concede, there's supposed to be an order but perhaps in practice it's not strictly followed. I approved #5

from d2-vim.

Related Issues (8)

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.