Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Unknown function: TailwindGetUtilities  #60

@rickswe

Description

@rickswe

Describe the bug

When running Telescope tailwind utilties I get this error:

Error executing Lua callback: Vim:E117: Unknown function: TailwindGetUtilities                                                                                    
stack traceback:                                                                                                                                                  
        [C]: in function 'fn'                                                                                                                                     
        .../lazy/tailwind-tools.nvim/lua/tailwind-tools/rplugin.lua:9: in function 'get_utilities'                                                                
        ...ilwind-tools.nvim/lua/telescope/_extensions/tailwind.lua:26: in function <...ilwind-tools.nvim/lua/telescope/_extensions/tailwind.lua:25>              
        ...im/vanilla/lazy/telescope.nvim/lua/telescope/command.lua:183: in function 'run_command'                                                                
        ...im/vanilla/lazy/telescope.nvim/lua/telescope/command.lua:259: in function 'load_command'                                                               
        .../neovim/vanilla/lazy/telescope.nvim/plugin/telescope.lua:108: in function <.../neovim/vanilla/lazy/telescope.nvim/plugin/telescope.lua:107>      

To Reproduce

Use my config:

local custom = require "my.custom"

---@type LazyPluginSpec
return {
  "luckasRanarison/tailwind-tools.nvim",
  build = ":UpdateRemotePlugins",
  lazy = true,
  init = function()
    vim.api.nvim_create_autocmd("LspAttach", {
      callback = function(args)
        local client = vim.lsp.get_client_by_id(args.data.client_id)
        if client and client.name == "tailwindcss" then
          require "tailwind-tools"
          return true
        end
      end,
    })
  end,
  opts = {
    conceal = {
      symbol = "",
    },
  },
  config = function(_, opts)
    require("tailwind-tools").setup(opts)
    custom.cmp_format.before = require("tailwind-tools.cmp").lspkind_format
  end,
}

Then run :Telescope tailwind utilities on a react project with tailwind.

Expected behavior

No error.

Screenshots
See error above

Environment (please complete the following information):

  • Operating system - MacOS 15.0.1
  • Neovim version or commit
    NVIM v0.10.2
    Build type: Release
    LuaJIT 2.1.1727870382
  • Nvim-treesitter commit latest as of 10/17/24
  • tailwind-language-server version ver:168

I also installed neovim in the project with npm install neovim.
I am getting this message from UpdateRemotePlugins:

function remote#host#UpdateRemotePlugins[6]..<SNR>57_RegistrationCommands[13]..remote#host#RegisterPlugin, line 5                                                 
Plugin "/Users/ritchie/.local/share/neovim/vanilla/lazy/tailwind-tools.nvim/rplugin/node/tailwind-tools" is already registered                                    
remote/host: generated rplugin manifest: /Users/ritchie/.local/share/neovim/vanilla/rplugin.vim 

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions