Hacker News new | ask | show | jobs
by simion314 2135 days ago
So imagine you are using something like React/Angular or other templates you want your IDE to understand this templates and not highlight the syntax as errors, if you use a function/object defined in a js file in a template you want the IDE to make the connection. So when you want to see where a symbold defined in a .js file is sued you want to be found int the template file. You could have 2 different components that both have a thing called name - you want the IDE to not confuse this and consider this 2 different things as the same but be correct.

When I mean an IDE understand a library an example is jQuery, an IDE can have a plugin or just analyze the libraries you use (like analyze a .dll/.jar) and help you, my point is that the IDE is not limited to only the text files in your src folder, it can analyze your lib/vendors/node_moduloes folders too.

>More static analysis tooling, doesn't need to be built-in to the IDE, just hooked in with something like flycheck.

The IDE seems to work very fast as you type with incomplete code that would just fail if you run it through an external tool, not sure if this language servers stay up in background and keep state or each time you need to ask them to re-analyze everything and how fast and well works with incomplete code as you type.

About debugging support, for most stuff you just put breakpoints and press a Debug button, the code will stop and you get a nice overview like you get this days in browsers , including an eval repl in the current context where the program is paused. Super cool to understand soem complex library or framework you run it line by line and see how the framework inits, where it reads it's config , how it setups things , and all those steps that happen before your own code runs.

Extract method. maybe you work on some code that is not that clean, like some super long function and you can sport that this 12 lines of code can be made a function with some inputs and an output, you highlight the lines and use the Extract method, it will create a function from those lines and use it at the current place.

Or you have stuff like a missing parameter in the JSDoc the IDE offers to fix it , or you want to add JSDoc the IDE will create it for you, fill the types if it can detect them.

Most of this stuff are plugins , and you can turn things on and off, exclude folders, add your own rules etc - it is not a giant monolith that is not configurable.

1 comments

> So imagine you are using something like React/Angular or other templates you want your IDE to understand this templates and not highlight the syntax as errors, if you use a function/object defined in a js file in a template you want the IDE to make the connection. So when you want to see where a symbold defined in a .js file is sued you want to be found int the template file. You could have 2 different components that both have a thing called name - you want the IDE to not confuse this and consider this 2 different things as the same but be correct.

Why imagine? I have emacs open and it's doing this with React right now (tide mode).

>Why imagine? I have emacs open and it's doing this with React right now (tide mode)

Cool, so Emacs understand that there are 2 different components and not get confused by react/angular sepecial syntax ? At this point is Emacs still a text editor as the initial comment that start this thread said or it become an IDE buy extending it with enough plugins? (see how this comment thread started)

Yes, jump-to-definition will work correctly in both components.

I've been calling emacs an IDE for a long time. https://news.ycombinator.com/item?id=72895