Skip to content

eratio08/blink-cmp-data-star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blink-cmp-data-star

Autocompletions for data-star HTML attributes in Neovim using blink.cmp.

Requirements

Installation

lazy.nvim

{
  'saghen/blink.cmp',
  dependencies = {
    'your-username/blink-cmp-data-star',
  },
  opts = {
    sources = {
      default = { 'lsp', 'path', 'snippets', 'buffer', 'datastar' },
      providers = {
        datastar = {
          name = 'data-star',
          module = 'blink-cmp-data-star',
          opts = {
            enable_pro = false,
          },
        },
      },
    },
  },
}

Configuration

providers = {
  datastar = {
    name = 'data-star',
    module = 'blink-cmp-data-star',
    opts = {
      enable_pro = false,           -- Enable Datastar Pro attributes (default: false)
      trigger_chars = { '-', '_' }, -- Override trigger characters
    },
    score_offset = 5,                -- Boost ranking in completion menu
  },
}

Usage

  1. Open an HTML file (or supported template: Vue, Svelte, ERB, etc.)
  2. Type data- inside an HTML tag to see attribute completions
  3. Type @ inside attribute values to see action keyword completions

Attribute Completions

<div data-█
     ^^^^^ Triggers autocomplete showing all 21 core attributes

Action Keyword Completions

<button data-on-click="@█">
                       ^^ Triggers autocomplete showing action keywords

Supported Filetypes

  • html, htm
  • vue, svelte
  • htmldjango, jinja
  • eruby, erb
  • blade

License

MIT

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Languages