change copilot plugin and add tailwind plugins
This commit is contained in:
parent
63f64af2af
commit
d22d6e5acb
7 changed files with 204 additions and 21 deletions
39
lua/custom/plugins/cmp.lua
Normal file
39
lua/custom/plugins/cmp.lua
Normal file
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue