Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown function: TailwindGetUtilities #60

Open
rickalex21 opened this issue Oct 18, 2024 · 1 comment
Open

Unknown function: TailwindGetUtilities #60

rickalex21 opened this issue Oct 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rickalex21
Copy link

rickalex21 commented Oct 18, 2024

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

@rickalex21 rickalex21 added the bug Something isn't working label Oct 18, 2024
@luckasRanarison
Copy link
Owner

Sorry for the late reply. Does it still happen after running :UpdateRemotePlugins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants