craftzdog / dotfiles-public

My personal dotfiles
6.13k stars 1.16k forks source link

[Question] Does Your LSP Configuration Works on JSX? #124

Closed harshv5094 closed 1 year ago

harshv5094 commented 1 year ago

Hi! I Want to know whether Takuya's LSP Config works on JSX files for auto-completion and suggestions. Because I've been using the setup for the past few days but the setup doesn't show me any suggestions in '.jsx' files.

Could anyone help me with this issue?

harshv5094 commented 1 year ago

I've figured it out, just needed to do some changes in .config/nvim/plugin/lspconfig.lua

nvim_lsp.tsserver.setup {
  on_attach = on_attach,
  filetypes = { "typescript", "typescriptreact", "typescript.tsx", "javascript", "javascriptreact" },
  cmd = { "typescript-language-server", "--stdio" },
  capabilities = capabilities
}