added nixd lsp to helix
This commit is contained in:
parent
1d4189b040
commit
64d5097f1a
4 changed files with 125 additions and 28 deletions
65
DEV_ENV
Normal file
65
DEV_ENV
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
This file will document what features I believe I need
|
||||
for NixOS to be a good development environment.
|
||||
|
||||
|
||||
Issues I've encountered:
|
||||
- [X] Audio not working
|
||||
- [ ] Tesseract is a pain in the ass to setup on Nix
|
||||
- [ ] ags no longer supports `-t` flag, so applauncher won't work, requires switching to Astral
|
||||
- [ ] script to enable/disable passwordless sudo
|
||||
|
||||
- [ ] Move Emile.Vault to new vault (I lost the password...)
|
||||
|
||||
- [ ] Add a simple and ugly bar
|
||||
|
||||
- [ ] Install powertop (funny name) for monitoring power usage by processes
|
||||
- [ ] Try to make my battery life bettery
|
||||
|
||||
- [ ] Apply for JetBrains student license
|
||||
- [ ] JetBrains Rider and VSCodium for C#
|
||||
2. Imperative development environment behind NixOS (declarative),
|
||||
similar to python's virtualenv but for the entirety of my system.
|
||||
|
||||
- [ ] Call my wishlist command "subspace (highway)" (Scott Pilgrim reference)
|
||||
|
||||
- [ ] Create a GitHub profile readme like this persons:
|
||||
https://github.com/yuyudhn
|
||||
- [ ] Set a new GitHub profile picture (like github:@Vendicated)
|
||||
artists credit: https://dotpict.net/users/1598051
|
||||
- [ ] Change GitHub location to /dev/zero, /dev/null, www, World Wide Web, etc
|
||||
- [ ] Clean up my GitHub profile (only have things I'm proud of)
|
||||
|
||||
- [X] Put a template website on my VPS
|
||||
- [ ] Put a neoweb-esque webiste on my VPS
|
||||
- [ ] Host a blog on my VPS
|
||||
|
||||
- [ ] Clean laptop and PC, there's tons of unnecessary files and documents now
|
||||
- [ ] Clean nixdots repo, start modularising it ^_^
|
||||
- [ ] Disable `allowUnfree` in nixdots everywhere, if a program needs it then they
|
||||
can `mkForce` override it
|
||||
|
||||
- [X] Add LSP for Nix in helix
|
||||
- [ ] Make a way for me to put my laptop in a low power state, doing very specific actions like:
|
||||
1. disabling LSP use by default temporarily
|
||||
|
||||
TODO:
|
||||
- [X] make btop theming declarative
|
||||
- [ ] Merge laptop and PC dotfiles repos
|
||||
|
||||
|
||||
Cool Technologies:
|
||||
- wishlist (by charmbracelet)
|
||||
- Vaultwarden server + Keyguard client
|
||||
- devbox
|
||||
|
||||
|
||||
|
||||
Random Idea List:
|
||||
- [ ] powertop is cool but it's outdated and ugly, make a prettier one with charmbracelet's tui library
|
||||
and call it powerbtm lmao
|
||||
- [ ] Blog Post: a modern alternative to the suckless philosphy,
|
||||
why GNU keeps failing cause their programs are amazing but
|
||||
aren't designed for humans. suckless programs are excellent
|
||||
too when writing shell scripts, but they suck in dev environments.
|
||||
The solution is to gamify our code and focus on aesthetics
|
||||
and "ergonomics" (usability) like what CharmBracelet does
|
||||
18
HELIX_LSP_GUIDE
Normal file
18
HELIX_LSP_GUIDE
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
`gd` (goto definition when LSP is active)
|
||||
`gy` (goto type definition)
|
||||
`gr` (goto references)
|
||||
`gi` (goto implementation)
|
||||
|
||||
`<space>k` (show documentation for item under cursor)
|
||||
`<space>s` (show picker for symbols in file)
|
||||
`<space>S` (show picker for symbols in workspace)
|
||||
`<space>d` (document diagnostics picker for file)
|
||||
`<space>D` (document diagnostics picker for workspace)
|
||||
`<space>r` (rename symbol)
|
||||
`<space>a` (apply code action, not show what that means though...)
|
||||
`<space>h` (select symbol references)
|
||||
|
||||
`]d` (goto next diagnostic)
|
||||
`[d` (goto previous diagnostic)
|
||||
`]D` (goto last diagnostic in document)
|
||||
`[D` (goto first diagnostic in document)
|
||||
|
|
@ -1,13 +1,10 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{pkgs, ...}: {
|
||||
# read https://docs.helix-editor.com/editor.html
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "dracula";
|
||||
|
||||
editor = {
|
||||
line-number = "absolute";
|
||||
popup-border = "all";
|
||||
|
|
@ -107,29 +104,41 @@
|
|||
};
|
||||
};
|
||||
|
||||
languages.language = [
|
||||
{
|
||||
name = "nix";
|
||||
indent = {
|
||||
tab-width = 2;
|
||||
unit = " ";
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "nix";
|
||||
indent = {
|
||||
tab-width = 2;
|
||||
unit = " ";
|
||||
};
|
||||
block-comment-tokens = {
|
||||
start = "/*";
|
||||
end = "*/";
|
||||
};
|
||||
auto-format = true;
|
||||
formatter.command = "${pkgs.alejandra}/bin/alejandra";
|
||||
language-servers = ["nixd"];
|
||||
}
|
||||
{
|
||||
name = "python";
|
||||
indent = {
|
||||
tab-width = 4;
|
||||
unit = " ";
|
||||
};
|
||||
auto-format = false; # my python is beautiful ^_^
|
||||
rulers = [80];
|
||||
}
|
||||
];
|
||||
|
||||
language-server = {
|
||||
# use nixd as default nix lsp (I haven't tried nil yet)
|
||||
# NOTE: nixd will be supported by default after nix 24.07
|
||||
# SOURCE: https://github.com/nix-community/nixd/blob/main/nixd/docs/editor-setup.md#Helix
|
||||
nixd = {
|
||||
command = "${pkgs.nixd}/bin/nixd";
|
||||
};
|
||||
block-comment-tokens = {
|
||||
start = "/*";
|
||||
end = "*/";
|
||||
};
|
||||
auto-format = true;
|
||||
formatter.command = "${pkgs.alejandra}/bin/alejandra";
|
||||
}
|
||||
{
|
||||
name = "python";
|
||||
indent = {
|
||||
tab-width = 4;
|
||||
unit = " ";
|
||||
};
|
||||
auto-format = false; # my python is beautiful ^_^
|
||||
rulers = [80];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,6 +200,11 @@ in {
|
|||
tldr
|
||||
btop
|
||||
|
||||
# TODO: once upgraded past Nix-24.07 this line won't be necessary (I think)
|
||||
# helix will support nixd by default
|
||||
# SOURCE: https://github.com/nix-community/nixd/blob/main/nixd/docs/editor-setup.md#Helix
|
||||
nixd # lsp for nix
|
||||
|
||||
# Pretty necessary
|
||||
git
|
||||
brightnessctl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue