about summary refs log tree commit diff
path: root/editors/code/package.json
AgeCommit message (Collapse)AuthorLines
2023-05-28Allow setting cfgsLukas Wirth-1/+6
2023-05-26fix: add a toggle to disable the dependency explorer.David Barsky-1/+6
2023-05-21[editors/code] add markdown syntax highlighting to doc commentsAndreas Backx-0/+10
2023-05-11Add config for disabling non standard lsp highlight tokensLukas Wirth-0/+5
2023-05-08Hide deps panel outside of Rust projects and set missing categoryLaurențiu Nicola-2/+4
2023-05-08Auto merge of #14763 - lnicola:dep-tree-fixes, r=lnicolabors-4/+0
Fix manual formatting and remove duplicate command
2023-05-08Remove duplicate commandLaurențiu Nicola-4/+0
2023-05-08Auto merge of #14742 - Veykril:closure-capture-inlays, r=Veykrilbors-0/+5
feat: Closure capture inlay hints I opted for a fictional `move(foo, &bar, &mut qux)` syntax here, disabled by default as these are not correct rust syntax and hence could cause confusion. ![image](https://user-images.githubusercontent.com/3757771/236447484-649a4ea6-ad61-496e-bad8-765a5236150e.png)
2023-05-07Auto merge of #14758 - lumenian:hover-layout-config, r=HKalbasibors-1/+6
Add config for disabling hover memory layout data Requested in https://github.com/rust-lang/rust-analyzer/pull/14748#issuecomment-1537190252
2023-05-07Rename hover memory layout config keyYury Ivanou-1/+1
2023-05-07Add config for disabling hover memory layout dataYury Ivanou-1/+6
2023-05-06feat: define problem matcher for panics in VS CodeAleksey Kladov-0/+22
Now in VS Code "go to next error" (`F8`) will bring you to the source of a panic.
2023-05-05feat: Closure capture inlay hintsLukas Wirth-0/+5
2023-05-02Remove unnecessary openFile commandLukas Wirth-5/+1
2023-05-02Creating rust dependencies tree viewbruno-ortiz-1/+9
2023-05-02Remove unnecessary openFile commandLukas Wirth-5/+1
2023-05-02Creating rust dependencies tree viewbruno-ortiz-1/+17
2023-05-02Highlight closure captures when cursor is on pipeLukas Wirth-0/+5
2023-05-01MIR episode 4hkalbasi-0/+5
2023-04-28fix: Fix restart server button trying to start instead of restart the serverLukas Wirth-2/+2
2023-04-26Remove proc-macro server command from the rust-analyzer binaryLukas Wirth-1/+1
2023-04-19SpellingJosh Soref-5/+5
* a rule * access * after * amount * annotations * assignment * assist * associated * attribute * borrowed * built-in type * clarification * command * const * constructor * corresponding * counterparts * curlies * dependencies * deterministic * diagnostic * duplicates * edge * edited * efficient * elsewhere * execution * expression * extensions * extracted * fill * github * helper * heuristic * incomplete * indent end * inlay * invocation * lifetime * looking * maybe * move * mutability * mutable * necessarily * necessary * negative * nonexistent * occurred * offsets * offsetted * overridden * parameters * params * params_and_where_preds_in_scope * paredit * parent * parentheses * prepended if * punctuation * receive * receiver * referring * repeated * representing * semantically * separately * shouldnot * siblings * similar * something's * statement * struct * structure * surprise * the * this * transparent * unimplemented * unnamed * unnecessary * unneeded * unreachable * unterminated * utilities * variant * variants * visibility * work around (v) * workaround Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-13fix: Fix view crate graph being broken due to webworker usageLukas Wirth-1/+2
2023-04-10Compute closure captureshkalbasi-0/+17
2023-03-30Auto merge of #14410 - Veykril:query-lru-capacities, r=Veykrilbors-0/+5
internal: Add config to specifiy lru capacities for all queries Might help figuring out what queries should be limited by LRU by default, as currently we only limit `parse`, `parse_macro_expansion` and `macro_expand`.
2023-03-30internal: Add config to specifiy lru capacities for all queriesLukas Wirth-0/+5
2023-03-28Auto merge of #14366 - Veykril:linked-proj, r=Veykrilbors-0/+5
feat: Pop a notification prompting the user to add a Cargo.toml of unlinked file to the linkedProjects cc https://github.com/rust-lang/rust-analyzer/issues/13226 https://github.com/rust-lang/rust-analyzer/issues/9661
2023-03-26Handle proc macro fetching via OpQueueLukas Wirth-2/+2
2023-03-25minor: Add user facing command for reloading proc-macros in VSCodeLukas Wirth-0/+5
2023-03-16feat: Pop a notification prompting the user to add a Cargo.toml of unlinked ↵Lukas Wirth-0/+5
file to the linkedProjects
2023-03-13rename "addProject" commandDavid Barsky-1/+1
2023-03-13fmtDavid Barsky-1/+1
2023-03-13move `rust-analyzer.discoverProjectCommand` above `$generated-start` to ↵David Barsky-11/+11
avoid failing tests
2023-03-13fix typo in package.json.David Barsky-2/+2
2023-03-13fmtDavid Barsky-1/+1
2023-03-13This commit add Cargo-style project discovery for Buck and Bazel users.David Barsky-1/+17
This feature requires the user to add a command that generates a `rust-project.json` from a set of files. Project discovery can be invoked in two ways: 1. At extension activation time, which includes the generated `rust-project.json` as part of the linkedProjects argument in InitializeParams 2. Through a new command titled "Add current file to workspace", which makes use of a new, rust-analyzer specific LSP request that adds the workspace without erasing any existing workspaces. I think that the command-running functionality _could_ merit being placed into its own extension (and expose it via extension contribution points), if only provide build-system idiomatic progress reporting and status handling, but I haven't (yet) made an extension that does this.
2023-03-12Add and use rust-analyzer.cargo.extraArgs settingLaurențiu Nicola-0/+8
2023-03-06Add `View Mir` command and fix some bugshkalbasi-0/+5
2023-02-28Auto merge of #14040 - HKalbasi:mir, r=HKalbasibors-0/+5
Beginning of MIR This pull request introduces the initial implementation of MIR lowering and interpreting in Rust Analyzer. The implementation of MIR has potential to bring several benefits: - Executing a unit test without compiling it: This is my main goal. It can be useful for quickly testing code changes and print-debugging unit tests without the need for a full compilation (ideally in almost zero time, similar to languages like python and js). There is a probability that it goes nowhere, it might become slower than rustc, or it might need some unreasonable amount of memory, or we may fail to support a common pattern/function that make it unusable for most of the codes. - Constant evaluation: MIR allows for easier and more correct constant evaluation, on par with rustc. If r-a wants to fully support the type system, it needs full const eval, which means arbitrary code execution, which needs MIR or something similar. - Supporting more diagnostics: MIR can be used to detect errors, most famously borrow checker and lifetime errors, but also mutability errors and uninitialized variables, which can be difficult/impossible to detect in HIR. - Lowering closures: With MIR we can find out closure capture modes, which is useful in detecting if a closure implements the `FnMut` or `Fn` traits, and calculating its size and data layout. But the current PR implements no diagnostics and doesn't support closures. About const eval, I removed the old const eval code and it now uses the mir interpreter. Everything that is supported in stable rustc is either implemented or is super easy to implement. About interpreting unit tests, I added an experimental config, disabled by default, that shows a `pass` or `fail` on hover of unit tests (ideally it should be a button similar to `Run test` button, but I didn't figured out how to add them). Currently, no real world test works, due to missing features including closures, heap allocation, `dyn Trait` and ... so at this point it is only useful for me selecting what to implement next. The implementation of MIR is based on the design of rustc, the data structures are almost copy paste (so it should be easy to migrate it to a possible future stable-mir), but the lowering and interpreting code is from me.
2023-02-27beginning of MIRhkalbasi-0/+5
2023-02-24Auto merge of #14175 - jmviz:openDocs-context-menu, r=lnicolabors-3/+8
add openDocs command to context menu in VS Code extension This adds the `openDocs` command to the VS Code context menu. I believe there are probably many user who are unaware of this command existing in the rust analyzer extension, and that this should enhance the discoverability of the command. Additionally, even if people are aware of this capability, it's helpful to have this in the context menu anyway; for example, one might forget the name of the command, or the keybinding they have assigned to it. I think that opening docs is a common enough action to warrant the extra line added to the context menu. This makes a few other small changes as well. There are two minor style changes to increase style consistency. First, it changes the titles of the two commands that the rust analyzer extension will contribute to the context menu to title case. All standard VS Code commands that appear in the context menu are in title case. Second, it shortens the title of the `openDocs` command from `Open docs under cursor` to `Open Docs`. The implicit assumption in the standard VS Code context menu command titles is that the action applies to the symbol under the cursor: `Go to Definition`, `Find All References`, etc. Note that since these are changes to the command titles, rather than the command names themselves, these changes will not break any users' existing keybindings for these commands. Second, this adds further restrictions to the `where` clauses of the two commands that the rust analyzer extension will contribute to the context menu, so that the two commands will appear in the context menu only when in a Rust project **and** within a Rust file. Say you have a Python or bash script inside your Rust project. Having these commands appear in the context menu when you right click a symbol in such a non-Rust file is extraneous and potentially confusing. ![demonstration](https://user-images.githubusercontent.com/6609145/219976062-b46ab21b-5753-48f5-a1da-562566cae71c.gif)
2023-02-21Try to improve the rustfmt.overrideCommand docsLaurențiu Nicola-1/+1
2023-02-19change titles of commands in context menu to title case. shorten open docs ↵jmviz-2/+2
command
2023-02-17add openDocs to context menu. add further restrictions to context menu when ↵jmviz-1/+6
clauses to prevent irrelevant commands in non-rust files
2023-02-09Auto merge of #14112 - Veykril:vscode-untrusted, r=lnicolabors-0/+6
minor: Explicitly disable the rust-analyzer extension in untrusted workspaces This is the default, but its always better to be explicit here + we can add a small note as to why.
2023-02-09Explicitly disable the rust-analyzer extension in unstrusted workspacesLukas Wirth-0/+6
2023-02-08Auto merge of #13986 - MariaSolOs:limit-completions, r=Veykrilbors-0/+9
Add setting for limiting number of completions For #13911.
2023-02-06Support sysroot library source being defined inside the workspaceLukas Wirth-0/+8
2023-01-19Update VS Code settingsMaria José Solano-0/+9
2023-01-16Regen configLukas Wirth-5/+0