Closed mrbradleylee closed 10 months ago
Can you add dependencies to plugin?
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-lua/plenary.nvim"
},
When I add dependencies to the plugin, nvim won't start at all. Just flashes and returns to terminal immediately.
{
'Jezda1337/nvim-html-css',
dependencies = {
'nvim-treesitter/nvim-treesitter',
'nvim-lua/plenary.nvim'
},
config = function()
require('html-css'):setup()
end,
},
Finally I make the config that produce the bug, now I will start with debugging, wish me luck š«”
Finally I make the config that produce the bug, now I will start with debugging, wish me luck š«”
Appreciate you taking the time to work on this! The last step towards dumping VSCode š
Hey @mrbradleylee, accually there is no bug in the code, the reason why doesn't work is bcs, you load html-css plugin 1st, and then nvim-cmp, so html-css plugin can't read the settings and can't be injected into cmp so that was the issue, to solve this there is 2 options, to call your configuration using config prop like this:
{
'hrsh7th/nvim-cmp',
config = funtion()
-- or here put ur cmp config, just copy from local file and paste it here, or require it here like this:
require("path to ur local file")
end
}
require("config.cmp")
require("lsp")
require("html-css"):setup()
so inside plugins you will only set the name of the plugin "Jezda1337/nvim-html-css"
edit: to be able to have file names in cmp menu you should put this: ( I will change this on repo later)
formatting = {
format = function(entry, vim_item)
if entry.source.name == "html-css" then
vim_item.menu = entry.completion_item.menu -- change just his line of code
end
return vim_item
end
}
You can try both ways if you want, but I would like to hear some feedback cheers š«”
That was it š¤Æ !! Went with solution number 2. Much cleaner plugins file now. Many thanks! Already working on some projects and am loving it so far. Will keep a close eye on this one šØāš³ š
I'm having an issue getting the plugin to load, where if any
*.html
file exists in the file tree I get an error running the config function:TSInstall html
shows html and css are already loaded, they're also underensure_installed
in TS config file~/.config/nvim
haslua/init.lua
which callslua/config/plugins.lua
plugins are defined like so (nothing is lazy loaded yet):
full
cmp
setup:Feel like I'm so close to getting this working, but am missing something really small and hoping you can help!