diff --git a/7.-Example-Custom-Plugins.md b/7.-Example-Custom-Plugins.md index 5fbe172..28e5e38 100644 --- a/7.-Example-Custom-Plugins.md +++ b/7.-Example-Custom-Plugins.md @@ -2676,4 +2676,37 @@ return { }) end, } -``` \ No newline at end of file +``` +# tailwindcss-colorizer-cmp.nvim +```lua +return { + { + "NvChad/nvim-colorizer.lua", + opts = { + user_default_options = { + tailwind = true, + }, + }, + }, + { + "hrsh7th/nvim-cmp", + dependencies = { + { "roobert/tailwindcss-colorizer-cmp.nvim", config = true }, + }, + opts = function(_, opts) + -- original kind icon formatter + local format_kinds = opts.formatting.format + opts.formatting.format = function(entry, item) + format_kinds(entry, item) -- add icons + local lspkind = require("tailwindcss-colorizer-cmp").formatter(entry, item) + if lspkind.kind == "XX" then + lspkind.kind = " " + end + return lspkind + end + end, + }, +} +``` +Sumber : +https://github.com/roobert/tailwindcss-colorizer-cmp.nvim \ No newline at end of file