Commit graph

10 commits

Author SHA1 Message Date
Tobias Hunger
4c7ecc57d8 Janitor: Fix clippy::or_fun_call 2021-08-04 22:50:35 +02:00
Tobias Hunger
24a2021226 Janitor: Fix clippy::needless_borrow 2021-08-04 22:50:35 +02:00
Tobias Hunger
5cf23f102e Janitor: Fix clippy::redundant_pattern_matching 2021-08-04 22:50:35 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Simon Hausmann
7240f5c5e9 Fix loading of relative paths on Windows
We use std::fs::canonicalize() and that may produce paths like

    `\\\\?\\C:\\foobar\\baz.60`

where the leading `\?` disables all parsing.

When `baz.60` imports another `.60` file using a relative path `../fob.60`,
we call `Path::join()`, which really just appends strings, producing

    ``\\\\?\\C:\\foobar\\../fob.60`

When calling `canonicalize()` again on this path, the function fails,
because any parsing was disabled,
so neither the forward slash nor the .. are resolved.

So while the forward slash handling could be solved with `components()` we
still run into

    https://users.rust-lang.org/t/unable-to-parse-relative-directories-in-windows-unc-paths/8164

To circumvent all this, use the dunce crate to canonicalize in a way on Windows
that avoids UNC paths.
2021-04-27 11:02:23 +02:00
Olivier Goffart
f620351cbf Go to definition of structs
Also add the struct in the outline
2021-04-24 15:06:58 +02:00
Olivier Goffart
59654472d2 LSP: color providers 2021-04-18 23:27:14 +02:00
Olivier Goffart
3f3a4c4ec9 Store the actual property declaration node
so that the goto definition can go to the right location
2021-04-18 14:19:38 +02:00
Olivier Goffart
41057c9e55 LSP: Goto definition in expressions 2021-04-17 12:50:47 +02:00
Olivier Goffart
06f2223bb2 LSP: move code around 2021-04-17 12:50:47 +02:00