1
1
mirror of https://github.com/oxalica/nil.git synced 2024-11-25 07:45:26 +03:00
Commit Graph

491 Commits

Author SHA1 Message Date
oxalica
f2b2647975 Fix stuck on non-regular files and report loading errors 2023-04-29 14:00:00 +08:00
oxalica
5700b00872 Add LSP extension to reload flake states 2023-04-29 14:00:00 +08:00
oxalica
ddb446aa1c Setup tests for neovim and workaround its issue
Workaround: https://github.com/neovim/neovim/issues/23380
2023-04-29 14:00:00 +08:00
oxalica
4465678ba0 Debounce flake workspace loading 2023-04-29 14:00:00 +08:00
oxalica
3e8d591498 Impl file removal from Vfs
This is necessary to reflect the flake workspace change when removing of
`flake.{nix,lock}`.
2023-04-29 14:00:00 +08:00
oxalica
4a78a44f3e Watch flake.{nix,lock} for auto-reloading 2023-04-29 14:00:00 +08:00
oxalica
c177bea181 Handle unsaved flake.nix 2023-04-29 14:00:00 +08:00
oxalica
5bcbc93095 Split out future-proof tests from CI 2023-04-29 01:54:22 +08:00
oxalica
2710d6a568 Rework nix-interop tests
Introduce a standalone test flake instead of inlining lock files or
archiving the main repository.
2023-04-28 17:05:32 +08:00
oxalica
7043bf82ba Wrap paths in flake-url forms for nix arguments
This prevents escaping issues when the path contains special characters
like `-`.
2023-04-26 21:52:48 +08:00
oxalica
9adf5a0152 Bundle snapshot and spawn_blocking to fix deadlock 2023-04-22 16:47:00 +08:00
oxalica
7032ce6506
Eval and inject types for input flakes (#76) 2023-04-22 10:54:28 +08:00
oxalica
4497e9298d Rename nix_interop::version -> info 2023-04-22 10:06:19 +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
3283d0901b Bump MSRV to 1.68 2023-04-22 06:14:33 +08:00
oxalica
385baaf2ca Update flake 2023-04-22 06:11:59 +08:00
oxalica
bca539e4b9 Do not evaluate non-flake inputs 2023-04-22 05:53:39 +08:00
oxalica
1482f7b706 Show progress for coc.nvim and nvim-lsp 2023-04-22 05:52:05 +08:00
oxalica
a3c3edbab8 Report evaluation progress 2023-04-22 05:38:31 +08:00
oxalica
0a19360b6a Guard --legacy for nix flake show with nix version 2023-04-22 03:58:36 +08:00
oxalica
9c49c47826 Do not evaluate legacyPackages by default 2023-04-22 02:01:56 +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
4cbcf29917
Async LSP #74 2023-04-21 00:01:29 +08:00
oxalica
b359f4ff24 Use async-lsp from git 2023-04-20 23:34:09 +08:00
oxalica
c69e0fb5fc Defeated by regex
Fixes #75
2023-04-20 02:07:41 +08:00
oxalica
4f10256e0e Asyncify nix-interop 2023-04-19 02:12:50 +08:00
oxalica
b7bc2636c1 Bump async-lsp and revert "Only enable ClientProcessMonitorLayer for Linux"
This reverts commit 263b82c6d2.
2023-04-19 01:57:08 +08:00
oxalica
263b82c6d2 Only enable ClientProcessMonitorLayer for Linux 2023-04-18 03:36:50 +08:00
oxalica
a22c8d85a4 Warn when non-pipe-like stdin/stdout is used 2023-04-18 03:14:51 +08:00
oxalica
c86e96c003 Use async-lsp from crates.io to fix nix build 2023-04-18 02:55:54 +08:00
oxalica
51da89f1ec Report progress when archiving flake 2023-04-17 11:34:58 +08:00
oxalica
66dc5e7d94 Guard show_message_request with client capabilities 2023-04-17 11:34:58 +08:00
oxalica
5c55e4c6b4 Archive flake when needed 2023-04-17 11:22:21 +08:00
oxalica
ea66982de7 Refactor diagnostics updating 2023-04-17 11:22:21 +08:00
oxalica
0ff186cc42 Refactor config updating event 2023-04-17 11:22:21 +08:00
oxalica
578e2c28d3 Asyncify flake workspace loading task 2023-04-17 11:22:21 +08:00
oxalica
0edd88a682 Switch to async-lsp framework 2023-04-17 11:21:52 +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
a55f287f24 Make tests platform-agnostic 2023-04-14 02:36:12 +08:00
oxalica
9995235134 Update dependencies 2023-04-14 02:12:57 +08:00
oxalica
33fbe2e1f8 Add CI step name for cargo-outdated 2023-04-14 02:06:05 +08:00
oxalica
56a1fa87b9 Update flake 2023-04-04 01:51:06 +08:00
oxalica
8ae5017ccb Check NixOS option completion in the feature list 2023-04-04 01:38:11 +08:00
oxalica
7f88b40b3a Update dependencies 2023-04-04 01:02:40 +08:00
oxalica
0718fca59b Parse rec attrsets in flake.nix 2023-03-30 22:04:10 +08:00