GithubHelp home page GithubHelp logo

korekontrol / vscode-saltstack Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 7.0 352 KB

SaltStack extension for Microsoft Visual Studio Code

Home Page: https://www.korekontrol.eu/

License: MIT License

Python 100.00%
jinja jinja2 salt saltstack sls vscode-extension vscode-language vscode-snippets

vscode-saltstack's People

Contributors

marek-obuchowicz avatar mchugh19 avatar roaldnefs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vscode-saltstack's Issues

Compatible with 1.18

Hi is it possible to make it compatible with VS code 1.18 instead of 1.19? Or are there breaking changes?

Integrate with the Salt LSP server?

Hi, @cbosdo and myself have hacked an experimental Language Server for SaltStack SLS during this year's hackweek at @SUSE. The project is still in a very early state (see: https://github.com/dcermak/salt-lsp) but we were wondering whether you'd be interested in collaborating in the future?

I think that it could be definitely beneficial for us to join our efforts here, resulting in less duplicated efforts. What do you all think?

Jinja variable detection reports false positive

This expression
{% do network2host[interfacedetails['network']].update({current_host:{'ip':interfacedetails['ip'],'mac':interfacedetails['mac']}}) %}
is wrongly recognized as a variable. Therefore the problem message:
Jinja variables should have spaces before and after: '{{ var_name }}' salt-lint(206) does not apply and should not be displayed.

network2host and current_host are dicts

Proritize Jinja highlighting over Salt string highlighting.

Since Jinja is rendered by Salt first, I think it should be highlighted above all else even if it is inside of a string. It can be quite annoying to lose your highlighting just because your Jinja is inside a string even though the renderer does not treat it as a string.

Installation issue v0.0.8

Hi,

I'm running into an installation issue with v0.0.8 on the following vscode setup

Version: 1.54.3
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.8.0-48-generic snap
Ubuntu 20.04 LTS 64-bit

The extension doesn't get loaded after installation, even after window reload and vscode restart. The issue manifests through the lack of color/syntax highlighting and no salt related auto completion suggestions when pressing ctrl+space (just the default vscode text suggestions). I first thought this might be due to conflict with Better Jinja and salt-lint extensions but still had the same issue after uninstalling them.

The workaround for now has been

  1. Install extension
  2. Install a lower version which enables the "Reload required" button
  3. Press the "Reload required" button
  4. Update to the latest version
  5. Press the "Reload required" button again

This seems to load the extension properly. Perhaps there is a way to reload the extension directly through the command palette?

Either way, minor issue but thought I'd mention it.

Best regards

Feature request: module autocompletion

I don't think it would be too hard to add autocompletion, such that, when I type, say, file., I get a dropdown that contains exists, managed, symlink, etc. This could also be implemented as snippets instead.

Autocomplete gives extra closing bracket.

When typing {% the auto completion seems to give me a completion of {%%}} (placing my cursor in the centre of the %'s)

Unfortunately, this is not syntactically valid Jinja2

some JINJA wrongly highlighted

Thanks for the great extension! I noticed a couple instances where the JINJA highlighting is wrong:

  1. Commented JINJA after YAML value is not properly highlighted as comments
    {% set Stuff = "/tmp/baz.json" %}
    example:
      file.managed:
        - name: /tmp/foo.json {# {{ Stuff }} #}
  2. JINJA text highlighting for this case should NOT be commented, as JINJA will render and replace the YAML '#'
    # {% set Stuff = "/tmp/baz.json" %}
    example:
      file.managed:
        - name: {{ Stuff }}

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.