lsps working >:)

This commit is contained in:
cnst
2024-08-22 18:43:49 +02:00
parent f575e84a9e
commit 32b9fcdbef
9 changed files with 132 additions and 117 deletions

102
flake.lock generated
View File

@@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1724006173, "lastModified": 1724273991,
"narHash": "sha256-1ROh0buuxiMyc6eIb3CIbJsmYO7PhLqSYs55mOx1XTk=", "narHash": "sha256-+aUSOXKGpS5CRm1oTitgNAr05ThQNbKIXalZHl3nC6Y=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "7f8df01d4297b9068a9592400f16044602844f86", "rev": "9a3161ad4c78dc420d1cbb3aae638222608c7de4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -102,12 +102,12 @@
"yafas": "yafas" "yafas": "yafas"
}, },
"locked": { "locked": {
"lastModified": 1724241860, "lastModified": 1724260845,
"narHash": "sha256-3TNUwLe94rBqOqsOIYdwkeyyhQFbIvo5e5GeI2Aaayc=", "narHash": "sha256-ufNcCna8sact/lkKNWNl8HwNMrKq42KN+izK/vPvxhk=",
"rev": "adc414d4a4eaab4efa1dc7214fb4078b55599cb3", "rev": "62ad1fce12be4bca6133c14a376cb36a3323fc85",
"revCount": 1356, "revCount": 1357,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1356%2Brev-adc414d4a4eaab4efa1dc7214fb4078b55599cb3/019174d5-a783-7f21-b0d7-465ab9d08b99/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1357%2Brev-62ad1fce12be4bca6133c14a376cb36a3323fc85/019175f5-2559-705a-b10b-daf05c7b63ed/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@@ -200,11 +200,11 @@
"rust-analyzer-src": "rust-analyzer-src_2" "rust-analyzer-src": "rust-analyzer-src_2"
}, },
"locked": { "locked": {
"lastModified": 1724221791, "lastModified": 1724308100,
"narHash": "sha256-mKX67QPnUybOopVph/LhOV1G/H4EvPxDIfSmbufrVdA=", "narHash": "sha256-1lP786QhspMdDNJGv2qep27BM9Dnce+7scwp1e49rKs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "e88b38a5a3834e039d413a88f8150a75ef6453ef", "rev": "37d8c6b53394b9ac18af2e045bb92aaf6e412881",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -222,11 +222,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1724212992, "lastModified": 1724299409,
"narHash": "sha256-MXxSlGiA/wIhts79vKUM1mRYk1BKW8amVx9D8ZUXAHY=", "narHash": "sha256-vIT4dmFC+1l0pSEguFofHSQjY8FtCGjBmzI1L7xbySg=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "e4d175f6f71348b15f20dcd1ad15193149736412", "rev": "6a0ca5c9fe527fed0893929db30bc74ce08d3871",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -247,11 +247,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1724260595, "lastModified": 1724329769,
"narHash": "sha256-slIZqQQuRhFJzaw83tYkqLheAALK0z2c3MfqKhIS6Hk=", "narHash": "sha256-5jFePUMjH81aeArOFgVlmSLoRJKhR+cCHPrtWnlSGAU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flake-firefox-nightly", "repo": "flake-firefox-nightly",
"rev": "648ea05123d211254c0fafdb39b9a592b759f7d3", "rev": "23950b539a22d75b15e4b10ef316a04f8787cf2b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -505,11 +505,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723803910, "lastModified": 1724227338,
"narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=", "narHash": "sha256-TuSaYdhOxeaaE9885mFO1lZHHax33GD5A9dczJrGUjw=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba", "rev": "6cedaa7c1b4f82a266e5d30f212273e60d62cb0d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -705,11 +705,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1724243887, "lastModified": 1724329681,
"narHash": "sha256-qa5TXlcANiWSEzLNZmenvXkqzzh3cDUYSfNniGi+LaU=", "narHash": "sha256-cwYetPD6aAnER0KTLw3l6SvNuprLcPC5AsZBIcOCELY=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "883463f9dd7f1cdc68c3e32017c0a71ccbe39b26", "rev": "f634b9e61af7dae0ca70379bd207eea45bb417d1",
"revCount": 5119, "revCount": 5127,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -784,11 +784,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721324361, "lastModified": 1724174162,
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", "narHash": "sha256-fOOBLwil6M9QWMCiSULwjMQzrXhHXUnEqmjHX5ZHeVI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", "rev": "16e5c9465f04477d8a3dd48a0a26bf437986336c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -986,11 +986,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723859949, "lastModified": 1724299755,
"narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=", "narHash": "sha256-P5zMA17kD9tqiqMuNXwupkM7buM3gMNtoZ1VuJTRDE4=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "076b9a905af8a52b866c8db068d6da475839d97b", "rev": "a8968d88e5a537b0491f68ce910749cd870bdbef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1057,11 +1057,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1724161388, "lastModified": 1724293504,
"narHash": "sha256-IQKkLdZdj2sm4GzCXUPtYzsBkzySbai1FAH9e48qtfM=", "narHash": "sha256-93+lM/1jmJ/S5F8Xn8eK+so6Cf4cL8/h+SzntqPbv88=",
"owner": "nixpak", "owner": "nixpak",
"repo": "nixpak", "repo": "nixpak",
"rev": "7b924406fead4e9529c0d295f5edfefd2631ccc2", "rev": "853b2f4471bb6f2763d5f45ce3343ca51b9e8e9c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1103,11 +1103,11 @@
}, },
"nixpkgs-small": { "nixpkgs-small": {
"locked": { "locked": {
"lastModified": 1724221631, "lastModified": 1724306539,
"narHash": "sha256-zf3gNf0nX2yOb++h4jW9l4iG8R/LfazWZD+KhmW6fcc=", "narHash": "sha256-9jF5qr44cnvWoXhE0cr114GHT5Adav3q/DKJ6n9tor8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ac2df85f4d5c580786c7b4db031c199554152681", "rev": "6c31eb9b990446880000e3297f69f4fdee5b69d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1167,11 +1167,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1723637854, "lastModified": 1724224976,
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1214,11 +1214,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1723991338, "lastModified": 1724224976,
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8a3354191c0d7144db9756a74755672387b702ba", "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1230,11 +1230,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1723991338, "lastModified": 1724224976,
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8a3354191c0d7144db9756a74755672387b702ba", "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1257,11 +1257,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1724222231, "lastModified": 1724337827,
"narHash": "sha256-IFlMn1lgVsZQZC9WklY9YKcCdI0mUxSYZ7EfkaKCsQU=", "narHash": "sha256-z5Y3svnMT9I17ifReo4eQLgqD4W67fs7h2E/xU6Yb/4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "b7f419a759f70126e220533b724cc17e8528b184", "rev": "b470800240926a6b5262fc9030477b7e8fc17453",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1590,11 +1590,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722365976, "lastModified": 1724073926,
"narHash": "sha256-Khdm+mDzYA//XaU0M+hftod+rKr5q9SSHSEuiQ0/9ow=", "narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "7f2a77ddf60390248e2a3de2261d7102a13e5341", "rev": "a08ecbbf33598924e93542f737fc6169a26b481e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -1,6 +1,7 @@
{ {
lib, lib,
config, config,
pkgs,
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
@@ -29,7 +30,70 @@ in {
lspServersToEnable = ["efm"]; lspServersToEnable = ["efm"];
}; };
efmls-configs.enable = true; efmls-configs = {
enable = true;
toolPackages.mdformat = pkgs.mdformat.withPlugins (
ps:
with ps; [
# TODO: broken with update of mdformat
# mdformat-gfm
mdformat-frontmatter
mdformat-footnote
mdformat-tables
mdit-py-plugins
]
);
setup = {
sh = {
#linter = "shellcheck";
formatter = "shfmt";
};
bash = {
#linter = "shellcheck";
formatter = "shfmt";
};
c = {
linter = "cppcheck";
};
markdown = {
formatter = [
"cbfmt"
"mdformat"
];
};
python = {
formatter = "black";
};
nix = {
linter = "statix";
};
lua = {
formatter = "stylua";
};
html = {
formatter = [
"prettier"
];
};
htmldjango = {
linter = "djlint";
};
json = {
formatter = "prettier";
};
css = {
formatter = "prettier";
};
ts = {
formatter = "prettier";
};
gitcommit = {
linter = "gitlint";
};
};
};
}; };
}; };
} }

