Skip to content

rambhosale/cmp-bootstrap.nvim

Repository files navigation

cmp-bootstrap.nvim

cmp-bootstrap.nvim is nvim-cmp completion source for bootstrap 4 class names

Requirements

  • Neovim >= 0.5.1
  • nvim-cmp

Installation

using packer.nvim

use {
    "rambhosale/cmp-bootstrap.nvim",
    after = "nvim-cmp"
    event = "InsertEnter",
 }

Setup

Add the following code to in your init.lua or a simillar file

   local cmp = require("cmp")

   cmp.setup.filetype('html', {
      sources = cmp.config.sources({
         { name = 'cmp_bootstrap' },
         -- other sources
      })
   })

Show completion source icon

If you want to show the completion source icon in the suggestions add the following to your lspkind_icons config

    vim_item.menu = ({
        nvim_lsp = "[LSP]",
        nvim_lua = "[Lua]",
        buffer = "[BUF]",
        cmp_bootstrap = "[﯄]"
    })[entry.source.name]

Screenshot from 2022-03-18 17 59 18 Screenshot from 2022-03-18 17 59 38

Acknowledgments

This project would not have possible without the help of

About

Neovim completion source for bootstrap 4 class names

Topics

Resources

License

Stars

Watchers

Forks