ray-x / navigator.lua

Code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐 Exploring LSP and 🌲Treesitter symbols a piece of 🍰 Take control like a boss 🦍
MIT License
1.32k stars 58 forks source link

Tailwindcss isn't attaching to the correct filetypes #275

Closed SingularisArt closed 1 year ago

SingularisArt commented 1 year ago

I'm trying to get tailwindcss lsp working and it's been a pain in the ass. Here's my current navigator.lua setup (you can find the handlers.lua file here):

Setup ```lua local handlers = require("plugins.lsp.handlers") require("navigator").setup({ debug = false, width = 0.75, height = 0.3, preview_height = 0.35, border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, ts_fold = false, default_mapping = false, treesitter_analysis = true, transparency = 50, on_attach = handlers.on_attach, icons = { icons = false }, lsp = { enable = true, code_action = { enable = false }, code_lens_action = { enable = false }, document_highlight = true, format_on_save = false, diagnostic = { underline = true, virtual_text = false, update_in_insert = false, severity_sort = { reverse = true }, }, disable_format_cap = { "stylua" }, diagnostic_virtual_text = false, diagnostic_update_in_insert = false, disply_diagnostic_qf = true, tailwindcss = { filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "typescript.tsx", "html", "css" }, }, servers = { "tsserver", }, }, }) ```

Here's the screenshot of :LspInfo on a .tsx file:

servers

ray-x commented 1 year ago

The config should be:

    servers = {
      "tsserver",
      'tailwindcss'
    },
ray-x commented 1 year ago

I also added tailwindcss in the default loading list. It getting very popular ATM