https://github.com/Jezda1337/nvim-html-css
CSS Intellisense for HTML
https://github.com/Jezda1337/nvim-html-css
html-css-intellisense neovim neovim-plugin nvim nvim-cmp
Last synced: 4 months ago
JSON representation
CSS Intellisense for HTML
- Host: GitHub
- URL: https://github.com/Jezda1337/nvim-html-css
- Owner: Jezda1337
- License: mit
- Created: 2023-06-08T16:38:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-23T16:25:11.000Z (5 months ago)
- Last Synced: 2025-02-23T16:32:32.031Z (5 months ago)
- Topics: html-css-intellisense, neovim, neovim-plugin, nvim, nvim-cmp
- Language: Lua
- Homepage:
- Size: 141 KB
- Stars: 158
- Watchers: 4
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ☕ Neovim HTML, CSS Support
> [!WARNING]
> This plugin is under construction.Neovim CSS Intellisense for HTML
#### HTML id and class attribute completion for Neovim written in Lua.

## ✨ Features
- HTML `id` and `class` attribute completion.
- Supports linked and `internal` style sheets.
- Supports additional `external` style sheets.## ⚡️ Requirements
- Neovim 0.10+
- curl 8.7+## 📦 Installation
### Lazy
```lua
return require("lazy").setup({
{
"hrsh7th/nvim-cmp",
dependencies = {
"Jezda1337/nvim-html-css" -- add it as dependencies of `nvim-cmp` or standalone plugin
},
opts = {
sources = {
{
name = "html-css",
option = {
enable_on = { "html" }, -- html is enabled by default
notify = false,
documentation = {
auto_show = true, -- show documentation on select
},
-- add any external scss like one below
style_sheets = {
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css",
"https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css",
},
},
},
},
},
},
})
```## ⚙ Default Configuration
```lua
option = {
enable_on = { "html" },
notify = false,
documentation = {
auto_show = true,
},
style_sheets = {}
}
```## 🤩 Pretty Menu Items
Setting the formatter this way, you will get the file name with an extension in your cmp menu, so you know from which file that class is coming.
```lua
require("cmp").setup({
-- ...
formatting = {
format = function(entry, vim_item)
local source = entry.source.name
if source == "html-css" then
vim_item.menu = "[" .. entry.completion_item.provider .. "]" or "[html-css]"
end
return vim_item
end
}
-- ...
})
```