add tailwindcss color

This commit is contained in:
xfy
2024-09-14 17:31:24 +08:00
parent d096a239b0
commit bd3efbea17
2 changed files with 10 additions and 8 deletions

View File

@ -2,8 +2,8 @@ return {
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-buffer", -- source for text in buffer
"hrsh7th/cmp-path", -- source for file system paths
"hrsh7th/cmp-buffer", -- source for text in buffer
"hrsh7th/cmp-path", -- source for file system paths
{ "petertriho/cmp-git", opts = {} }, -- source for git
{
"L3MON4D3/LuaSnip",
@ -12,9 +12,10 @@ return {
-- install jsregexp (optional!).
build = "make install_jsregexp",
},
"saadparwaiz1/cmp_luasnip", -- for autocompletion
"saadparwaiz1/cmp_luasnip", -- for autocompletion
"rafamadriz/friendly-snippets", -- useful snippets
"onsails/lspkind.nvim", -- vs-code like pictograms
"onsails/lspkind.nvim", -- vs-code like pictograms
{ "roobert/tailwindcss-colorizer-cmp.nvim", opts = {} }, -- tailwind css
},
config = function()
local cmp = require("cmp")
@ -39,16 +40,16 @@ return {
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-e>"] = cmp.mapping.abort(), -- close completion window
["<C-e>"] = cmp.mapping.abort(), -- close completion window
["<CR>"] = cmp.mapping.confirm({ select = true }),
}),
-- sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
{ name = "crates" }, -- rust crates
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
{ name = "crates" }, -- rust crates
{ name = "git" },
}),