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

react autocomplate doesn't work #169

Open
zhoommer opened this issue May 3, 2024 · 3 comments
Open

react autocomplate doesn't work #169

zhoommer opened this issue May 3, 2024 · 3 comments

Comments

@zhoommer
Copy link

zhoommer commented May 3, 2024

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.

@PowerzinBR
Copy link

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

@tony-sn
Copy link

tony-sn commented Jun 11, 2024

@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,

@harshv5094
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants