Comments (3)
wonder if there is a way to leverage nxls, the nx language server or if there is a way to exec commands like (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 nx show projects
or just nx graph
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.
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.
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)
- Feature Request: Work with local Nx CLI installation HOT 1
- 'nx g' does not complete
- Bug: cache works only for `nx` root command
- Does not work without a workspace file HOT 8
- > NX Running global Nx CLI with PNPM may have issues. HOT 5
- Is md5sha1sum also a dependency?
- Support for workspace definition v2 format
- zsh-snap load HOT 1
- Breaks on plugins that cannot be found
- nx lint doesn't autocomplete project names
- Support for standalone project definition
- Format arguments to camel-case HOT 9
- Update arguments to stick to nx 12.x.x
- Support for npx and other ways to use `nx` without having it installed globally HOT 5
- This plugin breaks globalias HOT 1
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 nx-completion.