change copilot plugin and add tailwind plugins
parent
63f64af2af
commit
d22d6e5acb
@ -0,0 +1,39 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"onsails/lspkind-nvim",
|
||||
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local lspkind = require("lspkind")
|
||||
lspkind.init({
|
||||
mode = "symbol_text",
|
||||
preset = "codicons",
|
||||
})
|
||||
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = function(entry, item)
|
||||
item.kind = lspkind.presets.default[item.kind]
|
||||
item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
nvim_lua = "[Lua]",
|
||||
buffer = "[Buffer]",
|
||||
path = "[Path]",
|
||||
calc = "[Calc]",
|
||||
look = "[Dict]",
|
||||
})[entry.source.name]
|
||||
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
experimental = {
|
||||
-- I like the new menu better! Nice work hrsh7th
|
||||
native_menu = false,
|
||||
|
||||
-- Let's play with this for a day or two
|
||||
ghost_text = false,
|
||||
},
|
||||
}
|
@ -1,9 +1,65 @@
|
||||
-- return {
|
||||
-- "github/copilot.vim",
|
||||
-- config = function()
|
||||
-- vim.api.nvim_set_keymap("i", "<C-l>", 'copilot#Accept("<CR>")', { silent = true, expr = true })
|
||||
-- vim.keymap.set('i', '<C-j>', '<Plug>(copilot-next)', { noremap = false })
|
||||
-- vim.keymap.set('i', '<C-k>', '<Plug>(copilot-previous)', { noremap = false })
|
||||
-- vim.keymap.set('i', '<M-.>', '<Plug>(copilot-suggest)', { noremap = false })
|
||||
-- end
|
||||
-- }
|
||||
|
||||
return {
|
||||
"github/copilot.vim",
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
vim.api.nvim_set_keymap("i", "<C-l>", 'copilot#Accept("<CR>")', { silent = true, expr = true })
|
||||
vim.keymap.set('i', '<C-j>', '<Plug>(copilot-next)', { noremap = false })
|
||||
vim.keymap.set('i', '<C-k>', '<Plug>(copilot-previous)', { noremap = false })
|
||||
vim.keymap.set('i', '<M-.>', '<Plug>(copilot-suggest)', { noremap = false })
|
||||
end
|
||||
require("copilot").setup({
|
||||
panel = {
|
||||
enabled = true,
|
||||
auto_refresh = true,
|
||||
keymap = {
|
||||
jump_prev = "[[",
|
||||
jump_next = "]]",
|
||||
accept = "<CR>",
|
||||
refresh = "gr",
|
||||
open = "<M-CR>"
|
||||
},
|
||||
layout = {
|
||||
position = "bottom", -- | top | left | right
|
||||
ratio = 0.4
|
||||
},
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
accept = "<M-l>",
|
||||
accept_word = false,
|
||||
accept_line = false,
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
dismiss = "<C-]>",
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
yaml = true,
|
||||
markdown = true,
|
||||
help = false,
|
||||
gitcommit = true,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
terraform = true,
|
||||
go = true,
|
||||
html = true,
|
||||
templ = true,
|
||||
javascript = true,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
["."] = true,
|
||||
},
|
||||
copilot_node_command = 'node', -- Node.js version must be > 18.x
|
||||
server_opts_overrides = {},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
return {
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require("colorizer").setup({
|
||||
user_default_options = {
|
||||
tailwind = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
-- "roobert/tailwindcss-colorizer-cmp.nvim",
|
||||
-- -- optionally, override the default options:
|
||||
-- config = function()
|
||||
-- require("tailwindcss-colorizer-cmp").setup({
|
||||
-- color_square_width = 2,
|
||||
-- })
|
||||
-- end
|
||||
}
|
Loading…
Reference in New Issue