Git Product home page Git Product logo

Comments (7)

L3MON4D3 avatar L3MON4D3 commented on June 8, 2024

Hi :)
So far this sounds all like it should at least show the snippets..
Could you post your logs? :lua ls.log.open() opens it, best clear it and then start one new session, maybe check if there's some error reported, and set the loglevel high enough before running load() (:lua ls.log.set_loglevel("info"))

from luasnip.

thefuga avatar thefuga commented on June 8, 2024

I'm getting an error when trying to access ls.log: E5108: Error executing lua [string ":lua"]:1: attempt to index global 'ls' (a nil value).
Edit: obviously this is not related to the issue, but I'll take a look at this before I can give a proper answer 🥲

from luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 8, 2024

dammit, s/ls/require("luasnip")/, sorry about that

from luasnip.

thefuga avatar thefuga commented on June 8, 2024

Oh, my bad. That was quite obvious.

So, after looking into the logs, turns out I need to define a package.json so I can import it. I was under the impression that it would load all json files as snippets.

It's working perfectly now. Thank you very much for the support @L3MON4D3!

from luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 8, 2024

Ahhh alright, happy the log helped by itself :D

from luasnip.

y9c avatar y9c commented on June 8, 2024

Can luasnip automatically load .json file based on file name instead of parsing from the package.json file?

from luasnip.

L3MON4D3 avatar L3MON4D3 commented on June 8, 2024

We don't have that, but if you want to avoid the package.json and don't mind having all your snippets in one big file you can use the vscode-standalone-loader (search for "standalone" in DOC.md)

from luasnip.

Related Issues (20)

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.