dotfiles-public icon indicating copy to clipboard operation
dotfiles-public copied to clipboard

react autocomplate doesn't work

Open zhoommer opened this issue 9 months ago • 3 comments

Auto-suggest no longer works when writing a React project. When I first started using it using these settings, it worked normally, but it doesn't work anymore. For example, when I type useState, it does not import automatically.

zhoommer avatar May 03 '24 12:05 zhoommer

Try installing a LSP server for your code language (js, html, css), maybe that helps

PowerzinBR avatar May 07 '24 19:05 PowerzinBR

@zhoommer can you try to see whether your repo has .git folder? because this LSP settings will look for .git folder, if you don't have git init, LSP suggestions will not work.

root_dir = function(...) return require("lspconfig.util").root_pattern(".git")(...) end,

tony-sn avatar Jun 11 '24 09:06 tony-sn

Just remove the root_dir line and lsp server will use the default setting

harshv5094 avatar Jun 11 '24 09:06 harshv5094