View File

@@ -16,41 +16,19 @@
comment.enable = true; comment.enable = true;
conform-nvim.enable = true; conform-nvim.enable = true;
efm.enable = true; efm.enable = true;
floaterm.enable = false;
harpoon.enable = false;
lsp.enabe = true;
lualine.enable = true; lualine.enable = true;
markdown-preview.enable = true; markdown-preview.enable = true;
neo-tree.enable = true; neo-tree.enable = true;
none-ls.enable = true; none-ls.enable = true;
startify.enable = true; startify.enable = true;
tagbar.enable = false;
telescope.enable = true; telescope.enable = true;
treesitter.enable = true; treesitter.enable = true;
floaterm.enable = false;
harpoon.enable = false;
tagbar.enable = false;
vimtex.enable = false; vimtex.enable = false;
yanky.enable = false; yanky.enable = false;
lsp = {
enable = true;
servers = {
cssls.enable = true;
tailwindcss.enable = true;
html.enable = true;
astro.enable = false;
phpactor.enable = true;
svelte.enable = false;
vuels.enable = false;
pyright.enable = true;
marksman.enable = true;
nixd.enable = true;
dockerls.enable = true;
bashls.enable = true;
clangd.enable = true;
csharp-ls.enable = true;
yamlls.enable = true;
lua-ls.enable = true;
tsserver.enable = false;
rust-analyzer.enable = true;
};
};
}; };
}; };
vscode.enable = false; vscode.enable = false;

