nushell/crates/nu-cli/src
JT 56efbd7de9
Add IDE support (#8745)
# Description

This adds a set of new flags on the `nu` binary intended for use in
IDEs. Here is the set of supported functionality so far:

* goto-def - go to the definition of a variable or custom command
* type hints - see the inferred type of variables
* check - see the errors in the document (currently only one error is
supported)
* hover - get information about the variable or custom command
* complete - get a completion list at the current position

# User-Facing Changes

No changes to the REPL experience. This only impacts the IDE scenario.

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-utils/standard_library/tests.nu` to run the
tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2023-04-06 07:34:47 +12:00
..
completions Add IDE support (#8745) 2023-04-06 07:34:47 +12:00
menus Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
commands.rs feat: add a command_not_found hook (#8314) 2023-03-20 17:05:22 +13:00
config_files.rs feat: add a command_not_found hook (#8314) 2023-03-20 17:05:22 +13:00
eval_file.rs feat: add a command_not_found hook (#8314) 2023-03-20 17:05:22 +13:00
lib.rs feat: add a command_not_found hook (#8314) 2023-03-20 17:05:22 +13:00
nu_highlight.rs Box ShellError in Value::Error (#8375) 2023-03-12 09:57:27 +01:00
print.rs print pipeline contents in print (#8305) 2023-03-04 11:31:01 +13:00
prompt_update.rs feat: add a command_not_found hook (#8314) 2023-03-20 17:05:22 +13:00
prompt.rs Make the default prompt play nice with basic fonts (#8080) 2023-03-02 13:59:32 +13:00
reedline_config.rs fixes the ability to have multiple modifiers on keybindings (#8579) 2023-03-23 07:07:14 -05:00
repl.rs fix: set repl_buffer_state to the REPL buffer after the `pre_execut… (#8560) 2023-03-22 06:43:25 -05:00
syntax_highlight.rs Add IDE support (#8745) 2023-04-06 07:34:47 +12:00
util.rs feat: add a command_not_found hook (#8314) 2023-03-20 17:05:22 +13:00
validation.rs Remove engine_state clones in REPL eval (#7713) 2023-01-10 17:22:32 -08:00