orktes / atom-react

ReactJS Support for atom (syntax, snippets)
http://orktes.github.io/atom-react/
MIT License
476 stars 78 forks source link

JSX not autocompleting #151

Open scottbarrow opened 8 years ago

scottbarrow commented 8 years ago

Can anyone tell me if this is expected behaviour? I would assume JSX/HTML snippets to appear here?

Randagio13 commented 8 years ago

same problem and when I filter my packages I found this package schermata 2016-03-21 alle 11 36 44

scottbarrow commented 8 years ago

Also saw that package installed.

On Mar 21, 2016, 3:37 AM, at 3:37 AM, Alessandro Casazza notifications@github.com wrote:

same problem and when I filter my packages I found this package schermata 2016-03-21 alle 11 36
44


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/orktes/atom-react/issues/151#issuecomment-199220075

rayhatfield commented 8 years ago

I'm also seeing that package installed.

scottbarrow commented 8 years ago

A resolution was removing the React package from ~/.atom/.apm and reinstalling with apm install react. This installed the correct package and the grammars. However, the issue remains that JSX is not autocompleting within a react component. I'm not sure if that is not a feature of this package?

arajpraju commented 8 years ago

Why it is installing facebook/react instead of plugin?

mqli commented 8 years ago

Same problem. Even if removed the '~/.atom/.apm/react' and reinstall with 'apm install react'. Still installed the reactjs not the atom-react.

scottbarrow commented 8 years ago

try removing ~/.atom/packages/react and ~/.atom/.apm/react then perform apm install react

mqli commented 8 years ago

thx @scottbarrow, It work. Before I remove the ~/.atom/.apm/react, I found out that since the 0.14.2 version, the package.json is the package.json of the reactjs, so the apm insall it instead, haven't finger it out why yet.

seoyoochan commented 8 years ago

@scottbarrow your solution did work for me as well! :+1:

linker-err0r commented 8 years ago

Unfortunately, this solution did not work for me. I still don't have autocompletion working. :-1:

arajpraju commented 8 years ago

@deathgaze Download the zip file directly from github and extract into ~/.atom/packages/ and do an npm install inside the extracted folder.

linker-err0r commented 8 years ago

@arajpraju I did as you told me and hit the Download ZIP button from the Github Repo. I extracted it into ~/.atom/packages/, shutdown Atom, rm -rf react, mv atom-react-master react, cd react, npm install and started Atom. Unfortunately, it did not improve the situation. :(

seoyoochan commented 8 years ago

@deathgaze you need to completely restart the process of atom.

linker-err0r commented 8 years ago

@seoyoochan I did. Using Cmd-Q. Is there another way to do it?

seoyoochan commented 8 years ago

@deathgaze can you try the solution of scottbarrow?

linker-err0r commented 8 years ago

@seoyoochan yes, I tried @scottbarrow 's solution first. No dice. :(

linker-err0r commented 8 years ago

Is there maybe some other component that autocomplete depends on that I might try fiddling with?

tungphuong commented 8 years ago

Same problem with me, cannot run autocomplete for html in render method. Please let me know how can solve it. Thanks,

arajparaj commented 8 years ago

@jackyphuong try updating to the latest version. If it didn't work remove the plugin and install it again.

tungphuong commented 8 years ago

@arajparaj, i removed plugin and install it again, then restart atom but cannot use autocomplete. I can use auto close, ... Besides, i just install atom and plugin yesterday. So, i think it is the lastest version. Could u please let me know how can check or another way? Thanks

alteredtastes commented 7 years ago

@jackyphuong I just solved and saw I had two conflicting packages - the React package (detects and enables Javascript (JSX) grammar for the file, and Language-Javascript-JSX (detects and enables Javascript with JSX grammar for the file.

I did the following to resolve:

  1. uninstall the Language-Javascript-JSX package if it is installed.
  2. rm -rf ~/.atom/packages/react
  3. rm -rf ~/.atom/.apm/react
  4. apm install react
  5. restart atom
  6. ensure that Javascript (JSX) is the grammar selected for the file.
eggsandbeer commented 7 years ago

Tried above solution and still no avail. All community packages turned off, installed with apm, divs still don't auto close in render block. JSX is the set grammar. It's just type 'div', hit tab and things will close, right?

Atom 1.18.10 react 0.16.2

tyrong commented 7 years ago

i had same problem, managed to get auto closing to work with render method by 1) quitting atom completely. 2) run 'apm uninstall react'. 3) run 'apm install react'... Then re open atom and seemed to be working fine for me. You also need to change the file type down the bottom right to JavaScript(JSX)

eternauta1337 commented 7 years ago

I report having this problem as well and none of the above solutions work. Atom 1.18.0

DanielTamkin commented 6 years ago

I'm encountering the same problem as well. I can't auto-complete/get the closing tags feature to work. Currently running:

Atom    : 1.24.0
Electron: 1.6.16
Chrome  : 56.0.2924.87
Node    : 7.4.0
CodeWithOz commented 6 years ago

I still have the same problem too. Autocomplete and tag completion both not working. Tried everything mentioned above. Currently running:

Atom    : 1.25.1
Electron: 1.7.11
Chrome  : 58.0.3029.110
Node    : 7.9.0

Windows 10.0.16299.

---- UPDATE ---- I never got this to work, so I ended up trying this tweak on Emmet and it's perfect for me :+1: :smile:

https://gist.github.com/mxstbr/361ddb22057f0a01762240be209321f0

fadlykayo commented 6 years ago

@eggsandbeer actually not by hitting tab, but it will autoclose itself after you write <div>. @alteredtastes solution work for me perfectly.

  1. uninstall the Language-Javascript-JSX package if it is installed.
  2. rm -rf ~/.atom/packages/react
  3. rm -rf ~/.atom/.apm/react
  4. apm install react
  5. restart atom
  6. ensure that Javascript (JSX) is the grammar selected for the file.
Angelhpascual commented 4 years ago

Any solution for this problem. I'm getting totally crazy trying to solve the JSX html autocomplete on Atom