Code Monkey home page Code Monkey logo

Comments (20)

marek-obuchowicz avatar marek-obuchowicz commented on July 23, 2024 2

Great news, @roaldnefs - will definitely give it a try!
About one vs two extensions - i think one extension is more convenient, but that's not a big deal. One installs extensions just once and then uses them, so having two is fine as well. If you would like to look into merging those repos, let me know.
And yeah, response times might be affected by current work load and/or other reasons...

from vscode-saltstack.

roaldnefs avatar roaldnefs commented on July 23, 2024 2

Just released the initial version of the SaltStack Extension Pack on the Visual Studio Code marketplace. If you have questions or suggestions, simply open an issue in the warpnet/saltstack-extension-pack repository.

from vscode-saltstack.

mchugh19 avatar mchugh19 commented on July 23, 2024 1

I would also prefer a single extension for salt support, but if there are going to remain two, can they be combined into an extension pack?

from vscode-saltstack.

marek-obuchowicz avatar marek-obuchowicz commented on July 23, 2024

I did a quick check - however i think the only way to integrate it with external linter is to implement language server. This doesn't seem like super trival - or, at least, i have not found a good example, which can be used as base for integration with salt-lint. If you have any mscode modules which handle that and can help as an example, i would be happy to look into.

from vscode-saltstack.

roaldnefs avatar roaldnefs commented on July 23, 2024

Let me know if there is anything we can help with from the salt-lint side. I've just started using vscode myself and would like to be able to use salt-lint from within vscode.

Note: the salt-lint project has been moved to warpnet/salt-lint.

from vscode-saltstack.

jbouter avatar jbouter commented on July 23, 2024

Hey lads, cheers for this brilliant idea. I have no idea how vscode plugins work, but would it help to have a container image (docker) available?

EDIT: that's nonsense of course, excuse my recommendation. Having the binary available in ones $PATH should be sufficient to call it. So a simple pip install would suffice.

from vscode-saltstack.

marek-obuchowicz avatar marek-obuchowicz commented on July 23, 2024

@roaldnefs what we would need is basically a language server, which is using common protocol: https://microsoft.github.io/language-server-protocol/
There are some online resources targeting python implementation (i don't think it would be logical to use js or any other language for the server, as salt-lint consumes parts of saltstack code, which is written in python) - among them, this one actually looks like pretty interesting:
https://github.com/palantir/python-language-server

from vscode-saltstack.

roaldnefs avatar roaldnefs commented on July 23, 2024

I've just finished a proof of concept without having to implement a language server:

Screenshot from 2019-10-23 21-21-44

This requires some changes on the warpnet/salt-lint side:

  • The vscode extension expects the output of salt-lint to be in JSON format.
  • The severity needs to be added to the output of salt-lint to differentiate between warnings and errors.

Besides those additions it would be nice if salt-lint was able to do the following things:

  • Return the exact position of the mistake (start line, start column, end line and end column).
  • Return a suggestion on how to fix the line, so vscode can apply a quick fix.

I also wonder if the users of vscode-saltstack are willing to install salt-lint or if the linter should be set up in a separate extension. What is your (@marek-obuchowicz, @jbouter) opinion about this?

from vscode-saltstack.

jbouter avatar jbouter commented on July 23, 2024

I'm open to both options. I think the functionality fits well inside vscode-saltstack (and requires users only to install one extension), but I'll leave that up to @marek-obuchowicz

from vscode-saltstack.

jbouter avatar jbouter commented on July 23, 2024

Looking at the time this issue has been waiting for reply, I'm leaning towards creating our own extension and updating its code from there.

from vscode-saltstack.

roaldnefs avatar roaldnefs commented on July 23, 2024

We have created a separate extension for salt-lint (see warpnet/vscode-salt-lint). Due to a mismatch in the language ID the salt-lint extension isn't compatibly with vscode-saltstack, this should be fixed in warpnet/vscode-salt-lint#4.

Edit: just released v0.0.3 including the compatibility fix for vscode-saltstack!

from vscode-saltstack.

roaldnefs avatar roaldnefs commented on July 23, 2024

I would also prefer a single extension for salt support, but if there are going to remain two, can they be combined into an extension pack?

@marek-obuchowicz, are you oke with the idea of creating an extension pack? It might be a small step towards creating a single (combined) SaltStack plugin.

from vscode-saltstack.

marek-obuchowicz avatar marek-obuchowicz commented on July 23, 2024

Sure, i'm completely fine with that. @roaldnefs Is there anything you expect me to change in this repo? Will you take care about registering extension on the marketplace? If anything is needed from my side, let me know or just create a PR.

from vscode-saltstack.

xiaohuazi123 avatar xiaohuazi123 commented on July 23, 2024

I would also prefer a single extension for salt support, but if there are going to remain two, can they be combined into an extension pack?

I can't agree more.

from vscode-saltstack.

wb529kq avatar wb529kq commented on July 23, 2024

@roaldnefs do I need to install it manually, if i have both saltstack and salt-lint installed already will this make any difference ?

from vscode-saltstack.

roaldnefs avatar roaldnefs commented on July 23, 2024

@roaldnefs do I need to install it manually, if i have both saltstack and salt-lint installed already will this make any difference ?

No, this won't make any difference until more extension are added to added to the extension pack.

from vscode-saltstack.

wb529kq avatar wb529kq commented on July 23, 2024

@roaldnefs ok thanks, have you been able to get salt-lint to work with py3.7+ on windows ?

from vscode-saltstack.

roaldnefs avatar roaldnefs commented on July 23, 2024

@roaldnefs ok thanks, have you been able to get salt-lint to work with py3.7+ on windows ?

I'm not familiar with any issues on Windows. If your experience any issues while installing salt-lint on Windows, please submit and issue on warpet/salt-lint.

from vscode-saltstack.

xiaohuazi123 avatar xiaohuazi123 commented on July 23, 2024

Just released the initial version of the SaltStack Extension Pack on the Visual Studio Code marketplace. If you have questions or suggestions, simply open an issue in the warpnet/saltstack-extension-pack repository.

SaltStack Extension Pack is a good idea, no need to repeatedly install SaltStack and salt-lint.

from vscode-saltstack.

mchugh19 avatar mchugh19 commented on July 23, 2024

With the release of the extension pack, I think this effectively done.

from vscode-saltstack.

Related Issues (11)

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.