about summary refs log tree commit diff
path: root/crates/rust-analyzer/src
AgeCommit message (Collapse)AuthorLines
2022-04-25Don't emit a quickfix for placeholder suggestionsJonas Schievink-67/+13
2022-04-25Auto merge of #12007 - edwin0cheng:restart-proc-macro-reload, r=jonas-schievinkbors-6/+14
Restart proc-macro client when server reload Fix #10719
2022-04-24minor: clarify error messageAleksey Kladov-1/+1
Clarify that the server is a whole is OK, and that it's only a single requests that's dead
2022-04-24Fix Reload Workspace commandEdwin Cheng-6/+14
2022-04-22Spawn a new thread with a larger stack for the serverJonas Schievink-2/+23
2022-04-19Allows triggering commands after an assist editJonas Schievink-5/+17
2022-04-18More visibility for switch workspaces and its statesEdwin Cheng-4/+9
2022-04-17Bump depsLaurențiu Nicola-0/+1
2022-04-16internal: more visibility into why things happenAleksey Kladov-28/+35
2022-04-16fix: Fix proc-macro change check being invertedLukas Wirth-1/+1
2022-04-15fix: Fix source root panic in global state when checking out older git revsLukas Wirth-21/+17
2022-04-14minor: Cleanup config.rs a bitLukas Wirth-50/+96
2022-04-14internal: Show more project building errors to the userLukas Wirth-43/+62
2022-04-13Auto merge of #11956 - fee1-dead:master, r=flodieboldbors-0/+5
feat: allow customizing the command for running build scripts I have tested this locally and it fixed #9201 with some small changes on the compiler side with suggestions from https://github.com/rust-analyzer/rust-analyzer/issues/9201#issuecomment-1019554086. I have also added an environment variable `IS_RA_BUILDSCRIPT_CHECK` for crates to detect that it is a check for buildscripts, and allows defaulting to bogus values for expected environment variables.
2022-04-13feat: allow customizing the command for running build scriptsDeadbeef-0/+5
2022-04-12Merge #11883bors[bot]-0/+14
11883: fix(ide): move moudle directory when rename r=rainy-me a=rainy-me fix: #10992 Added `FileSystemEdit::MoveDir` variant for move dirs. Original implemented as recursively move child mod files but had many issues like 1. left empty dir after rename file 2. only affect rust file 3. not performant so changed to current version Co-authored-by: rainy-me <github@yue.coffee>
2022-04-12fix: move dir on rename modrainy-me-0/+14
2022-04-12fix: Unset test feature in rustc source cratesLukas Wirth-1/+1
2022-04-11Add simplistic config validationLukas Wirth-0/+13
2022-04-11Show config deseralization failures on start upLukas Wirth-61/+84
2022-04-11Merge #11935bors[bot]-86/+33
11935: feat: Switch to LSP inlay hints r=lnicola a=lnicola Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-04-09minor: bump lsp-server versionLukas Wirth-2/+10
2022-04-08Switch to LSP inlay hintsLaurențiu Nicola-86/+33
2022-04-03Merge #10802bors[bot]-8/+16
10802: Allow clients to configure the global workspace search limit r=Veykril a=knutwalker Playing around with [helix](https://helix-editor.com) I realized that the global worksapce symbol search works different compared to vs-code. Helix requires all possible symbols in one query and does no subsequent refinement searched. This PR adds a configuration option to override the default search limit with the default being the currently hardocded value. Helix users can increment this limit for their instance with a config like ```toml [[language]] name = "rust" language-server = { command = "rust-analyzer" } [language.config] workspace = { symbol = { search = { limit = 65536 }}} ``` Other editors are not affected by this change. Co-authored-by: Paul Horn <dev@knutwalker.engineer>
2022-04-03Merge #11866bors[bot]-2/+115
11866: fix: Prevent underflow in range conversion r=Veykril a=skyfmmf Previously, when line numbers of Rust spans were converted to LSP ranges, they could underflow resulting in very large line numbers. As an underflow is always wrong, prevent it and use 0 instead. This was noticed when opening an empty file in `src/bin/` of a library crate. In this case rustc produces a span with `"line_start": 0, "line_end": 0` resulting in the underflow. Co-authored-by: Felix Maurer <felix@felix-maurer.de>
2022-04-03suggest infered type in auto completehkalbasi-0/+1
2022-04-02Simplify completion import insertionLukas Wirth-1/+1
2022-04-01Merge #11869bors[bot]-2/+3
11869: fix: code blocks with tilde also works like code block r=Veykril a=moreal The `rustdoc` uses the `pulldown_cmark` package to parse *doc_comment* and the package also treat triple `~` characters also as code block fences. So when we run `cargo doc`, they will be placed also. <img width="965" alt="image" src="https://user-images.githubusercontent.com/26626194/161208072-5a09a209-57fc-4a52-b190-b0a9be9ffcd6.png"> But `rust-analyzer` doesn't support it so it doesn't have any injected code highlights and any `Run doctest` hint. This pull request tries to allow also them. 🙇🏻‍♂️ Before: <img width="224" alt="image" src="https://user-images.githubusercontent.com/26626194/161207405-b1d6cfda-82b1-4f60-8e42-c51d0ed98f38.png"> After: <img width="161" alt="image" src="https://user-images.githubusercontent.com/26626194/161207693-8e39997c-9ca6-4e69-8c65-e9b70899f7db.png"> Co-authored-by: Lee Dogeon <dev.moreal@gmail.com>
2022-04-01Code blocks with tilde also works like code blockLee Dogeon-2/+3
2022-03-31Add test against line number underflowFelix Maurer-0/+107
2022-03-31Prevent underflow when converting line numbersFelix Maurer-2/+8
Previously, when line numbers of Rust spans were converted to LSP ranges, they could underflow resulting in very large line numbers. As an underflow is always wrong, prevent it and use 0 instead.
2022-03-31Add "view file text" command to debug sync issuesJonas Schievink-0/+17
2022-03-25Merge #11793bors[bot]-13/+23
11793: LSIF: consolidate references into a single edge where possible. r=Veykril a=khuey Co-authored-by: Kyle Huey <khuey@kylehuey.com>
2022-03-24Disable experimental diagnostics by defaultJonas Schievink-1/+1
2022-03-22Preserve order when grouping references.Kyle Huey-11/+16
2022-03-22LSIF: consolidate references into a single edge where possible.Kyle Huey-8/+13
2022-03-22minor: Bump dependenciesLukas Wirth-0/+1
2022-03-22fix: Fix lifetime elision hint configuration keyLukas Wirth-2/+2
2022-03-20Merge #11771bors[bot]-2/+13
11771: feat: Visualize compiler inserted reborrows via inlay hints r=Veykril a=Veykril Disabled by default. ![image](https://user-images.githubusercontent.com/3757771/159165178-baaf968a-4381-468e-933f-5326ca1b203d.png) Closes https://github.com/rust-analyzer/rust-analyzer/issues/11275 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-03-20feat: Visualize compiler inserted reborrows via inlay hintsLukas Wirth-2/+13
2022-03-19Merge #11755bors[bot]-12/+51
11755: feat: Implement lifetime elision hints r=Veykril a=Veykril With names on: ![Code_erl26zKvuf](https://user-images.githubusercontent.com/3757771/159134856-e2c75d2d-f17c-45c7-9a78-3da5ee8b1acd.png) With names off: ![Code_MRP1Pbfe9d](https://user-images.githubusercontent.com/3757771/159134857-30fac3a1-825e-4f49-ba9b-9fa0bb215694.png) Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-03-19Change skip trivial behaviourLukas Wirth-4/+4
2022-03-19Add option to skip trivial casesLukas Wirth-10/+34
2022-03-19Use numbers for lifetimes by default, add setting to prefer using parameter ↵Lukas Wirth-8/+13
names
2022-03-18Rename call info to "signature help"Jonas Schievink-6/+5
It is no longer limited to just calls
2022-03-18Provide signature help when editing generic argsJonas Schievink-1/+1
2022-03-18feat: Implement lifetime elision hintsLukas Wirth-3/+13
2022-03-16feat: Add return type hints for closures with block bodiesLukas Wirth-6/+14
2022-03-16Mark chaining hints as types, since that's what they areLaurențiu Nicola-2/+1
2022-03-12fix clippy::needless_returnMatthias Krüger-1/+1