1
1
mirror of https://github.com/oxalica/nil.git synced 2024-11-29 16:12:12 +03:00
Commit Graph

151 Commits

Author SHA1 Message Date
oxalica
70df371289 Ignore tests asserting Nix documentations
They are fragile on different Nix versions.
2024-08-06 08:25:13 -04:00
uncenter
ff9e2f0296
Only strip query parameters and fragment for flake ref URLs (#141) 2024-08-06 02:30:17 +08:00
oxalica
3d2287d042 Update dependencies and explain lsp_types pinning 2024-08-05 13:42:12 -04:00
wiki-nixos
dfe12a6590
Update NixOS wiki link (#144)
Co-authored-by: NixOS Wiki <mail@nix.wiki>
2024-08-06 01:40:18 +08:00
oxalica
b444ca32fa Update dependencies and fix clippy warnings 2024-05-30 12:12:53 -04:00
oxalica
b6869253ef Fix clippy warnings 2024-05-01 09:44:45 -04:00
oxalica
fdccb900c9 Update dependencies and fix warnings 2024-01-07 14:30:25 +08:00
oxalica
0031eb4343 Record AstPtr of the first Expr for merged attrsets
Otherwise, it causes a panic of missing node when reporting diagnostics
on the merged attrset.

Fixes #114
2023-11-29 10:36:12 +08:00
oxalica
440a3857cd Update to itertools 0.12.0 and fix clippy 2023-11-27 10:30:47 +08:00
oxalica
bd93024db6 Refactor and improve completion from nowhere or manual trigger
- Regroup completion cases under `Context` in a OOP-like manner to
  simplify parameter passing.

- Handle more cases for complete from nowhere (between expressions or
  bindings). This helps 24x7 completion and manually triggered
  completion (Ctrl-Space) in various places to list all options without
  any identifier as filter.
2023-10-19 18:16:55 +08:00
oxalica
1b6b4534b3 Remove trailing spaces in tests 2023-10-19 11:07:00 +08:00
oxalica
ee023be3dd Update dependencies 2023-10-09 15:58:28 +08:00
oxalica
61caccdde0 Ignore identifiers starting with _ from liveness check
Partially fixes #55
Closes #109
2023-10-09 09:22:10 +08:00
oxalica
dbf49b3aab Generate symbol tree syntactically without invalid nesting
Fixes #107
2023-10-09 09:00:19 +08:00
oxalica
2091ef0e1d Fix clippy warnings 2023-10-09 08:48:57 +08:00
oxalica
5b55d6fd79 Avoid breaking words in tests 2023-08-06 22:31:06 +08:00
oxalica
565472e8ae Mass fix typos with typos 2023-08-06 22:31:06 +08:00
Jordan Isaacs
a2668f5680
Fix tests for nix 2.17
* Also updates nixpkgs to utilize 2.17 for tests
2023-07-27 18:54:58 -07:00
oxalica
3b1d36a5ba Add tests for the stability of Module 2023-07-12 08:18:52 +08:00
oxalica
9512111505 Fix diagnostics ordering in liveness analysis 2023-07-12 08:18:52 +08:00
oxalica
05b7d9e936 Update rustfmt and format let-else 2023-07-09 07:47:27 +08:00
oxalica
bc24a2567b Delay path link resolutions
This reduces the time of `textDocument/documentLink` from ~100ms down
to ~20ms. Editors doing frequent query of links like coc.nvim can
benefit a lot from it.
2023-06-26 17:56:47 +08:00
oxalica
9bcb01acc2 Filter far spans from highlight_related results 2023-06-26 16:45:22 +08:00
oxalica
e727e55565 Bump indexmap to 2 2023-06-24 11:04:59 +08:00
oxalica
c7453bb3ea Update dependencies 2023-06-23 14:17:13 +08:00
Manuel
119e56eb4d
Update diagnostics CLI to return non-zero exit code only on errors (#90)
Co-authored-by: Manu [tennox] <tennox+git@txlab.io>
2023-06-12 06:31:37 +08:00
oxalica
dcd38b96c9 Use semantic token type boolean for true/false
This distinguishes boolean literals from other builtin constants like
`null`. The type name is copied from rust-analyzer.

<526507fe22/crates/rust-analyzer/src/semantic_tokens.rs (L67)>

Closes #52
2023-05-31 19:22:45 +08:00
oxalica
ac641a993a Trigger show-references on variable usages
Closes #86
2023-05-31 19:08:18 +08:00
oxalica
7414d583c5 Only check the direct parent node in references query
We should not query `with`'s references just because we are inside a big
`with` expression. It should only trigger exactly on the `with` token.
2023-05-31 18:58:54 +08:00
oxalica
a7d651421d Set rest type for system fields in flake outputs
This helps inference for the common dynamic system access pattern.
Example:

```nix
{
  outputs =
    { flake-utils, nixpkgs, ... }:
    flake-utils.lib.eachDefaultSystem (system: {
      packages.hello = nixpkgs.legacyPackages.${system}.hello;
                                              # ^       ^ What should this resolve to?
                                              # ^ Dynamic attribute.
    }
}
```

Thus we pick a specific "default" system for fallback. Then
`nixpkgs.legacyPackages.${system}.hello` can be resolved to, for
example, `nixpkgs.legacyPackages.x86_64-linux.hello`, which we know is
a `derivation`.
2023-04-22 09:19:15 +08:00
oxalica
5422c3fe82 Infer rest types for dynamic fields 2023-04-22 09:19:15 +08:00
oxalica
ae9fa0c3a2 Also export flake output under outputs 2023-04-22 06:23:12 +08:00
oxalica
7d020d4698 Inject outputs of input flakes 2023-04-22 01:56:50 +08:00
oxalica
7218a6b7ca Add input flake types to database inputs 2023-04-22 01:40:00 +08:00
oxalica
3c6629acd0 Rename ide::ty::options -> ide::ty::convert 2023-04-21 03:10:22 +08:00
oxalica
1d5bc81023 Fix typo 2023-04-14 03:06:42 +08:00
oxalica
df541a798d Suppress unused warnings for flake auto-inputs
Fixes #73
2023-04-14 03:04:26 +08:00
oxalica
9995235134 Update dependencies 2023-04-14 02:12:57 +08:00
oxalica
0718fca59b Parse rec attrsets in flake.nix 2023-03-30 22:04:10 +08:00
oxalica
f3eaa77002 Escape invalid identifiers in completions 2023-03-29 16:24:15 +08:00
oxalica
932803b1de Fix panics when flake inputs contain self 2023-03-28 21:44:43 +08:00
oxalica
8463c135ad Translate and inject option types from Nix 2023-03-14 01:14:22 +08:00
oxalica
5b99f7aab5 Inject NixOS options 2023-03-13 22:46:45 +08:00
oxalica
9a043a5039 Add NixOS configuration type database input 2023-03-13 17:47:56 +08:00
oxalica
fe38ceaae6 Move string escaping to syntax::semantic and fix 2023-03-13 13:39:44 +08:00
figsoda
e5fcdc168c
Add string rewriting assists (#69) 2023-03-11 23:05:19 +08:00
oxalica
bbca41c5ee Apply clippy::uninlined_format_args 2023-03-10 16:10:09 +08:00
oxalica
4ec9367726 Apply clippy::manual-let-else 2023-03-10 16:10:09 +08:00
oxalica
4a9f128200 Apply clippy::{doc_markdown,missing-panics-doc} 2023-03-10 16:10:02 +08:00
figsoda
d101741884
Implement type inference for rest attributes (#68) 2023-03-09 06:17:13 +08:00