diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a51549acb..beda6e688 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,7 +11,7 @@ .github/CODEOWNERS @inclyc # Public documentation -/docs @Ruixi-rebirth @573 +/nixd/docs @Ruixi-rebirth @573 /README.md @Ruixi-rebirth @573 # Packaging diff --git a/README.md b/README.md index 4356e69c0..ebec7eeab 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Some notable features provided by linking with the Nix library include: ![options-example](https://github.com/nix-community/nixd/assets/36667224/43e00a8e-c2e6-4598-b188-f5e95d708256) -See how to configure option system: https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#options +See how to configure option system: https://github.com/nix-community/nixd/blob/main/nixd/docs/user-guide.md#options @@ -39,7 +39,7 @@ See how to configure option system: https://github.com/nix-community/nixd/blob/m
Native cross-file analysis -![package](docs/images/3e4fc99c-7a20-42be-a337-d1746239c731.png) +![package](nixd/docs/images/3e4fc99c-7a20-42be-a337-d1746239c731.png) We support goto-definition on nix derivations! Just `Ctrl + click` to see where is a package defined. @@ -50,37 +50,37 @@ And also for nix lambda: ![lambda-location](https://github.com/nix-community/nixd/assets/36667224/5792da0b-8152-4e51-9b0e-0387b045eeb5) -See how to configure the evaluator for cross-file analysis: https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#evaluation +See how to configure the evaluator for cross-file analysis: https://github.com/nix-community/nixd/blob/main/nixd/docs/user-guide.md#evaluation
Handle evaluations exactly same as nix evaluator -![infinte-recursion](docs/images/9ed5e08a-e439-4b09-ba78-d83dc0a8a03f.png) +![infinte-recursion](nixd/docs/images/9ed5e08a-e439-4b09-ba78-d83dc0a8a03f.png)
Support *all* builtins -![eval-builtin-json](docs/images/59655838-36a8-4145-9717-f2009e0efef9.png) +![eval-builtin-json](nixd/docs/images/59655838-36a8-4145-9717-f2009e0efef9.png) And diagnostic: -![eval-builtin-diagnostic](docs/images/f6e10994-41e4-4a03-84a2-ef275fb402fd.png) +![eval-builtin-diagnostic](nixd/docs/images/f6e10994-41e4-4a03-84a2-ef275fb402fd.png)
## Get Started You can *try nixd without installation*. -We have tested some working & reproducible [editor environments](/editors/editors.md) and example [configurations & workspaces](/docs/examples). +We have tested some working & reproducible [editor environments](/nixd/docs/editors/editors.md) and example [configurations & workspaces](/nixd/docs/examples). ## Resources -- [Editor Setup](docs/editor-setup.md) -- [User Guide](docs/user-guide.md) -- [Configuration Examples](docs/examples) -- [Developers' Manual](docs/dev.md) (internal design, contributing): +- [Editor Setup](nixd/docs/editor-setup.md) +- [User Guide](nixd/docs/user-guide.md) +- [Configuration Examples](nixd/docs/examples) +- [Developers' Manual](nixd/docs/dev.md) (internal design, contributing): - Project matrix room: https://matrix.to/#/#nixd:matrix.org ## Project Structure @@ -88,14 +88,13 @@ We have tested some working & reproducible [editor environments](/editors/editor ``` . ├── default.nix -├── docs -├── editors ├── flake.lock ├── flake.nix ├── LICENSE ├── lspserver # The C++ library for writing LSP servers. ├── meson.build ├── nixd # Modularized nixd components, test suite, and tools (binary) +│ ├── docs # Documentation │ ├── include # General header files │ ├── lib │ │ ├── AST # AST library for nix expressions, static analysis (rename, completion, location, range) & evaluation bindings. diff --git a/flake.nix b/flake.nix index 43ccf64ab..bfbdc36af 100644 --- a/flake.nix +++ b/flake.nix @@ -50,14 +50,14 @@ nativeBuildInputs = [ nixd pkgs.nixpkgs-fmt - (import ./editors/nvim-lsp.nix { inherit pkgs; }) + (import ./nixd/docs/editors/nvim-lsp.nix { inherit pkgs; }) ]; }; devShells.vscodium = pkgs.mkShell { nativeBuildInputs = [ nixd pkgs.nixpkgs-fmt - (import ./editors/vscodium.nix { inherit pkgs; }) + (import ./nixd/docs/editors/vscodium.nix { inherit pkgs; }) ]; }; }; diff --git a/docs/dev.md b/nixd/docs/dev.md similarity index 100% rename from docs/dev.md rename to nixd/docs/dev.md diff --git a/docs/editor-setup.md b/nixd/docs/editor-setup.md similarity index 92% rename from docs/editor-setup.md rename to nixd/docs/editor-setup.md index ce145e14c..9f9353019 100644 --- a/docs/editor-setup.md +++ b/nixd/docs/editor-setup.md @@ -7,7 +7,7 @@ Please update this doc (tweaks, tricks, or how to setup for another editor)! This is the description about how to setup your editor to use nixd. Before you do these steps, please ensure that you have a working nixd binary. -Refer to https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#installation for more information. +Refer to https://github.com/nix-community/nixd/blob/main/nixd/docs/user-guide.md#installation for more information. ### VSCode @@ -50,4 +50,4 @@ A simple Emacs Lisp configuration that adds nixd to LSP Mode in the mean time is :major-modes '(nix-mode) :priority 0 :server-id 'nixd))) -``` \ No newline at end of file +``` diff --git a/editors/editors.md b/nixd/docs/editors/editors.md similarity index 67% rename from editors/editors.md rename to nixd/docs/editors/editors.md index d4aa14cc7..f26592070 100644 --- a/editors/editors.md +++ b/nixd/docs/editors/editors.md @@ -2,7 +2,7 @@ ### VSCodium -We provide a test environment with the *vscode-nix-ide* plugin, and the repository has some [configuration examples](/docs/examples) that you can try. +We provide a test environment with the *vscode-nix-ide* plugin, and the repository has some [configuration examples](/nixd/docs/examples) that you can try. Start up the test environment: @@ -23,7 +23,7 @@ $ nvim-lsp /tmp/test/default.nix ``` -tip: If you want to configure lsp itself, see [configuration](/docs/user-guide.md#configuration), and the following tree-like directory +tip: If you want to configure lsp itself, see [configuration](/nixd/docs/user-guide.md#configuration), and the following tree-like directory ```console # tree -a /tmp/test diff --git a/editors/nvim-lsp.nix b/nixd/docs/editors/nvim-lsp.nix similarity index 100% rename from editors/nvim-lsp.nix rename to nixd/docs/editors/nvim-lsp.nix diff --git a/editors/vscodium.nix b/nixd/docs/editors/vscodium.nix similarity index 100% rename from editors/vscodium.nix rename to nixd/docs/editors/vscodium.nix diff --git a/docs/examples/README.md b/nixd/docs/examples/README.md similarity index 75% rename from docs/examples/README.md rename to nixd/docs/examples/README.md index e9ef31fc7..06111bd7c 100644 --- a/docs/examples/README.md +++ b/nixd/docs/examples/README.md @@ -11,16 +11,14 @@ For vim users: do not: ``` -vi nixd/docs/examples/options/nixos/module.nix +vi nixd/nixd/docs/examples/options/nixos/module.nix ``` instead: ``` -cd nixd/docs/examples/options/nixos +cd nixd/nixd/docs/examples/options/nixos vi module.nix ``` For vscode users: please open each folder as your "workspace". - - diff --git a/docs/examples/flake/.nixd.json b/nixd/docs/examples/flake/.nixd.json similarity index 100% rename from docs/examples/flake/.nixd.json rename to nixd/docs/examples/flake/.nixd.json diff --git a/docs/examples/flake/default.nix b/nixd/docs/examples/flake/default.nix similarity index 100% rename from docs/examples/flake/default.nix rename to nixd/docs/examples/flake/default.nix diff --git a/docs/examples/flake/flake.lock b/nixd/docs/examples/flake/flake.lock similarity index 100% rename from docs/examples/flake/flake.lock rename to nixd/docs/examples/flake/flake.lock diff --git a/docs/examples/flake/flake.nix b/nixd/docs/examples/flake/flake.nix similarity index 100% rename from docs/examples/flake/flake.nix rename to nixd/docs/examples/flake/flake.nix diff --git a/docs/examples/options/home-manager/.nixd.json b/nixd/docs/examples/options/home-manager/.nixd.json similarity index 100% rename from docs/examples/options/home-manager/.nixd.json rename to nixd/docs/examples/options/home-manager/.nixd.json diff --git a/docs/examples/options/home-manager/flake.lock b/nixd/docs/examples/options/home-manager/flake.lock similarity index 100% rename from docs/examples/options/home-manager/flake.lock rename to nixd/docs/examples/options/home-manager/flake.lock diff --git a/docs/examples/options/home-manager/flake.nix b/nixd/docs/examples/options/home-manager/flake.nix similarity index 100% rename from docs/examples/options/home-manager/flake.nix rename to nixd/docs/examples/options/home-manager/flake.nix diff --git a/docs/examples/options/nixos/.nixd.json b/nixd/docs/examples/options/nixos/.nixd.json similarity index 100% rename from docs/examples/options/nixos/.nixd.json rename to nixd/docs/examples/options/nixos/.nixd.json diff --git a/docs/examples/options/nixos/module.nix b/nixd/docs/examples/options/nixos/module.nix similarity index 100% rename from docs/examples/options/nixos/module.nix rename to nixd/docs/examples/options/nixos/module.nix diff --git a/docs/examples/package/.nixd.json b/nixd/docs/examples/package/.nixd.json similarity index 100% rename from docs/examples/package/.nixd.json rename to nixd/docs/examples/package/.nixd.json diff --git a/docs/examples/package/package.nix b/nixd/docs/examples/package/package.nix similarity index 100% rename from docs/examples/package/package.nix rename to nixd/docs/examples/package/package.nix diff --git a/docs/images/306ca50a-cd01-449a-8fdb-932cc415ee2c.png b/nixd/docs/images/306ca50a-cd01-449a-8fdb-932cc415ee2c.png similarity index 100% rename from docs/images/306ca50a-cd01-449a-8fdb-932cc415ee2c.png rename to nixd/docs/images/306ca50a-cd01-449a-8fdb-932cc415ee2c.png diff --git a/docs/images/3e4fc99c-7a20-42be-a337-d1746239c731.png b/nixd/docs/images/3e4fc99c-7a20-42be-a337-d1746239c731.png similarity index 100% rename from docs/images/3e4fc99c-7a20-42be-a337-d1746239c731.png rename to nixd/docs/images/3e4fc99c-7a20-42be-a337-d1746239c731.png diff --git a/docs/images/59655838-36a8-4145-9717-f2009e0efef9.png b/nixd/docs/images/59655838-36a8-4145-9717-f2009e0efef9.png similarity index 100% rename from docs/images/59655838-36a8-4145-9717-f2009e0efef9.png rename to nixd/docs/images/59655838-36a8-4145-9717-f2009e0efef9.png diff --git a/docs/images/8d106acc-6b1a-4062-9dc7-175b09751fd0.gif b/nixd/docs/images/8d106acc-6b1a-4062-9dc7-175b09751fd0.gif similarity index 100% rename from docs/images/8d106acc-6b1a-4062-9dc7-175b09751fd0.gif rename to nixd/docs/images/8d106acc-6b1a-4062-9dc7-175b09751fd0.gif diff --git a/docs/images/9ed5e08a-e439-4b09-ba78-d83dc0a8a03f.png b/nixd/docs/images/9ed5e08a-e439-4b09-ba78-d83dc0a8a03f.png similarity index 100% rename from docs/images/9ed5e08a-e439-4b09-ba78-d83dc0a8a03f.png rename to nixd/docs/images/9ed5e08a-e439-4b09-ba78-d83dc0a8a03f.png diff --git a/docs/images/abe2fafc-d139-4741-89af-53339312a1af.png b/nixd/docs/images/abe2fafc-d139-4741-89af-53339312a1af.png similarity index 100% rename from docs/images/abe2fafc-d139-4741-89af-53339312a1af.png rename to nixd/docs/images/abe2fafc-d139-4741-89af-53339312a1af.png diff --git a/docs/images/ae629b9f-95cb-48df-aa1d-4f5f94c3c06a.png b/nixd/docs/images/ae629b9f-95cb-48df-aa1d-4f5f94c3c06a.png similarity index 100% rename from docs/images/ae629b9f-95cb-48df-aa1d-4f5f94c3c06a.png rename to nixd/docs/images/ae629b9f-95cb-48df-aa1d-4f5f94c3c06a.png diff --git a/docs/images/c7e8a8c7-5c0e-4736-868f-1e2c345468fd.png b/nixd/docs/images/c7e8a8c7-5c0e-4736-868f-1e2c345468fd.png similarity index 100% rename from docs/images/c7e8a8c7-5c0e-4736-868f-1e2c345468fd.png rename to nixd/docs/images/c7e8a8c7-5c0e-4736-868f-1e2c345468fd.png diff --git a/docs/images/f6e10994-41e4-4a03-84a2-ef275fb402fd.png b/nixd/docs/images/f6e10994-41e4-4a03-84a2-ef275fb402fd.png similarity index 100% rename from docs/images/f6e10994-41e4-4a03-84a2-ef275fb402fd.png rename to nixd/docs/images/f6e10994-41e4-4a03-84a2-ef275fb402fd.png diff --git a/docs/user-guide.md b/nixd/docs/user-guide.md similarity index 98% rename from docs/user-guide.md rename to nixd/docs/user-guide.md index f5d71767e..8127f427c 100644 --- a/docs/user-guide.md +++ b/nixd/docs/user-guide.md @@ -65,7 +65,7 @@ nix build -L .# ### Configuration -- [Configuration Examples](/docs/examples) +- [Configuration Examples](/nixd/docs/examples) We support LSP standard `workspace/configuration` for server configurations. @@ -317,5 +317,4 @@ So tldr, to use `nixd` in your flake project, you have to: 1. Turn your project into a legacy one, by using `flake-compat` 2. Use `inclyc/flake-compat` which will not fetch git repository in nix store -We have a working example [here](/docs/examples/flake/) - +We have a working example [here](/nixd/docs/examples/flake/)