Add rust plugins
This commit is contained in:
@@ -60,6 +60,101 @@ local M = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/sidekick.nvim",
|
||||
opts = {
|
||||
-- add any options here
|
||||
cli = {
|
||||
mux = {
|
||||
backend = "zellij",
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<tab>",
|
||||
function()
|
||||
-- If there is a next edit, jump to it, otherwise apply it if any
|
||||
if not require("sidekick").nes_jump_or_apply() then
|
||||
return "<Tab>" -- fallback to normal tab
|
||||
end
|
||||
end,
|
||||
expr = true,
|
||||
desc = "Goto/Apply Next Edit Suggestion",
|
||||
},
|
||||
{
|
||||
"<c-.>",
|
||||
function()
|
||||
require("sidekick.cli").focus()
|
||||
end,
|
||||
desc = "Sidekick Focus",
|
||||
mode = { "n", "t", "i", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>aa",
|
||||
function()
|
||||
require("sidekick.cli").toggle()
|
||||
end,
|
||||
desc = "Sidekick Toggle CLI",
|
||||
},
|
||||
{
|
||||
"<leader>as",
|
||||
function()
|
||||
require("sidekick.cli").select()
|
||||
end,
|
||||
-- Or to select only installed tools:
|
||||
-- require("sidekick.cli").select({ filter = { installed = true } })
|
||||
desc = "Select CLI",
|
||||
},
|
||||
{
|
||||
"<leader>ad",
|
||||
function()
|
||||
require("sidekick.cli").close()
|
||||
end,
|
||||
desc = "Detach a CLI Session",
|
||||
},
|
||||
{
|
||||
"<leader>at",
|
||||
function()
|
||||
require("sidekick.cli").send({ msg = "{this}" })
|
||||
end,
|
||||
mode = { "x", "n" },
|
||||
desc = "Send This",
|
||||
},
|
||||
{
|
||||
"<leader>af",
|
||||
function()
|
||||
require("sidekick.cli").send({ msg = "{file}" })
|
||||
end,
|
||||
desc = "Send File",
|
||||
},
|
||||
{
|
||||
"<leader>av",
|
||||
function()
|
||||
require("sidekick.cli").send({ msg = "{selection}" })
|
||||
end,
|
||||
mode = { "x" },
|
||||
desc = "Send Visual Selection",
|
||||
},
|
||||
{
|
||||
"<leader>ap",
|
||||
function()
|
||||
require("sidekick.cli").prompt()
|
||||
end,
|
||||
mode = { "n", "x" },
|
||||
desc = "Sidekick Select Prompt",
|
||||
},
|
||||
-- Example of a keybinding to open Claude directly
|
||||
{
|
||||
"<leader>ac",
|
||||
function()
|
||||
require("sidekick.cli").toggle({ name = "claude", focus = true })
|
||||
end,
|
||||
desc = "Sidekick Toggle Claude",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
|
||||
+8
-2
@@ -2,13 +2,14 @@ local M = {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
vim.lsp.enable("rust_analyzer")
|
||||
-- vim.lsp.enable("rust_analyzer")
|
||||
vim.lsp.enable("yamlls")
|
||||
vim.lsp.enable("luals")
|
||||
vim.lsp.enable("sqls")
|
||||
vim.lsp.enable("ty")
|
||||
vim.lsp.enable("svelte")
|
||||
vim.lsp.enable("harper_ls")
|
||||
vim.lsp.enable("sourcekit")
|
||||
vim.lsp.enable("harper_ls")
|
||||
|
||||
-- Setup gopls with inlay hints
|
||||
vim.lsp.config("gopls", {
|
||||
@@ -71,6 +72,11 @@ local M = {
|
||||
event = { "CmdlineEnter" },
|
||||
ft = { "go", "gomod" },
|
||||
},
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^9",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
local M = {
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-neotest/nvim-nio",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("rustaceanvim.neotest")
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user