diff --git a/lazy-lock.json b/lazy-lock.json index c1c06ec..3f50e6a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -8,6 +8,8 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "copilot-cmp": { "branch": "master", "commit": "d631b3afbf26bb17d6cf2b3cd8f3d79e7d5eeca1" }, + "copilot.lua": { "branch": "master", "commit": "50ca36fd766db4d444094de81f5e131b6628f48f" }, "crates.nvim": { "branch": "main", "commit": "d5caf28aba49e81ac4099426231f3cf3c151013a" }, "dressing.nvim": { "branch": "master", "commit": "169877dbcae54b23b464b219e053e92854bbb37f" }, "flash.nvim": { "branch": "main", "commit": "967117690bd677cb7b6a87f0bc0077d2c0be3a27" }, diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 26bcf34..a74704d 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -16,6 +16,7 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.lang.typescript" }, { import = "lazyvim.plugins.extras.dap" }, { import = "lazyvim.plugins.extras.ui.mini-animate" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, -- { import = "lazyvim.plugins.extras.lang.json" }, -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins diff --git a/lua/plugins/custom.lua b/lua/plugins/custom.lua index 4605350..07b2fc7 100644 --- a/lua/plugins/custom.lua +++ b/lua/plugins/custom.lua @@ -30,27 +30,40 @@ return { opts = { server = { autostart = false, - settings = { - ["rust-analyzer"] = { - checkOnSave = { - enable = false, - command = "check", - extraArgs = {}, - }, - procMacro = { enable = false }, - diagnostics = { - enable = true, - disabled = { "unresolved", "unresolved-proc-macro", "unresolved-macro-call" }, - enableExperimental = true, - }, - cargo = { - buildScripts = { + }, + }, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + -- Ensure mason installs the server + rust_analyzer = { + settings = { + ["rust-analyzer"] = { + cargo = { + allFeatures = true, + loadOutDirsFromCheck = true, + runBuildScripts = false, + }, + -- Add clippy lints for Rust. + checkOnSave = { + allFeatures = true, + command = "check", + extraArgs = { "--no-deps" }, + }, + procMacro = { enable = false, + ignored = { + ["async-trait"] = { "async_trait" }, + ["napi-derive"] = { "napi" }, + ["async-recursion"] = { "async_recursion" }, + }, }, }, }, }, }, - }, - }, + } + } }