Closed sirstanislav closed 1 year ago
After installed fd it seems like nothing happening. lsp log are clean, lazy load working as soon as I touching html to edit. Sorry, i'm not enougth understand how all is working. Is there any way wo see what happens inside expect lsp log?
@sirstanislav hey man, yep I just test it and seams opts in cmp doesn't work, you can make plugin to work this way: have separate file for plugin for example: lua/plugins/html-css.lua (or any where you put plugin configs) and put this code inside:
return {
"Jezda1337/nvim-html-css",
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim" },
event = { "BufReadPost", "BufNewFile" },
config = function()
require("html-css"):setup()
end,
}
then inside cmp config use this:
require("cmp").setup {
... cmp config,
formatting = {
format = funcion(entry, vim_item)
local source = entry.source.name
local kind = vim_item.kind
if source == "html-css" then
source_mapping["html-css"] = entry.completion_item.menu
end
return vim_item
end
},
sourecs = cmp.config.sources {
{
name = "html-css",
option = {
max_count = {}, -- not ready yet
enable_on = {
"html",
}, -- set the file types you want the plugin to work on
file_extensions = { "css", "sass", "less" },
style_sheets = {
-- example of remote styles, only css no js for now
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css",
"https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css",
},
},
},
}
}
pls try this setup and if you find time for feedback would be great, if you encounter on some errors pls comment it or post pic 🫡
It's need install plugin and add new source to existing cmp config of NvChad
Only its's work in not framework project, like in normal single .html page. But not work in .html in Angular. Any idea why?
Hmm, not sure, I tested on angular as well, and for me working normally. You have to have .git folder in root folder where you open the neovim instance. But if you have angular src code with .git folder in nested folder then won't work. I will work on that soon. But for now only the root folder with .git folder will work. Bdw do you have any errors, and what cmpstatus says?
You are right. It's works only
You have to have .git folder in root folder where you open the neovim instance. But if you have angular src code with .git folder in nested folder then won't work
cmp status on second screen. Both for angular project with .git in root folder(where is works) and where is are nested folders with many modules in each with .git (not works).
Will wait your solution for nested folders. Thank you very much man.
Hey man. Can you help to understand what wrong i do?
What i do, it's i'm overriding nvim_cmp
Add nvim_htm_css dependencies to nvim_cmp
Then i have this error whith plenary
.git already initialised. Thanks for any advices