Comments (20)
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.
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.
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.
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.
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.
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.
@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.
I've just finished a proof of concept without having to implement a language server:
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.
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.
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.
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.
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.
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.
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.
@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 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.
@roaldnefs ok thanks, have you been able to get salt-lint to work with py3.7+ on windows ?
from vscode-saltstack.
@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.
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.
With the release of the extension pack, I think this effectively done.
from vscode-saltstack.
Related Issues (11)
- Autocomplete gives extra closing bracket. HOT 10
- Proritize Jinja highlighting over Salt string highlighting.
- Add extension to the Open VSX Registry HOT 3
- Installation issue v0.0.8 HOT 2
- Integrate with the Salt LSP server? HOT 7
- some JINJA wrongly highlighted
- Jinja variable detection reports false positive
- Feature request: module autocompletion HOT 2
- Compatible with 1.18
- Can I issue a few feature requests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-saltstack.