GithubHelp home page GithubHelp logo

Comments (3)

barbados-clemens avatar barbados-clemens commented on June 2, 2024

wonder if there is a way to leverage nxls, the nx language server or if there is a way to exec commands like nx show projects or just nx graph (just saw that the plugin does use nx graph 🙃 ) and be able to use that information for completions. Esp for workspaces that no longer have workspace.json.

I don't know anything about zsh plugins so idk if any of that is possible, but would be a great QoL improvement if it is possible.

Just some ideas 😃

from nx-completion.

edbzn avatar edbzn commented on June 2, 2024

Hi @barbados-clemens, thanks for the input.

How could the nx language server be used? An example of its usage could help to see if it's usable with Zsh.

We recently fixed the completion to work without workspace.json file, so now it generates a graph using nx graph in /tmp that is used to build the completion for each workspace.

However, there are some limitations and I don't know how to overcome them. One limitation is that shortcut commands like nx custom-command my-project are not autocompleted dynamically, it is because we need to statically describe the command and its options to zsh compdef.

Note that command completion works well when using nx verbose style, eg: nx run my-project:custom-command, but without any option completion.

So yeah, all of this seems very hard to do with Zsh, or I just ignore how to do it... so if anybody has Zsh knowledge, raise your hand.

from nx-completion.

barbados-clemens avatar barbados-clemens commented on June 2, 2024

the nx lsp basically contains a bunch of info about the workspace itself, like different executor options and generator options. which can be helpful for getting auto complete for targets, but generating the target list dynamically is really the thing I'd really like. which can all be done via the graph, except (like you mentioned) the plugin has to statically define all sub commands.

I didn't realize the plugin was using the nx graph when first commenting, I was using an older version and needed to update (kept getting the warning about no workspace.json.

if there was a way to have lazy init of the sub commands, then that would be all we needed, but I guess it's not really possible with the zsh plugin system. :/

Thanks for all the hard work on this plugin though really appreciate it!

from nx-completion.

Related Issues (16)

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.