49 lines
865 B
Nix
49 lines
865 B
Nix
{pkgs, ...}: {
|
|
plugins.lsp = {
|
|
enable = true;
|
|
|
|
keymaps.extra = [
|
|
{
|
|
action = "<cmd>LspStop<CR>";
|
|
key = "<leader>lx";
|
|
}
|
|
{
|
|
action = "<cmd>LspStart<CR>";
|
|
key = "<leader>ls";
|
|
}
|
|
{
|
|
action = "<cmd>LspRestart<CR>";
|
|
key = "<leader>lr";
|
|
}
|
|
];
|
|
|
|
servers = {
|
|
# python
|
|
ruff.enable = true;
|
|
pyright.enable = true;
|
|
|
|
# lua (nvim config)
|
|
lua-ls.enable = true;
|
|
|
|
# rust
|
|
rust-analyzer = {
|
|
enable = true;
|
|
installCargo = true;
|
|
installRustc = true;
|
|
};
|
|
|
|
# ocaml
|
|
ocamllsp.enable = true;
|
|
|
|
# nix
|
|
nixd = {
|
|
enable = true;
|
|
settings.formatting.command = ["${pkgs.alejandra}/bin/alejandra"];
|
|
};
|
|
};
|
|
};
|
|
|
|
plugins.lsp-format.enable = true;
|
|
plugins.lsp-lines.enable = true;
|
|
}
|