diff options
| author | Nawfal bin Mohmad Rouyan <[email protected]> | 2021-06-19 05:43:58 +0800 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-18 17:43:58 -0400 | 
| commit | c51ffdd8ac53c6c4d2ba61f0cd0fe225e61b18f1 (patch) | |
| tree | 263de1e5ea80104f2a6103d5b1cdf86d51242429 | |
| parent | c1600fbfaad7172ec057cb94b4c54c4773ab5376 (diff) | |
Simplify tailwindcss-ls config (#502)
latest nvim-lspconfig has all the necessary config for tailwindcss included.
| -rw-r--r-- | lua/lsp/tailwindcss-ls.lua | 19 | 
1 files changed, 1 insertions, 18 deletions
| diff --git a/lua/lsp/tailwindcss-ls.lua b/lua/lsp/tailwindcss-ls.lua index d85030ca..923eb5d5 100644 --- a/lua/lsp/tailwindcss-ls.lua +++ b/lua/lsp/tailwindcss-ls.lua @@ -1,26 +1,9 @@  local lspconfig = require 'lspconfig' -local configs = require 'lspconfig/configs' -local util = require"lspconfig".util --- Check if tailwindls server already defined. -if not lspconfig.tailwindls then configs['tailwindls'] = {default_config = {}} end - -lspconfig.tailwindls.setup { +lspconfig.tailwindcss.setup {      cmd = {          "node", DATA_PATH .. "/lspinstall/tailwindcss/tailwindcss-intellisense/extension/dist/server/tailwindServer.js",          "--stdio"      }, -    filetypes = O.tailwindls.filetypes, -    init_options = { -        userLanguages = { -- I don't know why but the LSP won't autocomplete the tailwind classes without this -        } -    }, -    root_dir = function(fname) -        return util.root_pattern('tailwind.config.js', 'tailwind.config.ts')(fname) or -        util.root_pattern('postcss.config.js', 'postcss.config.ts')(fname) or -        util.find_package_json_ancestor(fname) or -        util.find_node_modules_ancestor(fname) or -        util.find_git_ancestor(fname) -    end,      on_attach = require'lsp'.common_on_attach  } | 
