GithubHelp home page GithubHelp logo

Comments (8)

mre avatar mre commented on May 27, 2024 2

We could actually keep that issue open for the time being so that we don't forget.
If you need any support with the implementation, just ask here. Me or somebody else (e.g. @GianOrtiz) will help you if we can.

As a first idea, the bug is located in https://github.com/mre/vscode-snippet/blob/master/src/extension.ts#L51 where we try to access the languageId even if we don't have a document.

from vscode-snippet.

mre avatar mre commented on May 27, 2024

Hey @pankaj-kvhld,

just tested it on a vanilla visual studio code installation and it works for me.
Does it immediately print an error or only when hitting "enter" to find a snippet?
Do you run any special query?

from vscode-snippet.

mre avatar mre commented on May 27, 2024

@pankaj-kvhld is this still an issue for you? It's tricky to debug from my side.

from vscode-snippet.

pankaj-kvhld avatar pankaj-kvhld commented on May 27, 2024

Apologies for late response. I realized that this only happens when no project folder is open. In an open project it works like a charm.
Is it supposed to behave like this? If yes, then I will close the issue. Thanks for making this lovely plugin.

from vscode-snippet.

mre avatar mre commented on May 27, 2024

Ah that's a bug that we should fix.
Feel free to give it a shot if you like.
Otherwise I'll try to squeeze it in as soon as I find the time.

from vscode-snippet.

pankaj-kvhld avatar pankaj-kvhld commented on May 27, 2024

WOW, I have never contributed to open source, but want to. I don't think I know enough programming, but will give a shot. Thanks for the opportunity.

from vscode-snippet.

GianOrtiz avatar GianOrtiz commented on May 27, 2024

Adding this https://github.com/mre/vscode-snippet/blob/master/src/extension.ts#L106-L110 to the find command should solve the problem, @pankaj-kvhld, @mre.

Or we could add a user preferred language config option, so whenever someone tries to use a command without an open editor the extension uses this language as default.

from vscode-snippet.

mre avatar mre commented on May 27, 2024

Agree. As a third option, we could show another input box for the language.
I think I would go with the config option for now and maybe add support for the input box (if no default is set) later.

from vscode-snippet.

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.