{ pkgs, ... }:
{
    plugins = {
        lsp = {
            enable = true;
            servers = {
                bashls.enable = true;
                clangd = {
                    enable = true;
                    package = pkgs.llvmPackages_19.clang-tools;
                };
                cmake.enable = true;
                lua_ls.enable = true;
                gopls.enable = true;
                nixd.enable = true;
                texlab.enable = true;
                typos_lsp.enable = true;
            };
            keymaps = {
                lspBuf = {
                    gd = {
                        action = "definition";
                        desc = "Goto Definition";
                    };
                    gr = {
                        action = "references";
                        desc = "Goto References";
                    };
                    gD = {
                        action = "declaration";
                        desc = "Goto Declaration";
                    };
                    gI = {
                        action = "implementation";
                        desc = "Goto Implementation";
                    };
                    gT = {
                        action = "type_definition";
                        desc = "Type Definition";
                    };
                    K = {
                        action = "hover";
                        desc = "Hover";
                    };
                    "<leader>cw" = {
                        action = "workspace_symbol";
                        desc = "Workspace Symbol";
                    };
                    "<leader>cr" = {
                        action = "rename";
                        desc = "Rename";
                    };
                    "<leader>ca" = {
                        action = "code_action";
                        desc = "Code Action";
                    };
                };
            };
        };
    };
    extraConfigLua = ''
    local _border = "rounded"

    vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
        vim.lsp.handlers.hover, {
            border = _border
        }
    )

    vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
        vim.lsp.handlers.signature_help, {
            border = _border
        }
    )

    vim.diagnostic.config{
        float={border=_border}
    };

    require('lspconfig.ui.windows').default_options = {
        border = _border
    }
    '';
}
