2024-06-01 07:27:41 +00:00
|
|
|
{pkgs, ...}: {
|
2024-06-01 06:32:58 +00:00
|
|
|
plugins.lsp = {
|
|
|
|
enable = true;
|
2024-06-01 14:57:37 +00:00
|
|
|
|
|
|
|
keymaps.extra = [
|
|
|
|
{
|
|
|
|
action = "<cmd>LspStop<CR>";
|
|
|
|
key = "<leader>lx";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = "<cmd>LspStart<CR>";
|
|
|
|
key = "<leader>ls";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = "<cmd>LspRestart<CR>";
|
|
|
|
key = "<leader>lr";
|
|
|
|
}
|
2024-06-03 23:32:54 +00:00
|
|
|
{
|
|
|
|
action = "<cmd>split | lua vim.lsp.buf.definition()<CR>";
|
|
|
|
key = "gs";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = "<cmd>vsplit | lua vim.lsp.buf.definition()<CR>";
|
|
|
|
key = "gv";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = "<cmd>tab split | lua vim.lsp.buf.definition()<CR>";
|
|
|
|
key = "gn";
|
|
|
|
}
|
2024-06-01 14:57:37 +00:00
|
|
|
];
|
|
|
|
|
2024-06-03 23:32:54 +00:00
|
|
|
keymaps.lspBuf = {
|
|
|
|
"K" = "hover";
|
|
|
|
"gD" = "references";
|
|
|
|
"gd" = "definition";
|
|
|
|
"gi" = "implementation";
|
|
|
|
};
|
|
|
|
|
2024-06-01 06:32:58 +00:00
|
|
|
servers = {
|
|
|
|
# python
|
|
|
|
ruff.enable = true;
|
2024-06-02 17:41:22 +00:00
|
|
|
pyright.enable = true;
|
2024-06-01 06:32:58 +00:00
|
|
|
|
|
|
|
# lua (nvim config)
|
|
|
|
lua-ls.enable = true;
|
|
|
|
|
2024-06-09 05:09:30 +00:00
|
|
|
# bash
|
|
|
|
bashls.enable = true;
|
2024-06-01 06:32:58 +00:00
|
|
|
|
|
|
|
# nix
|
2024-06-01 07:27:41 +00:00
|
|
|
nixd = {
|
|
|
|
enable = true;
|
|
|
|
settings.formatting.command = ["${pkgs.alejandra}/bin/alejandra"];
|
|
|
|
};
|
2024-06-01 06:32:58 +00:00
|
|
|
};
|
|
|
|
};
|
2024-06-01 07:27:41 +00:00
|
|
|
|
|
|
|
plugins.lsp-format.enable = true;
|
|
|
|
plugins.lsp-lines.enable = true;
|
2024-06-01 06:32:58 +00:00
|
|
|
}
|