@@ -10,7 +10,14 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
{ import = "lazyvim.plugins.extras.editor.flash" },
|
||||
--{ import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
|
||||
{ import = "lazyvim.plugins.extras.util.project" },
|
||||
|
||||
|
||||
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
6
lua/plugins/copilot-cmp.lua
Normal file
6
lua/plugins/copilot-cmp.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"zbirenbaum/copilot-cmp",
|
||||
config = function()
|
||||
require("copilot_cmp").setup()
|
||||
end
|
||||
}
|
@@ -1,13 +1,19 @@
|
||||
return {
|
||||
"zbirenbaum/copilot.lua",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("copilot").setup({
|
||||
suggestion = {
|
||||
auto_trigger = true,
|
||||
}
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
|
||||
--suggestion = {
|
||||
-- auto_trigger = true,
|
||||
-- keymap = {
|
||||
-- accept = "<C-S-l>",
|
||||
-- }
|
||||
--}
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ local leptosfmt = h.make_builtin({
|
||||
filetypes = { "rust" },
|
||||
generator_opts = {
|
||||
command = "leptosfmt",
|
||||
args = { "--quiet=true", "--stdin=true" },
|
||||
args = { "--quiet", "--stdin" },
|
||||
to_stdin = true,
|
||||
},
|
||||
factory = h.formatter_factory,
|
||||
@@ -53,6 +53,9 @@ return {
|
||||
return utils.root_has_file({ "leptosfmt.toml" })
|
||||
end,
|
||||
}),
|
||||
nls.builtins.diagnostics.revive,
|
||||
nls.builtins.code_actions.impl,
|
||||
nls.builtins.code_actions.refactoring,
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
9
lua/plugins/nvim-cmp.lua
Normal file
9
lua/plugins/nvim-cmp.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "copilot", group_index = 2 } }))
|
||||
|
||||
return opts
|
||||
end
|
||||
}
|
@@ -12,7 +12,7 @@ return {
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
["rust-analyzer"] = {
|
||||
imports = {
|
||||
granularity = {
|
||||
group = "module",
|
||||
|
Reference in New Issue
Block a user