View File

@@ -49,8 +49,8 @@
# Check if we're in a nix-shell or nix develop environment # Check if we're in a nix-shell or nix develop environment
if [[ -n "$IN_NIX_SHELL" ]]; then if [[ -n "$IN_NIX_SHELL" ]]; then
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info) PROMPT='%F{red}󰫱󰫲󰬃%f%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{red}󰫱󰫲󰬃%f %F{143}$ ' %F{143}$ '
else else
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info) PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{143}$ ' %F{143}$ '

View File

@@ -49,8 +49,8 @@
# Check if we're in a nix-shell or nix develop environment # Check if we're in a nix-shell or nix develop environment
if [[ -n "$IN_NIX_SHELL" ]]; then if [[ -n "$IN_NIX_SHELL" ]]; then
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info) PROMPT='%F{red}󰫱󰫲󰬃%f%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{red}󰫱󰫲󰬃%f %F{143}$ ' %F{143}$ '
else else
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info) PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{143}$ ' %F{143}$ '

View File

@@ -29,28 +29,7 @@
vimtex.enable = false; vimtex.enable = false;
yanky.enable = false; yanky.enable = false;
rustaceanvim.enable = true; rustaceanvim.enable = true;
lsp = { lsp.enable = true;
enable = true;
servers = {
cssls.enable = true;
tailwindcss.enable = true;
html.enable = true;
astro.enable = false;
phpactor.enable = true;
svelte.enable = false;
vuels.enable = false;
pyright.enable = true;
marksman.enable = true;
nixd.enable = true;
dockerls.enable = true;
bashls.enable = true;
clangd.enable = true;
csharp-ls.enable = true;
yamlls.enable = true;
lua-ls.enable = true;
tsserver.enable = false;
};
};
}; };
}; };
vscode.enable = true; vscode.enable = true;

View File

@@ -49,8 +49,8 @@
# Check if we're in a nix-shell or nix develop environment # Check if we're in a nix-shell or nix develop environment
if [[ -n "$IN_NIX_SHELL" ]]; then if [[ -n "$IN_NIX_SHELL" ]]; then
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info) PROMPT='%F{red}󰫱󰫲󰬃%f%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{red}󰫱󰫲󰬃%f %F{143}$ ' %F{143}$ '
else else
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info) PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{143}$ ' %F{143}$ '

View File

@@ -24,10 +24,10 @@
# Other utilities and tools # Other utilities and tools
openssl # Required for some crates that involve networking or encryption openssl # Required for some crates that involve networking or encryption
alejandra # alejandra
nixd # nixd
pyright # pyright
yaml-language-server # yaml-language-server
lua-language-server # lua-language-server
]; ];
} }

View File

@@ -3,12 +3,6 @@
NIX_CONFIG = "extra-experimental-features = nix-command flakes"; NIX_CONFIG = "extra-experimental-features = nix-command flakes";
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
rust-analyzer # Rust language server for code completion and analysis
cargo # Rust package manager and build tool
rustc # Rust compiler
clippy # Linter to catch common mistakes in Rust code
rustfmt # Tool to format Rust code according to style guidelines
# Wayland-specific dependencies # Wayland-specific dependencies
wayland # Wayland client library wayland # Wayland client library
wayland-protocols # Wayland protocols (essential for building against Wayland) wayland-protocols # Wayland protocols (essential for building against Wayland)