improve extensions instructions

This commit is contained in:
Anton-4 2022-07-25 14:20:01 +02:00 committed by GitHub
parent 05ba394e9a
commit e54222258d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,14 +5,14 @@ Use the flake in this folder that uses your editor of choice as a starting templ
Further steps:
1. Copy the flake for your favorite editor to a new folder outside of the roc repo folder.
2. Run `git init` in the new folder.
3. Rename the copied flake to `flake.nix`.
4. Execute `git add flake.nix`, nix will error if you don't do this.
5. Change `roc.url = "path:/home/anton/gitrepos/roc3/roc";` to the location of the roc folder on your machine.
6. Add vscode extensions you want to use below `vscodeExtensions = ...`. You can search for extension names [here](https://search.nixos.org/packages?channel=22.05&from=0&size=50&sort=relevance&type=packages&query=vscode-extensions+extensionYouAreSearchingFor). You may not be able to install extensions through the UI in vscode, I'd recommend always adding them to the flake. If you are inside a `nix develop` shell, run `exit` and `nix develop path-to-your-dev-flake-folder` to be able to run vscode with the newly added extensions.
7. add other dev tools you like in the `devInputs` list. You can search for those [here](https://search.nixos.org/packages).
8. From the roc folder run `nix develop path-to-your-dev-flake-folder`.
9. Run the `code` command to start vscode.
1. Run `git init` in the new folder.
1. Rename the copied flake to `flake.nix`.
1. Execute `git add flake.nix`, nix will error if you don't do this.
1. Change `roc.url = "path:/home/anton/gitrepos/roc3/roc";` to the location of the roc folder on your machine.
1. Follow instructions about vscode extensions [here](#extensions).
1. add other dev tools you like in the `devInputs` list. You can search for those [here](https://search.nixos.org/packages).
1. From the roc folder run `nix develop path-to-your-dev-flake-folder`.
1. Run the `code` command to start vscode.
vscode is able to share settings between this nix version and your regular vscode so there is no need to set everything up from scratch.
@ -25,3 +25,23 @@ For lorri:
```
eval "$(lorri direnv --shell-file path-to-your-dev-flake-folder/shell.nix)"
```
## Extensions
### for those we have some Nix experience
Add vscode extensions you want to use below `vscodeExtensions = ...`. You can search for extension names [here](https://search.nixos.org/packages?channel=22.05&from=0&size=50&sort=relevance&type=packages&query=vscode-extensions+extensionYouAreSearchingFor). You may not be able to install extensions through the UI in vscode, I'd recommend always adding them to the flake. If you are inside a `nix develop` shell, run `exit` and `nix develop path-to-your-dev-flake-folder` to be able to run vscode with the newly added extensions.
If your extension is not available on nix, you can add them [from the vscode marketplaces as well](https://stackoverflow.com/a/54812021/4200103).
### for those with little to no Nix experience
Instead of running `code` in the last step you can use the `--extensions-dir` flag to allow you to install extensions using the vscode GUI.
On MacOS:
```
code --extensions-dir="$HOME/dotfiles/vscode/extensions"
```
On Linux:
```
~/.vscode/extensions
```